OSDN Git Service

ARM: dts: am335x-icev2: Add nodes for gpio-decoder
authorVignesh R <vigneshr@ti.com>
Wed, 24 Aug 2016 07:58:59 +0000 (13:28 +0530)
committerTony Lindgren <tony@atomide.com>
Tue, 30 Aug 2016 18:44:16 +0000 (11:44 -0700)
AM335x ICE board has a rotary-switch connected to PCA9536 I2C GPIO
expander. The position of the rotary-switch is reflected by status of
GPIO lines. Add gpio-decoder node to read these GPIO line status via
gpio-decoder driver and report it as an input event to the system.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/boot/dts/am335x-icev2.dts

index bc0190e..426022e 100644 (file)
                        default-state = "off";
                };
        };
+       gpio-decoder {
+               compatible = "gpio-decoder";
+               gpios = <&pca9536 3 GPIO_ACTIVE_HIGH>,
+                       <&pca9536 2 GPIO_ACTIVE_HIGH>,
+                       <&pca9536 1 GPIO_ACTIVE_HIGH>,
+                       <&pca9536 0 GPIO_ACTIVE_HIGH>;
+               linux,axis = <0>; /* ABS_X */
+               decoder-max-value = <9>;
+       };
 };
 
 &am33xx_pinmux {