[07/12,v2] pinctrl: add sleep state definition

My dashboard
Submitter Linus Walleij
Subject [07/12,v2] pinctrl: add sleep state definition
Date May 11, 2012, 8:32 a.m.
List thread <1336725143-25563-1-git-send-email-linus.walleij@stericsson.com>
Project linux-kernel
State Accepted
Last updated May 11, 2012, 9:14 a.m.
Commit 65697e6b1a7d73d82d114377b448e89b9788e26b
Headers show

Comments

Linus Walleij - May 11, 2012, 8:32 a.m.
From: Linus Walleij <linus.walleij@linaro.org>

There is an IDLE definition in the pinctrl framework, but for
ux500 SLEEP is more apropriate.

I've added some comments on the semantics of the common states
so as to avoid misunderstandings.

ChangeLog v1->v2:
- Fixed terminology "on"->"into".

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 include/linux/pinctrl/pinctrl-state.h |   13 +++++++++++++
 1 file changed, 13 insertions(+)

Patch

diff --git a/include/linux/pinctrl/pinctrl-state.h b/include/linux/pinctrl/pinctrl-state.h
index 3920e28..634608dc 100644
--- a/include/linux/pinctrl/pinctrl-state.h
+++ b/include/linux/pinctrl/pinctrl-state.h
@@ -2,5 +2,18 @@ 
  * Standard pin control state definitions
  */
 
+/**
+ * @PINCTRL_STATE_DEFAULT: the state the pinctrl handle shall be put
+ *	into as default, usually this means the pins are up and ready to
+ *	be used by the device driver. This state is commonly used by
+ *	hogs to configure muxing and pins at boot.
+ * @PINCTRL_STATE_IDLE: the state the pinctrl handle shall be put into
+ *	when the pins are idle. Could typically be set from a
+ *	pm_runtime_suspend() operation.
+ * @PINCTRL_STATE_SLEEP: the state the pinctrl handle shall be put into
+ *	when the pins are sleeping. Could typically be set from a
+ *	common suspend() function.
+ */
 #define PINCTRL_STATE_DEFAULT "default"
 #define PINCTRL_STATE_IDLE "idle"
+#define PINCTRL_STATE_SLEEP "sleep"