add support for LSM6DST
Subsystems (3)
Lorenzo Bianconi
maintainercover add support for LSM6DST
Add support for LSM6DST IMU mems sensor
https://www.st.com/resource/en/datasheet/lsm6dst.pdf
Lorenzo Bianconi (2):
iio: imu: st_lsm6dsx: add support to LSM6DST
dt-bindings: iio: imu: st_lsm6dsx: add lsm6dst device bindings
.../bindings/iio/imu/st_lsm6dsx.txt | 1 + drivers/iio/imu/st_lsm6dsx/Kconfig | 4 +- 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 | 207 +++++++++++++++++- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 5 + drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c | 5 + 7 files changed, 222 insertions(+), 4 deletions(-)
Signature · 1 line
2.26.2
Lorenzo Bianconi
maintainerPATCH 1/2 iio: imu: st_lsm6dsx: add support to LSM6DST
Add support to STM LSM6DST (acc + gyro) Mems sensor
https://www.st.com/resource/en/datasheet/lsm6dst.pdf
--- drivers/iio/imu/st_lsm6dsx/Kconfig | 4 +- 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 | 207 +++++++++++++++++- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 5 + drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c | 5 + 6 files changed, 221 insertions(+), 4 deletions(-)
drivers/iio/imu/st_lsm6dsx/Kconfig +2 -2
@@ -12,8 +12,8 @@ config IIO_ST_LSM6DSX Say yes here to build support for STMicroelectronics LSM6DSx imu sensor. Supported devices: lsm6ds3, lsm6ds3h, lsm6dsl, lsm6dsm, ism330dlc, lsm6dso, lsm6dsox, asm330lhh, lsm6dsr, lsm6ds3tr-c, - ism330dhcx, lsm6dsrx, lsm6ds0 and the accelerometer/gyroscope - of lsm9ds1. + ism330dhcx, lsm6dsrx, lsm6ds0, 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
@@ -28,6 +28,7 @@#define ST_LSM9DS1_DEV_NAME "lsm9ds1-imu"#define ST_LSM6DS0_DEV_NAME "lsm6ds0"#define ST_LSM6DSRX_DEV_NAME "lsm6dsrx" +#define ST_LSM6DST_DEV_NAME "lsm6dst"enum st_lsm6dsx_hw_id {ST_LSM6DS3_ID ,
@@ -44,6 +45,7 @@ enum st_lsm6dsx_hw_id {ST_LSM9DS1_ID ,ST_LSM6DS0_ID ,ST_LSM6DSRX_ID , +ST_LSM6DST_ID , ST_LSM6DSX_MAX_ID, };
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c +1 -1
@@ -14,7 +14,7 @@* (e.g. Gx, Gy, Gz, Ax, Ay, Az), then data are repeated depending on the * value of the decimation factor and ODR set for each FIFO data set. * -* LSM6DSO/LSM6DSOX/ASM330LHH/LSM6DSR/LSM6DSRX/ISM330DHCX: +* LSM6DSO/LSM6DSOX/ASM330LHH/LSM6DSR/LSM6DSRX/ISM330DHCX/LSM6DST: * 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 +206 -1
219 lines not on this page · raw message
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c +5 -0
@@ -94,6 +94,10 @@ static const struct of_device_id st_lsm6dsx_i2c_of_match[] = { .compatible = "st,lsm6dsrx", .data = (void *)ST_LSM6DSRX_ID, }, + { + .compatible = "st,lsm6dst", + .data = (void *)ST_LSM6DST_ID, + }, {}, };MODULE_DEVICE_TABLE (of, st_lsm6dsx_i2c_of_match);
@@ -113,6 +117,7 @@ static const struct i2c_device_id st_lsm6dsx_i2c_id_table[] = { { ST_LSM9DS1_DEV_NAME, ST_LSM9DS1_ID }, { ST_LSM6DS0_DEV_NAME, ST_LSM6DS0_ID }, { ST_LSM6DSRX_DEV_NAME, ST_LSM6DSRX_ID }, + { ST_LSM6DST_DEV_NAME, ST_LSM6DST_ID }, {}, };MODULE_DEVICE_TABLE (i2c, st_lsm6dsx_i2c_id_table);
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c +5 -0
@@ -94,6 +94,10 @@ static const struct of_device_id st_lsm6dsx_spi_of_match[] = { .compatible = "st,lsm6dsrx", .data = (void *)ST_LSM6DSRX_ID, }, + { + .compatible = "st,lsm6dst", + .data = (void *)ST_LSM6DST_ID, + }, {}, };MODULE_DEVICE_TABLE (of, st_lsm6dsx_spi_of_match);
@@ -113,6 +117,7 @@ static const struct spi_device_id st_lsm6dsx_spi_id_table[] = { { ST_LSM9DS1_DEV_NAME, ST_LSM9DS1_ID }, { ST_LSM6DS0_DEV_NAME, ST_LSM6DS0_ID }, { ST_LSM6DSRX_DEV_NAME, ST_LSM6DSRX_ID }, + { ST_LSM6DST_DEV_NAME, ST_LSM6DST_ID }, {}, };MODULE_DEVICE_TABLE (spi, st_lsm6dsx_spi_id_table);
Signature · 1 line
2.26.2
Lorenzo Bianconi
maintainerPATCH 2/2 dt-bindings: iio: imu: st_lsm6dsx: add lsm6dst device bindings
In reply to Lorenzo Bianconi--- Documentation/devicetree/bindings/iio/imu/st_lsm6dsx.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/iio/imu/st_lsm6dsx.txt +1 -0
@@ -16,6 +16,7 @@ Required properties: "st,lsm9ds1-imu" "st,lsm6ds0" "st,lsm6dsrx" + "st,lsm6dst" - reg: i2c address of the sensor / spi cs line Optional properties:
Signature · 1 line
2.26.2
Re: [PATCH 2/2] dt-bindings: iio: imu: st_lsm6dsx: add lsm6dst device bindings
Quoted 5 lines · Lorenzo Bianconi
Signed-off-by Lorenzo Bianconi <[email protected]>--- Documentation/devicetree/bindings/iio/imu/st_lsm6dsx.txt | 1 + 1 file changed, 1 insertion(+)
Jonathan Cameron
maintainerQuoted 7 lines · On Tue, 6 Oct 2020 14:07:40 +0200 Lorenzo Bianconi <[email protected]> wrote:
Add support for LSM6DST IMU mems sensor
https://www.st.com/resource/en/datasheet/lsm6dst.pdfLorenzo Bianconi (2):
iio: imu:st_lsm6dsx: add support to LSM6DST
dt-bindings: iio: imu:st_lsm6dsx: add lsm6dst device bindings
Quoted 9 lines
.../bindings/iio/imu/st_lsm6dsx.txt | 1 + drivers/iio/imu/st_lsm6dsx/Kconfig | 4 +- 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 | 207 +++++++++++++++++- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 5 + drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c | 5 + 7 files changed, 222 insertions(+), 4 deletions(-)
Applied to the togreg branch of iio.git and as normal pushed out as testing for the autobuilders to poke at it and see what we missed.
Thanks,
Jonathan