Re: [PATCH] ARM: OMAP2+: mux: add support for PAD wakeup event handler

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

 



* Munegowda, Keshava <keshava_mgowda@xxxxxx> [120911 00:43]:
> On Tue, Sep 11, 2012 at 12:09 AM, Tony Lindgren <tony@xxxxxxxxxxx> wrote:
> > * Ruslan Bilovol <ruslan.bilovol@xxxxxx> [120910 03:39]:
> >> OMAP mux now parses active wakeup events from pad registers and calls
> >> corresponding handler, if handler is not registered - corresponding
> >> hwmod ISRs once a wakeup is detected.
> >> This is useful for cases when routing wakeups to corresponding hwmod
> >> ISRs complicates those ISRs handlers (for example, ISR handler may
> >> not know who the interrupt source is)
> >
> > The mux code in arch/arm/mach-omap2 will be going away and replaced
> > by device tree based pinctrl-single.
> 
> Thanks tony
>        when is this device tree based pinctrl-single will be available
> in mainline?

It is already merged during v3.6 merge window, please see:

drivers/pinctrl/pinctrl-single.c
Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt

For omap-serial, see the patch "serial: omap: Request pins using pinctrl
framework" in tty-next.

Then for setting up wake-up events, you can define alternative
named states, such as:

default: driver specific static pins that only get set once during the probe
active:  subset of driver specific dynamic pins that are remuxed for runtime
idle:    subset of driver specific dynamic pins that are remuxed for idle

Then just in the pinctrl using driver probe do:

foo->pins = pinctrl_get_select_default(&pdev->dev);
...
foo->pins_active = pinctrl_lookup_state(foo->pins, "active");
...
foo->pins_idle = pinctrl_lookup_state(foo->pins, PINCTRL_STATE_IDLE);
...

And then you can toggle the pin settings in foo_runtime_suspend and
resume:

if (foo->pins_idle) {
	int res;

	res = pinctrl_select_state(foo->pins, foo->pins_idle);
	...
}

I don't think we have anything available for handling the wake-up
events yet in the pinctrl framework, but that should be added in
a Linux generic way to pinctrl framework so drivers can set up
their wake-up handles. That we we don't end up patching a custom
framework that's going away.

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