Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: ux500: Assign proper sensor IRQs for Snowball

The Snowball gyro and magnetometer DRDY (data ready) lines are used
as interrupt triggers by the IIO subsystem, triggering new data
retrieveal on edges on this signal. Thus assign them as the primary
interrupt in the device tree. The "other interrupt" coming out of
the sensors is for alarms and similar complex events, the DRDY is
for periodic measures, which is what we want.

After this the generic_buffer tool from IIO tools gives a nice
stream of readings after enabling the desired channels in sysfs.

Cc: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

+4 -3
+4 -3
arch/arm/boot/dts/ste-snowball.dts
··· 281 281 vddio-supply = <&db8500_vsmps2_reg>; 282 282 pinctrl-names = "default"; 283 283 pinctrl-0 = <&magneto_snowball_mode>; 284 - gpios = <&gpio5 5 0x4>; /* DRDY line */ 284 + interrupt-parent = <&gpio5>; 285 + interrupts = <5 IRQ_TYPE_EDGE_RISING>; /* DRDY line */ 285 286 }; 286 287 l3g4200d@68 { 287 288 /* Gyroscope */ ··· 293 292 vddio-supply = <&db8500_vsmps2_reg>; 294 293 pinctrl-names = "default"; 295 294 pinctrl-0 = <&gyro_snowball_mode>; 296 - gpios = <&gpio5 6 0x4>; /* DRDY line */ 297 295 interrupt-parent = <&gpio5>; 298 - interrupts = <9 IRQ_TYPE_EDGE_RISING>; /* INT1 */ 296 + interrupts = <6 IRQ_TYPE_EDGE_RISING>, /* DRDY line */ 297 + <9 IRQ_TYPE_EDGE_RISING>; /* INT1 */ 299 298 }; 300 299 lsp001wm@5c { 301 300 /* Barometer/pressure sensor */