Re: [PATCH 1/2] plat-omap: dmtimer: Add support for interrupts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Andrei Varvara <Andrei.Varvara@xxxxxxxx> [160324 09:03]:
> Hello Tony,
> 
> The way you are proposing means that I should not touch dmtimer.c? I got it wrong?
> I'm not sure what are you suggesting with "let's implement it using a Linux generic 
> Framework instead, request_irq". I used request_irq in the dmtimer.c code to
> set a ISR for every timer that is probed. Inside ISR it is called the user callback
> set through omap_dm_timer_set_isr_callback.

Sorry if I was a bit unclear. Linux has a framework that automates all
that for you with no custom callbacks needed. All you need to do is
implement a chained handler in dmtimer.c. See the header
linux/irqchip/chained_irq.h.

For some exmaples, see gpiochip_set_chained_irqchip() and
pcs_irq_init_chained_handler(). There's probably even a simpler
example somewhere, maybe grep under drivers for chained_irq.h.

> I found in the kernel source code places where it was implemented identical or very similar
> to what I did. Please have a look in the following.
> arch/mips/bcm63xx/timer.c --- client provides the callback which is called from timer ISR routine
> powerpc/sysdev/mpic_timer.c - client provides the actual ISR callback

Yeah request_irq does that for you too after you implement the
chained handler in dmtimer.c :)

> Please explain a little bit what you have though should be done in dmtimer.c
> regarding the interrupt support. 

Looks like you've already done all the code needed, you just need
to wire it to the chainged handler. That way we can specify the
timer to use from the .dts files with no custom APIs or new custom
DT bindings.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux