ARM: dts: rockchip: clean up gpio-keys nodes
authorHeiko Stuebner <heiko@sntech.de>
Thu, 31 Mar 2016 18:24:29 +0000 (20:24 +0200)
committerHeiko Stuebner <heiko@sntech.de>
Wed, 6 Apr 2016 23:13:10 +0000 (16:13 -0700)
Drop superfluous #address-cells and #size-cells, rename
key-nodes to individual names and also use the key constants
intead of numbers.

Reported-by: Julien Chauveau <chauveau.julien@gmail.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Rob Herring <robh@kernel.org>
arch/arm/boot/dts/rk3066a-bqcurie2.dts
arch/arm/boot/dts/rk3066a-rayeager.dts
arch/arm/boot/dts/rk3188-radxarock.dts
arch/arm/boot/dts/rk3288-evb.dtsi
arch/arm/boot/dts/rk3288-firefly.dtsi
arch/arm/boot/dts/rk3288-popmetal.dts
arch/arm/boot/dts/rk3288-r89.dts

index 6d2a5b3..bc674ee 100644 (file)
@@ -42,6 +42,7 @@
  */
 
 /dts-v1/;
+#include <dt-bindings/input/input.h>
 #include "rk3066a.dtsi"
 
 / {
 
        gpio-keys {
                compatible = "gpio-keys";
-               #address-cells = <1>;
-               #size-cells = <0>;
                autorepeat;
 
-               button@0 {
+               power {
                        gpios = <&gpio6 2 GPIO_ACTIVE_LOW>; /* GPIO6_A2 */
-                       linux,code = <116>;
+                       linux,code = <KEY_POWER>;
                        label = "GPIO Key Power";
                        linux,input-type = <1>;
                        wakeup-source;
                        debounce-interval = <100>;
                };
-               button@1 {
+               volume-down {
                        gpios = <&gpio4 21 GPIO_ACTIVE_LOW>; /* GPIO4_C5 */
-                       linux,code = <104>;
+                       linux,code = <KEY_VOLUMEDOWN>;
                        label = "GPIO Key Vol-";
                        linux,input-type = <1>;
                        debounce-interval = <100>;
index 3a5989b..6e7f218 100644 (file)
@@ -41,6 +41,7 @@
  */
 
 /dts-v1/;
+#include <dt-bindings/input/input.h>
 #include "rk3066a.dtsi"
 
 / {
 
        keys: gpio-keys {
                compatible = "gpio-keys";
-               #address-cells = <1>;
-               #size-cells = <0>;
 
-               button@0 {
+               power {
                        wakeup-source;
                        gpios = <&gpio6 2 GPIO_ACTIVE_LOW>;
                        label = "GPIO Power";
-                       linux,code = <116>;
+                       linux,code = <KEY_POWER>;
                        pinctrl-names = "default";
                        pinctrl-0 = <&pwr_key>;
                };
index 0b6924c..1da46d1 100644 (file)
@@ -41,6 +41,7 @@
  */
 
 /dts-v1/;
+#include <dt-bindings/input/input.h>
 #include "rk3188.dtsi"
 
 / {
 
        gpio-keys {
                compatible = "gpio-keys";
-               #address-cells = <1>;
-               #size-cells = <0>;
                autorepeat;
 
-               button@0 {
+               power {
                        gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
-                       linux,code = <116>;
+                       linux,code = <KEY_POWER>;
                        label = "GPIO Key Power";
                        linux,input-type = <1>;
                        wakeup-source;
index 3ccd8f3..963365d 100644 (file)
@@ -38,6 +38,7 @@
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include <dt-bindings/input/input.h>
 #include <dt-bindings/pwm/pwm.h>
 #include "rk3288.dtsi"
 
 
        gpio-keys {
                compatible = "gpio-keys";
-               #address-cells = <1>;
-               #size-cells = <0>;
                autorepeat;
 
                pinctrl-names = "default";
                pinctrl-0 = <&pwrbtn>;
 
-               button@0 {
+               power {
                        gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
-                       linux,code = <116>;
+                       linux,code = <KEY_POWER>;
                        label = "GPIO Key Power";
                        linux,input-type = <1>;
                        wakeup-source;
index 5f06d8c..d6cf9ad 100644 (file)
@@ -40,6 +40,7 @@
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include <dt-bindings/input/input.h>
 #include "rk3288.dtsi"
 
 / {
 
        keys: gpio-keys {
                compatible = "gpio-keys";
-               #address-cells = <1>;
-               #size-cells = <0>;
 
-               button@0 {
+               power {
                        wakeup-source;
                        gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
                        label = "GPIO Power";
-                       linux,code = <116>;
+                       linux,code = <KEY_POWER>;
                        pinctrl-names = "default";
                        pinctrl-0 = <&pwr_key>;
                };
index eb77276..720717b 100644 (file)
@@ -41,7 +41,7 @@
  */
 
 /dts-v1/;
-
+#include <dt-bindings/input/input.h>
 #include "rk3288.dtsi"
 
 / {
 
        gpio-keys {
                compatible = "gpio-keys";
-               #address-cells = <1>;
-               #size-cells = <0>;
                autorepeat;
 
                pinctrl-names = "default";
                pinctrl-0 = <&pwrbtn>;
 
-               button@0 {
+               power {
                        gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
-                       linux,code = <116>;
+                       linux,code = <KEY_POWER>;
                        label = "GPIO Key Power";
                        linux,input-type = <1>;
                        wakeup-source;
index 510a1d0..4b8a8ad 100644 (file)
@@ -41,6 +41,7 @@
  */
 
 /dts-v1/;
+#include <dt-bindings/input/input.h>
 #include <dt-bindings/pwm/pwm.h>
 #include "rk3288.dtsi"
 
 
        gpio-keys {
                compatible = "gpio-keys";
-               #address-cells = <1>;
-               #size-cells = <0>;
                autorepeat;
 
                pinctrl-names = "default";
                pinctrl-0 = <&pwrbtn>;
 
-               button@0 {
+               power {
                        gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
-                       linux,code = <116>;
+                       linux,code = <KEY_POWER>;
                        label = "GPIO Key Power";
                        linux,input-type = <1>;
                        wakeup-source;