Skip to contentSkip to conversation

add support for LSM6DSO16IS

PATCH Applied Lorenzo Bianconi 3 participants 5 messages Nov 16, 2022 – Nov 23, 2022

Subsystems (3)
lore
Share & tools
lore

Lorenzo Bianconi

author maintainer
#0 lore raw

cover add support for LSM6DSO16IS

Add support for LSM6DSO16IS IMU mems sensor
https://www.st.com/resource/en/datasheet/lsm6dso16is.pdf

This series is based on the commit below:

commit 1adcc208048826635bcdabb03d0f40744fea512e

Author: Lorenzo Bianconi <[email protected]>
Date:   Mon Nov 14 10:25:34 2022 +0100

iio: imu: st_lsm6dsx: fix LSM6DSV sensor description

Lorenzo Bianconi (2):
iio: imu: st_lsm6dsx: add support to LSM6DSO16IS
dt-bindings: iio: imu: st_lsm6dsx: add lsm6dso16is

 .../bindings/iio/imu/st,lsm6dsx.yaml          |   1 +
 drivers/iio/imu/st_lsm6dsx/Kconfig            |   4 +-
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h       |   2 +
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c  | 128 +++++++++++++++++-
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c   |   5 +
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c   |   5 +
 6 files changed, 142 insertions(+), 3 deletions(-)
Signature · 1 line
2.38.1
author maintainer
#1 lore raw

PATCH 1/2 iio: imu: st_lsm6dsx: add support to LSM6DSO16IS

Add support to STM LSM6DSO16IS (accelerometer and gyroscope) Mems sensor.

Datasheet: https://www.st.com/resource/en/datasheet/lsm6dso16is.pdf

---
 drivers/iio/imu/st_lsm6dsx/Kconfig           |   4 +-
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h      |   2 +
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 128 ++++++++++++++++++-
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c  |   5 +
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c  |   5 +
 5 files changed, 141 insertions(+), 3 deletions(-)
drivers/iio/imu/st_lsm6dsx/Kconfig +2 -2
index 37d02e0fc227..0096035728cd 100644
@@ -13,8 +13,8 @@ config IIO_ST_LSM6DSX
 	  sensor. Supported devices: lsm6ds3, lsm6ds3h, lsm6dsl, lsm6dsm,
 	  ism330dlc, lsm6dso, lsm6dsox, asm330lhh, asm330lhhx, lsm6dsr,
 	  lsm6ds3tr-c, ism330dhcx, lsm6dsrx, lsm6ds0, lsm6dsop, lsm6dstx,
-	  lsm6dsv, lsm6dsv16x, the accelerometer/gyroscope of lsm9ds1
-	  and lsm6dst.
+	  lsm6dsv, lsm6dsv16x, lsm6dso16is, the accelerometer/gyroscope
+	  of lsm9ds1 and lsm6dst.
 
 	  To compile this driver as a module, choose M here: the module
 	  will be called st_lsm6dsx.
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h +2 -0
index 683cfadcf62e..abf14a2ce0e9 100644
@@ -35,6 +35,7 @@
 #define ST_LSM6DSTX_DEV_NAME	"lsm6dstx"
 #define ST_LSM6DSV_DEV_NAME	"lsm6dsv"
 #define ST_LSM6DSV16X_DEV_NAME	"lsm6dsv16x"
+#define ST_LSM6DSO16IS_DEV_NAME	"lsm6dso16is"
 
 enum st_lsm6dsx_hw_id {
 	ST_LSM6DS3_ID,
@@ -57,6 +58,7 @@ enum st_lsm6dsx_hw_id {
 	ST_LSM6DSTX_ID,
 	ST_LSM6DSV_ID,
 	ST_LSM6DSV16X_ID,
+	ST_LSM6DSO16IS_ID,
 	ST_LSM6DSX_MAX_ID,
 };
 
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +127 -1

140 lines not on this page · raw message

drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c +5 -0
index 0faf1b4c11af..d5929c6e4c5f 100644
@@ -117,6 +117,10 @@ static const struct of_device_id st_lsm6dsx_i2c_of_match[] = {
 		.compatible = "st,lsm6dsv16x",
 		.data = (void *)ST_LSM6DSV16X_ID,
 	},
+	{
+		.compatible = "st,lsm6dso16is",
+		.data = (void *)ST_LSM6DSO16IS_ID,
+	},
 	{},
 };
 MODULE_DEVICE_TABLE(of, st_lsm6dsx_i2c_of_match);
