Re: [PATCH] arm: omap2: timer: don't disable our timers

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

 



* Felipe Balbi <balbi@xxxxxx> [151005 18:02]:
> 
> Hi,
> 
> Sebastian Reichel <sre@xxxxxxxxxx> writes:
> > On Mon, Oct 05, 2015 at 06:41:37PM -0500, Suman Anna wrote:
> >> We will gain a user from OMAP remoteproc driver as well (out of tree at
> >> the moment, but it does follow the DT phandle and
> >> omap_dm_timer_request_by_node semantics). I do not think ir-rx51.c is
> >> converted to DT, and also some of the API are alive just because of the
> >> continued OMAP3 legacy boot support. Guess, it is a just a question of
> >> not breaking existing API until we kill some of them.
> >
> > Right, ir-rx51 has not yet been converted to DT. Additionally it
> > depends !ARCH_MULTIPLATFORM, since it requires <plat/dmtimer.h>.
> >
> > I remember a patchset adding a omap-pwm driver using dmtimers. If
> > that was added to the kernel, ir-rx51 could probably be switched to
> > the PWM API + hrtimer API instead of depending on the dmtimer API.
> > At the end not much is gained, though, since then the PWM driver
> > would probably require the dmtimer API.
> 
> Tony has been talking about an HRTimer API for some time, but I guess it
> didn't happen yet. Until then, cleanups will have to continue to cope
> with legacy users.

Yeh.. Well meanwhile, here's how we can easily support hardware
timers for pwm in a non-intrusive way:

1. We add irqchip support to gptimer code

2. We create omap-gptimer-pwm.c and pass hwtimer_get/set type
   function pointers in pdata to avoid exposing the gptimer
   custom functions to drivers until we have a hwtimer framework

3. Then omap-gptimer-pwm.c does request_irq on the hardware timer(s)
   configured in the board specific dts file to get the right timer

4. Then ir-rx51 can just use he Linux PWM API and omap-gptimer-pwm.c

5. We get rid of the pdata when we have a generic API available

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