Re: [PATCH 00/11] drivers: Add Pinctrl PM support

From: Linus Walleij
Date: Wed Jun 05 2013 - 08:41:34 EST


On Tue, Jun 4, 2013 at 8:15 PM, Kevin Hilman <khilman@xxxxxxxxxx> wrote:
> [Me]
>> I think this will save a *lot* of identical code in all the
>> drivers, that will just have to call
>> pinctrl_select_pm_sleep(), pinctrl_select_pm_default()
>> pinctrl_select_pm_idle() instead of all the complex code.
>>
>> This is what I planned to do but never got around to.
>
> What about taking it one tiny step further, and having it done by the PM
> core itself?

Maybe so, but atleast currently we cannot do it
exclusively in the PM core.

We have things like what you find in
drivers/tty/serial/amba-pl011.c
where pl011_shutdown() puts the pins into sleep mode
on unused TTYs.

The same applies to any unused ports like that, we're
thinking of a way to sleep pins for unused I2C hosts
for example.

And that works fine also on systems that does not
enable CONFIG_PM (so the pin control subsystem
is completely orthogonal). But maybe that is
complicating things? I was just thinking it was a bit
thick to require everything and its dog to make a
complete transition to (runtime)PM.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/