ARM: dts: Add utility macro to define pin sleep states for exynos4x12-pinctrl
authorTomasz Figa <t.figa@samsung.com>
Tue, 23 Sep 2014 16:19:58 +0000 (01:19 +0900)
committerKukjin Kim <kgene.kim@samsung.com>
Mon, 20 Oct 2014 15:12:41 +0000 (00:12 +0900)
This patch adds a convenient macro which constructs an Exynos pinctrl
pinconf node containing properties needed to configure sleep state of
given pin with given parameters. It will be used by further patch which
adds a large number of sleep states for pins that need such
configuration on certain boards.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/boot/dts/exynos4x12-pinctrl.dtsi

index 0865a2e..c141931 100644 (file)
  * published by the Free Software Foundation.
 */
 
+#define PIN_PULL_NONE          0
+#define PIN_PULL_DOWN          1
+#define PIN_PULL_UP            3
+
+#define PIN_PDN_OUT0           0
+#define PIN_PDN_OUT1           1
+#define PIN_PDN_INPUT          2
+#define PIN_PDN_PREV           3
+
+#define PIN_SLP(_pin, _mode, _pull)                            \
+       _pin {                                                  \
+               samsung,pins = #_pin;                           \
+               samsung,pin-con-pdn = <PIN_PDN_ ##_mode>;       \
+               samsung,pin-pud-pdn = <PIN_PULL_ ##_pull>;      \
+       }
+
 / {
        pinctrl@11400000 {
                gpa0: gpa0 {