[alsa-devel] Is that reasonable to support pinctrl PM in ASoC core?

Linus Walleij linus.walleij at linaro.org
Thu Oct 24 15:19:03 CEST 2013


On Thu, Oct 24, 2013 at 1:52 PM, Mark Brown <broonie at kernel.org> wrote:
> On Thu, Oct 24, 2013 at 07:07:43PM +0800, Nicolin Chen wrote:
>
>> And I think this pinctrl PM might be also beneficial to cpu dai drivers
>> since they might have actual pins, and they can hypnotize/wake them up
>> along with runtime PM:
>
> I think you're right that this is a useful and obvious feature but the
> question I have is that since the standard implementation is going to be
> to do the pinctrl calls in lockstep with the runtime PM handling and
> since this is likely to be the same for pretty much any subsystem might
> it be better to add the hooks at the runtime PM level rather than in the
> subsystem?  Or perhaps we should just add them in subsystems and then
> once some reasonable number of subsystems have done this then pull it
> into the PM core?

This makes a lot of sense, the only problem I have traditionally had
with this is that there exist cases where you want to put pinctrl
handles to sleep or idle aside from runtime PM.

For example:

- UARTs disabled from userspace shall have their pins put to
  sleep (see drivers/tty/serial/uart-pl011.c)

- I2C or SPI hosts with no devices connected to them should be
  nailed to sleep. (It's not possible to detect an unused I2C or SPI
  host today, but a feature we should add.)

Maybe the right way to do these is also to use runtime_pm*,
but the thing is that today these things are done also when
CONFIG_PM_RUNTIME is not set. Which is something you
might sometimes want.

Or not? Should we say that unless you have
CONFIG_PM_RUNTIME you don't deserve saving these
microamps anyway?

Yours,
Linus Walleij


More information about the Alsa-devel mailing list