@@ -142,6 +146,7 @@ static const struct i2c_device_id st_lsm6dsx_i2c_id_table[] = {
 	{ ST_LSM6DSTX_DEV_NAME, ST_LSM6DSTX_ID },
 	{ ST_LSM6DSV_DEV_NAME, ST_LSM6DSV_ID },
 	{ ST_LSM6DSV16X_DEV_NAME, ST_LSM6DSV16X_ID },
+	{ ST_LSM6DSO16IS_DEV_NAME, ST_LSM6DSO16IS_ID },
 	{},
 };
 MODULE_DEVICE_TABLE(i2c, st_lsm6dsx_i2c_id_table);
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c +5 -0
index 57597aaa2a92..24d5e51a8662 100644
@@ -117,6 +117,10 @@ static const struct of_device_id st_lsm6dsx_spi_of_match[] = {
 		.compatible = "st,lsm6dsv16x",
 		.data = (void *)ST_LSM6DSV16X_ID,
 	},
+	{
+		.compatible = "st,lsm6dso16is",
+		.data = (void *)ST_LSM6DSO16IS_ID,
+	},
 	{},
 };
 MODULE_DEVICE_TABLE(of, st_lsm6dsx_spi_of_match);
@@ -142,6 +146,7 @@ static const struct spi_device_id st_lsm6dsx_spi_id_table[] = {
 	{ ST_LSM6DSTX_DEV_NAME, ST_LSM6DSTX_ID },
 	{ ST_LSM6DSV_DEV_NAME, ST_LSM6DSV_ID },
 	{ ST_LSM6DSV16X_DEV_NAME, ST_LSM6DSV16X_ID },
+	{ ST_LSM6DSO16IS_DEV_NAME, ST_LSM6DSO16IS_ID },
 	{},
 };
 MODULE_DEVICE_TABLE(spi, st_lsm6dsx_spi_id_table);
Signature · 1 line
2.38.1
author maintainer
#2 lore raw

PATCH 2/2 dt-bindings: iio: imu: st_lsm6dsx: add lsm6dso16is

In reply to Lorenzo Bianconi

Add device bindings for lsm6dso16is IMU sensor.

---
 Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml +1 -0
index 5933270799f5..07d5aee7e442 100644
@@ -33,6 +33,7 @@ properties:
           - st,lsm6dst
           - st,lsm6dsop
           - st,lsm6dsv
+          - st,lsm6dso16is
       - items:
           - const: st,asm330lhhx
           - const: st,lsm6dsr
Signature · 1 line
2.38.1
maintainer Applied
#4 lore raw
In reply to Lorenzo Bianconi
Quoted 4 lines · On Wed, 16 Nov 2022 14:40:02 +0100 Lorenzo Bianconi <[email protected]> wrote:

Add support for LSM6DSO16IS IMU mems sensor
https://www.st.com/resource/en/datasheet/lsm6dso16is.pdf

This series is based on the commit below:

Applied to the togreg branch of iio.git. I might push it briefly out as testing, but need to get this into linux-next asap given where we are in cycle so might skip that bit.

Thanks,

Jonathan

Quoted 19 lines

commit 1adcc208048826635bcdabb03d0f40744fea512e

Author: Lorenzo Bianconi <[email protected]>
Date:   Mon Nov 14 10:25:34 2022 +0100

iio: imu: st_lsm6dsx: fix LSM6DSV sensor description

Lorenzo Bianconi (2):
iio: imu: st_lsm6dsx: add support to LSM6DSO16IS
dt-bindings: iio: imu: st_lsm6dsx: add lsm6dso16is

 .../bindings/iio/imu/st,lsm6dsx.yaml          |   1 +
 drivers/iio/imu/st_lsm6dsx/Kconfig            |   4 +-
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h       |   2 +
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c  | 128 +++++++++++++++++-
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c   |   5 +
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c   |   5 +
 6 files changed, 142 insertions(+), 3 deletions(-)