summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAdvait Dhamorikar <advaitd@mechasystems.com>2026-04-07 12:50:59 +0530
committerJonathan Cameron <jic23@kernel.org>2026-05-15 12:01:38 +0100
commit49f79cd28f1e3333cbe0d616ce59ead0b24bf34e (patch)
tree6da71b77ca8ff1fb0bd249d72ff0362f755a5ad7 /scripts
parenta093999355084bdbfe6e97f1dd232e58a1525f0b (diff)
iio: magnetometer: st_magn: fix default DRDY pin selection for LIS2MDL
The device tree binding for st,lis2mdl does not support st,drdy-int-pin property. However, when no platform data is provided and the property is absent, the driver falls back to default_magn_pdata which hardcodes drdy_int_pin = 2. This causes `st_sensors_set_drdy_int_pin` to fail with -EINVAL because the LIS2MDL sensor settings have no INT2 DRDY mask defined. Fix this by checking the sensor's INT2 DRDY mask availability at probe time and selecting the appropriate default pin. Sensors that do not support INT2 DRDY will default to INT1, while all others retain the existing default of INT2. Fixes: 38934daf7b5c ("iio: magnetometer: st_magn: Provide default platform data") Signed-off-by: Advait Dhamorikar <advaitd@mechasystems.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions