ARM: dts: nomadik: add accelerometer IRQ and pin setting
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 2 Sep 2015 20:30:51 +0000 (22:30 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 14 Apr 2016 19:47:05 +0000 (21:47 +0200)
The LIS3LV02DL accelerometer on the Nomadik NHK15 can generate
IRQs by the DRDY line. Map this in the DTS file and set up the
pin as input to the SoC.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/boot/dts/ste-nomadik-nhk15.dts

index 4a21c64..d35aa88 100644 (file)
                                };
                        };
                };
+               lis3lv02dl {
+                       lis3lv02dl_nhk_mode: lis3lv02dl_nhk {
+                               nhk_cfg1 {
+                                       pins = "GPIO82_C10"; // IRQ line
+                                       ste,input = <0>;
+                               };
+                       };
+               };
        };
-
        src@101e0000 {
                /* These chrystal outputs are not used on this board */
                disable-sxtalo;
                lis3lv02dl@1d {
                        /* Accelerometer */
                        compatible = "st,lis3lv02dl-accel";
+                       interrupt-parent = <&gpio2>;
+                       interrupts = <18 IRQ_TYPE_EDGE_RISING>; // GPIO 82
+                       pinctrl-0 = <&lis3lv02dl_nhk_mode>;
+                       pinctrl-names = "default";
                        reg = <0x1d>;
                };
                stmpe0: stmpe2401@43 {