drivers: pinctrl sleep and idle states in the core
If a device have sleep and idle states in addition to the default state, look up these in the core and stash them in the pinctrl state container. Add accessor functions for pinctrl consumers to put the pins into "default", "sleep" and "idle" states passing nothing but the struct device * affected. Solution suggested by Kevin Hilman, Mark Brown and Dmitry Torokhov in response to a patch series from Hebbar Gururaja. Cc: Hebbar Gururaja <gururaja.hebbar@ti.com> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Stephen Warren <swarren@wwwdotorg.org> Acked-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Mark Brown <broonie@kernel.org> Reviewed-by: Kevin Hilman <khilman@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
7970cb770d
commit
14005ee270
4 changed files with 118 additions and 0 deletions
|
@ -28,6 +28,10 @@
|
|||
struct dev_pin_info {
|
||||
struct pinctrl *p;
|
||||
struct pinctrl_state *default_state;
|
||||
#ifdef CONFIG_PM
|
||||
struct pinctrl_state *sleep_state;
|
||||
struct pinctrl_state *idle_state;
|
||||
#endif
|
||||
};
|
||||
|
||||
extern int pinctrl_bind_pins(struct device *dev);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue