ARM: dts: ux500: use the GPIO DT header

Use the <dt-bindings/gpio/gpio.h> header instead of using
hardcoded values for the GPIO flags. Eradicate the totally
bogus "0x4" flag used and set that to GPIO_ACTIVE_HIGH as is
proper, switch the inverted card detect on the Snowball to
flag using GPIO_ACTIVE_LOW instead of using the MMC-specific
inversion flag.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Linus Walleij 2016-03-24 15:29:30 +01:00
parent f55532a0c0
commit 1b1e8e024b
7 changed files with 22 additions and 22 deletions

View file

@ -49,7 +49,7 @@
cap-mmc-highspeed; cap-mmc-highspeed;
vmmc-supply = <&ab8500_ldo_aux3_reg>; vmmc-supply = <&ab8500_ldo_aux3_reg>;
cd-gpios = <&gpio7 6 0x4>; // 230 cd-gpios = <&gpio7 6 GPIO_ACTIVE_HIGH>; // 230
cd-inverted; cd-inverted;
status = "okay"; status = "okay";

View file

@ -12,6 +12,7 @@
#include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/mfd/dbx500-prcmu.h> #include <dt-bindings/mfd/dbx500-prcmu.h>
#include <dt-bindings/arm/ux500_pm_domains.h> #include <dt-bindings/arm/ux500_pm_domains.h>
#include <dt-bindings/gpio/gpio.h>
#include "skeleton.dtsi" #include "skeleton.dtsi"
/ { / {

View file

@ -22,13 +22,13 @@
button@139 { button@139 {
/* Proximity sensor */ /* Proximity sensor */
gpios = <&gpio6 25 0x4>; gpios = <&gpio6 25 GPIO_ACTIVE_HIGH>;
linux,code = <11>; /* SW_FRONT_PROXIMITY */ linux,code = <11>; /* SW_FRONT_PROXIMITY */
label = "SFH7741 Proximity Sensor"; label = "SFH7741 Proximity Sensor";
}; };
button@145 { button@145 {
/* Hall sensor */ /* Hall sensor */
gpios = <&gpio4 17 0x4>; gpios = <&gpio4 17 GPIO_ACTIVE_HIGH>;
linux,code = <0>; /* SW_LID */ linux,code = <0>; /* SW_LID */
label = "HED54XXU11 Hall Effect Sensor"; label = "HED54XXU11 Hall Effect Sensor";
}; };

View file

@ -24,13 +24,13 @@
button@139 { button@139 {
/* Proximity sensor */ /* Proximity sensor */
gpios = <&gpio6 25 0x4>; gpios = <&gpio6 25 GPIO_ACTIVE_HIGH>;
linux,code = <11>; /* SW_FRONT_PROXIMITY */ linux,code = <11>; /* SW_FRONT_PROXIMITY */
label = "SFH7741 Proximity Sensor"; label = "SFH7741 Proximity Sensor";
}; };
button@145 { button@145 {
/* Hall sensor */ /* Hall sensor */
gpios = <&gpio4 17 0x4>; gpios = <&gpio4 17 GPIO_ACTIVE_HIGH>;
linux,code = <0>; /* SW_LID */ linux,code = <0>; /* SW_LID */
label = "HED54XXU11 Hall Effect Sensor"; label = "HED54XXU11 Hall Effect Sensor";
}; };

View file

@ -18,7 +18,7 @@
/ { / {
gpio_keys { gpio_keys {
button@1 { button@1 {
gpios = <&tc3589x_gpio 7 0x4>; gpios = <&tc3589x_gpio 7 GPIO_ACTIVE_HIGH>;
}; };
}; };
@ -68,12 +68,12 @@
// External Micro SD slot // External Micro SD slot
sdi0_per1@80126000 { sdi0_per1@80126000 {
cd-gpios = <&tc3589x_gpio 3 0x4>; cd-gpios = <&tc3589x_gpio 3 GPIO_ACTIVE_HIGH>;
}; };
vmmci: regulator-gpio { vmmci: regulator-gpio {
gpios = <&tc3589x_gpio 18 0x4>; gpios = <&tc3589x_gpio 18 GPIO_ACTIVE_HIGH>;
enable-gpio = <&tc3589x_gpio 17 0x4>; enable-gpio = <&tc3589x_gpio 17 GPIO_ACTIVE_HIGH>;
}; };
pinctrl { pinctrl {

View file

@ -20,12 +20,12 @@
soc { soc {
// External Micro SD slot // External Micro SD slot
sdi0_per1@80126000 { sdi0_per1@80126000 {
cd-gpios = <&gpio2 31 0x4>; // 95 cd-gpios = <&gpio2 31 GPIO_ACTIVE_HIGH>; // 95
}; };
vmmci: regulator-gpio { vmmci: regulator-gpio {
gpios = <&gpio0 5 0x4>; gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
enable-gpio = <&gpio5 9 0x4>; enable-gpio = <&gpio5 9 GPIO_ACTIVE_HIGH>;
}; };
pinctrl { pinctrl {

View file

@ -50,35 +50,35 @@
wakeup-source; wakeup-source;
linux,code = <2>; linux,code = <2>;
label = "userpb"; label = "userpb";
gpios = <&gpio1 0 0x4>; gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
}; };
button@2 { button@2 {
debounce_interval = <50>; debounce_interval = <50>;
wakeup-source; wakeup-source;
linux,code = <3>; linux,code = <3>;
label = "extkb1"; label = "extkb1";
gpios = <&gpio4 23 0x4>; gpios = <&gpio4 23 GPIO_ACTIVE_HIGH>;
}; };
button@3 { button@3 {
debounce_interval = <50>; debounce_interval = <50>;
wakeup-source; wakeup-source;
linux,code = <4>; linux,code = <4>;
label = "extkb2"; label = "extkb2";
gpios = <&gpio4 24 0x4>; gpios = <&gpio4 24 GPIO_ACTIVE_HIGH>;
}; };
button@4 { button@4 {
debounce_interval = <50>; debounce_interval = <50>;
wakeup-source; wakeup-source;
linux,code = <5>; linux,code = <5>;
label = "extkb3"; label = "extkb3";
gpios = <&gpio5 1 0x4>; gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>;
}; };
button@5 { button@5 {
debounce_interval = <50>; debounce_interval = <50>;
wakeup-source; wakeup-source;
linux,code = <6>; linux,code = <6>;
label = "extkb4"; label = "extkb4";
gpios = <&gpio5 2 0x4>; gpios = <&gpio5 2 GPIO_ACTIVE_HIGH>;
}; };
}; };
@ -88,7 +88,7 @@
pinctrl-0 = <&gpioled_snowball_mode>; pinctrl-0 = <&gpioled_snowball_mode>;
used-led { used-led {
label = "user_led"; label = "user_led";
gpios = <&gpio4 14 0x4>; gpios = <&gpio4 14 GPIO_ACTIVE_HIGH>;
default-state = "on"; default-state = "on";
linux,default-trigger = "heartbeat"; linux,default-trigger = "heartbeat";
}; };
@ -155,8 +155,8 @@
vmmci: regulator-gpio { vmmci: regulator-gpio {
compatible = "regulator-gpio"; compatible = "regulator-gpio";
gpios = <&gpio7 4 0x4>; gpios = <&gpio7 4 GPIO_ACTIVE_HIGH>;
enable-gpio = <&gpio6 25 0x4>; enable-gpio = <&gpio6 25 GPIO_ACTIVE_HIGH>;
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <2900000>; regulator-max-microvolt = <2900000>;
@ -182,8 +182,7 @@
pinctrl-0 = <&sdi0_default_mode>; pinctrl-0 = <&sdi0_default_mode>;
pinctrl-1 = <&sdi0_sleep_mode>; pinctrl-1 = <&sdi0_sleep_mode>;
cd-gpios = <&gpio6 26 0x4>; // 218 cd-gpios = <&gpio6 26 GPIO_ACTIVE_LOW>; // 218
cd-inverted;
status = "okay"; status = "okay";
}; };