iio: imu: st_lsm6dsx: fix FIFO_CTRL2 overwrite during watermark configuration
Fixes: 290a6ce11d
(iio: imu: add support to lsm6dsx driver)
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
Родитель
e83bb3e6f3
Коммит
6985bd5e21
|
@ -193,7 +193,7 @@ int st_lsm6dsx_update_watermark(struct st_lsm6dsx_sensor *sensor, u16 watermark)
|
|||
if (err < 0)
|
||||
goto out;
|
||||
|
||||
fifo_watermark = ((data & ~ST_LSM6DSX_FIFO_TH_MASK) << 8) |
|
||||
fifo_watermark = ((data << 8) & ~ST_LSM6DSX_FIFO_TH_MASK) |
|
||||
(fifo_watermark & ST_LSM6DSX_FIFO_TH_MASK);
|
||||
|
||||
wdata = cpu_to_le16(fifo_watermark);
|
||||
|
|
Загрузка…
Ссылка в новой задаче