lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87k3m92148.fsf@linaro.org>
Date:	Tue, 04 Jun 2013 11:15:51 -0700
From:	Kevin Hilman <khilman@...aro.org>
To:	Linus Walleij <linus.walleij@...aro.org>
Cc:	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Hebbar Gururaja <gururaja.hebbar@...com>,
	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <rob.herring@...xeda.com>,
	"davinci-linux-open-source\@linux.davincidsp.com" 
	<davinci-linux-open-source@...ux.davincidsp.com>,
	"devicetree-discuss\@lists.ozlabs.org" 
	<devicetree-discuss@...ts.ozlabs.org>,
	"linux-arm-kernel\@lists.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	Russell King - ARM Linux <linux@....linux.org.uk>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
	Vaibhav Bedia <vaibhav.bedia@...com>, sudhakar.raj@...com
Subject: Re: [PATCH 00/11] drivers: Add Pinctrl PM support

Hi Linus,

Linus Walleij <linus.walleij@...aro.org> writes:

> On Fri, May 31, 2013 at 7:04 PM, Dmitry Torokhov
> <dmitry.torokhov@...il.com> wrote:
>
>> As with the original introduction of pinctrl states my question is: "Can
>> all of this be handled in the driver/bus core instead of adding a lot
>> of boilerplate code to the individual drivers".
>
> It can. Per the suggestion in 2/11:
>
> - Adding pins_sleep and pins_idle to struct dev_pin_info
>   in include/linux/pinctrl/devinfo.h
>
> - Modify drivers/base/pinctrl.c to optionally look up
>   sleep and idle states, you can make that code
>   #ifdef CONFIG_PM I think.
>
> - Add something like static inline functions to
>   include/linux/pinctrl/consumer.h
>   with names like pinctrl_select_pm_idle(struct device *)
>   pinctrl_select_pm_sleep(struct device *) to switch states
>   using the device core containers, and includes
>   checking IS_ERR() on the handles etc.
>
> 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?

Seems like something that should just be done as part of runtime PM
transitions and the suspend/resume process.

Kevin

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