add support for LSM6DSV
Subsystems (3)
Lorenzo Bianconi
maintainercover add support for LSM6DSV
Add support for LSM6DSV IMU MEMS sensor
https://www.st.com/resource/en/datasheet/lsm6dsv.pdf
Lorenzo Bianconi (2):
iio: imu: st_lsm6dsx: add support to LSM6DSV
dt-bindings: iio: imu: st_lsm6dsx: add lsm6dsv device bindings
.../bindings/iio/imu/st,lsm6dsx.yaml | 1 + drivers/iio/imu/st_lsm6dsx/Kconfig | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 2 + .../iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 202 ++++++++++++++++++ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 5 + drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c | 5 + 7 files changed, 217 insertions(+), 2 deletions(-)
Signature · 1 line
2.38.1
Lorenzo Bianconi
maintainerPATCH 1/2 iio: imu: st_lsm6dsx: add support to LSM6DSV
Add support to STM LSM6DSV (accelerometer and gyroscope) Mems sensor.
Datasheet: https://www.st.com/resource/en/datasheet/lsm6dsv.pdf
Signed-off-by Lorenzo Bianconi <[email protected]>
--- drivers/iio/imu/st_lsm6dsx/Kconfig | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 2 + .../iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 202 ++++++++++++++++++ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 5 + drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c | 5 + 6 files changed, 216 insertions(+), 2 deletions(-)
drivers/iio/imu/st_lsm6dsx/Kconfig +1 -1
@@ -13,7 +13,7 @@ config IIO_ST_LSM6DSX sensor. Supported devices: lsm6ds3, lsm6ds3h, lsm6dsl, lsm6dsm, ism330dlc, lsm6dso, lsm6dsox, asm330lhh, asm330lhhx, lsm6dsr, lsm6ds3tr-c, ism330dhcx, lsm6dsrx, lsm6ds0, lsm6dsop, lsm6dstx, - the accelerometer/gyroscope of lsm9ds1 and lsm6dst. + lsm6dsv, 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
@@ -33,6 +33,7 @@#define ST_LSM6DSOP_DEV_NAME "lsm6dsop"#define ST_ASM330LHHX_DEV_NAME "asm330lhhx"#define ST_LSM6DSTX_DEV_NAME "lsm6dstx" +#define ST_LSM6DSV_DEV_NAME "lsm6dsv"enum st_lsm6dsx_hw_id {ST_LSM6DS3_ID ,
@@ -53,6 +54,7 @@ enum st_lsm6dsx_hw_id {ST_LSM6DSOP_ID ,ST_ASM330LHHX_ID ,ST_LSM6DSTX_ID , +ST_LSM6DSV_ID , ST_LSM6DSX_MAX_ID, };
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c +1 -1
@@ -15,7 +15,7 @@* value of the decimation factor and ODR set for each FIFO data set. * * LSM6DSO/LSM6DSOX/ASM330LHH/ASM330LHHX/LSM6DSR/LSM6DSRX/ISM330DHCX/ -* LSM6DST/LSM6DSOP/LSM6DSTX: +* LSM6DST/LSM6DSOP/LSM6DSTX/LSM6DSV: * The FIFO buffer can be configured to store data from gyroscope and * accelerometer. Each sample is queued with a tag (1B) indicating data * source (gyroscope, accelerometer, hw timer).
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +202 -0
208 lines not on this page · raw message
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c +5 -0
@@ -109,6 +109,10 @@ static const struct of_device_id st_lsm6dsx_i2c_of_match[] = { .compatible = "st,lsm6dstx", .data = (void *)ST_LSM6DSTX_ID, }, + { + .compatible = "st,lsm6dsv", + .data = (void *)ST_LSM6DSV_ID, + }, {}, };MODULE_DEVICE_TABLE (of, st_lsm6dsx_i2c_of_match);
@@ -132,6 +136,7 @@ static const struct i2c_device_id st_lsm6dsx_i2c_id_table[] = { { ST_LSM6DSOP_DEV_NAME, ST_LSM6DSOP_ID }, { ST_ASM330LHHX_DEV_NAME, ST_ASM330LHHX_ID }, { ST_LSM6DSTX_DEV_NAME, ST_LSM6DSTX_ID }, + { ST_LSM6DSV_DEV_NAME, ST_LSM6DSV_ID }, {}, };MODULE_DEVICE_TABLE (i2c, st_lsm6dsx_i2c_id_table);
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c +5 -0
@@ -109,6 +109,10 @@ static const struct of_device_id st_lsm6dsx_spi_of_match[] = { .compatible = "st,lsm6dstx", .data = (void *)ST_LSM6DSTX_ID, }, + { + .compatible = "st,lsm6dsv", + .data = (void *)ST_LSM6DSV_ID, + }, {}, };MODULE_DEVICE_TABLE (of, st_lsm6dsx_spi_of_match);
@@ -132,6 +136,7 @@ static const struct spi_device_id st_lsm6dsx_spi_id_table[] = { { ST_LSM6DSOP_DEV_NAME, ST_LSM6DSOP_ID }, { ST_ASM330LHHX_DEV_NAME, ST_ASM330LHHX_ID }, { ST_LSM6DSTX_DEV_NAME, ST_LSM6DSTX_ID }, + { ST_LSM6DSV_DEV_NAME, ST_LSM6DSV_ID }, {}, };MODULE_DEVICE_TABLE (spi, st_lsm6dsx_spi_id_table);
Signature · 1 line
2.38.1
Lorenzo Bianconi
maintainerPATCH 2/2 dt-bindings: iio: imu: st_lsm6dsx: add lsm6dsv device bindings
In reply to Lorenzo BianconiIntroduce device bindings for LSM6DSV IMU sensor.
Signed-off-by Lorenzo Bianconi <[email protected]>
--- Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml +1 -0
@@ -32,6 +32,7 @@ properties: - st,lsm6dsrx - st,lsm6dst - st,lsm6dsop + - st,lsm6dsv - items: - const: st,asm330lhhx - const: st,lsm6dsr
Signature · 1 line
2.38.1
Re: [PATCH 2/2] dt-bindings: iio: imu: st_lsm6dsx: add lsm6dsv device bindings
Quoted 7 lines · Lorenzo Bianconi
Introduce device bindings for LSM6DSV IMU sensor.
Signed-off-by Lorenzo Bianconi <[email protected]>--- Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml | 1 + 1 file changed, 1 insertion(+)
Acked-by Rob Herring <[email protected]>