ARM: ux500: assign the sensor trigger IRQs
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 27 Apr 2015 09:28:33 +0000 (11:28 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 13 May 2015 10:22:18 +0000 (12:22 +0200)
The ST sensors on the Ux500 boards were not utilizing the IRQs
for data ready sample triggers. Enable this by assigning the
right GPIO lines and interrupt lines (when the GPIO lines are
used for IRQs) to the accelerometer, gyro and magnetometer
sensors.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/boot/dts/ste-href-tvk1281618.dtsi
arch/arm/boot/dts/ste-snowball.dts

index 0eeb4d4b52020613d9690de0b500e0321eca6336..0e1c96943d4795e7bd7355c03f5449ec71ae626a 100644 (file)
@@ -99,6 +99,9 @@
                                vddio-supply = <&db8500_vsmps2_reg>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&accel_tvk_mode>;
+                               interrupt-parent = <&gpio2>;
+                               interrupts = <18 IRQ_TYPE_EDGE_RISING>,
+                                            <19 IRQ_TYPE_EDGE_RISING>;
                        };
                        lsm303dlh@1e {
                                /* Magnetometer */
index 3844bbe61d716d60110adbbca141f53f8c35014a..d332ea34fd4d04b593473d6327919dd30fcf5ac8 100644 (file)
                                vddio-supply = <&db8500_vsmps2_reg>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&accel_snowball_mode>;
+                               interrupt-parent = <&gpio5>;
+                               interrupts = <3 IRQ_TYPE_EDGE_RISING>, /* INT1 */
+                                            <4 IRQ_TYPE_EDGE_RISING>; /* INT2 */
                        };
                        lsm303dlh@1e {
                                /* Magnetometer */
                                vddio-supply = <&db8500_vsmps2_reg>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&magneto_snowball_mode>;
+                               gpios = <&gpio5 5 0x4>; /* DRDY line */
                        };
                        l3g4200d@68 {
                                /* Gyroscope */
                                reg = <0x68>;
                                vdd-supply = <&ab8500_ldo_aux1_reg>;
                                vddio-supply = <&db8500_vsmps2_reg>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&gyro_snowball_mode>;
+                               gpios = <&gpio5 6 0x4>; /* DRDY line */
+                               interrupt-parent = <&gpio5>;
+                               interrupts = <9 IRQ_TYPE_EDGE_RISING>; /* INT1 */
                        };
                        lsp001wm@5c {
                                /* Barometer/pressure sensor */
                                        };
                                };
                        };
+                       gyro {
+                               gyro_snowball_mode: gyro_snowball {
+                                       snowball_cfg1 {
+                                               pins =
+                                               "GPIO166_A22", /* DRDY */
+                                               "GPIO169_D22"; /* INT */
+                                               ste,config = <&gpio_in_pu>;
+                                       };
+                               };
+                       };
                        magnetometer {
                                magneto_snowball_mode: magneto_snowball {
                                        snowball_cfg1 {