Skip to content

Commit 9007a4f

Browse files
rvoell-7labnashif
authored andcommitted
sensor: lis2dw12: handle SENSOR_CHAN_ALL in sample_fetch callback
Handle `SENSOR_CHAN_ALL` case of the sample_fetch callback of the lis2dw12 driver. Without this, `sensor_sample_fetch()` does not work correctly for this device, e.g. rendering the rtio and the sensor shell unusable. Signed-off-by: Ruben Völl <ruben.voell@sevenlab.de>
1 parent f314560 commit 9007a4f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/sensor/st/lis2dw12/lis2dw12.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,10 @@ static int lis2dw12_sample_fetch(const struct device *dev,
408408
case SENSOR_CHAN_DIE_TEMP:
409409
lis2dw12_sample_fetch_temp(dev);
410410
break;
411+
case SENSOR_CHAN_ALL:
412+
lis2dw12_sample_fetch_accel(dev);
413+
lis2dw12_sample_fetch_temp(dev);
414+
break;
411415
default:
412416
LOG_DBG("Channel not supported");
413417
return -ENOTSUP;

0 commit comments

Comments
 (0)