public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: imu: st_lsm6dsx: fix FIFO threshold mask for LSM6DSM/LSM6DSL
@ 2018-03-30 18:43 Lorenzo Bianconi
  2018-04-08 15:49 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Lorenzo Bianconi @ 2018-03-30 18:43 UTC (permalink / raw)
  To: jic23; +Cc: linux-iio

According to the latest datasheet, LSM6DSM and LSM6DSL imu sensors
export GENMASK(10, 0) for FIFO threshold mask definition. Despite
that is not an actual issue since write on fifo_th register is protected
by max_fifo_size value, fix fifo_th and fifo_diff register definitions

Fixes: 290a6ce11d93 ("iio: imu: add support to lsm6dsx driver")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
---
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
index 8656d72ef4ee..50d6491df484 100644
--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
+++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
@@ -266,11 +266,11 @@ static const struct st_lsm6dsx_settings st_lsm6dsx_sensor_settings[] = {
 		.fifo_ops = {
 			.fifo_th = {
 				.addr = 0x06,
-				.mask = GENMASK(11, 0),
+				.mask = GENMASK(10, 0),
 			},
 			.fifo_diff = {
 				.addr = 0x3a,
-				.mask = GENMASK(11, 0),
+				.mask = GENMASK(10, 0),
 			},
 			.th_wl = 3, /* 1LSB = 2B */
 		},
-- 
2.16.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-04-08 15:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-30 18:43 [PATCH] iio: imu: st_lsm6dsx: fix FIFO threshold mask for LSM6DSM/LSM6DSL Lorenzo Bianconi
2018-04-08 15:49 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox