Hi, I have an lsm303dlhc chip with accelerometer and magnetometer sensors. I'm having difficulty getting the st_magn_i2c driver to work. I get this error message: iio iio:device0: DRDY on INT1 not available. st-magn-i2c: probe of 1-001e failed with error -22 This is my device tree fragment: fragment@0 { target = <&i2c_arm>; __overlay__ { #address-cells = <0x1>; #size-cells = <0x0>; status = "okay"; lsm303dlhc-magn@1e { compatible = "st,lsm303dlhc-magn"; reg = <0x1e>; status = "okay"; st,drdy-int-pin = <1>; }; }; }; I'm running kernel 3.18.11. The accelerometer driver works fine though. What am I doing wrong? Any help would be greatly appreciated. Thanks. Joo
To answer my own question in case someone else is facing the same problem. The driver that came with kernel 3.18 is broken. The driver assumes the magnetometer has a configurable DRDY interrupt when in fact it does not. To fix the problem, backport the st sensors iio drivers from kernel 4.2-rc2. Cheers, Joo.
participants (1)
-
Joo Aun Saw