add support for LSM6DSOP
Subsystems (3)
Lorenzo Bianconi
maintainercover add support for LSM6DSOP
Add support for LSM6DSOP IMU mems sensor
https://www.st.com/resource/en/datasheet/lsm6dsop.pdf
This series is based on "iio: imu: st_lsmdsx: compact st_lsm6dsx_sensor_settings table"
https://patchwork.kernel.org/project/linux-iio/list/?series=392743
Lorenzo Bianconi (2):
iio: imu: st_lsm6dsx: add support to LSM6DSOP
dt-bindings: iio: imu: st_lsm6dsx: add lsm6dsop device bindings
Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml | 1 + drivers/iio/imu/st_lsm6dsx/Kconfig | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 2 ++ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 6 +++++- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 5 +++++ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c | 5 +++++ 7 files changed, 20 insertions(+), 3 deletions(-)
Signature · 1 line
2.28.0
Lorenzo Bianconi
maintainerPATCH 1/2 iio: imu: st_lsm6dsx: add support to LSM6DSOP
Add support to STM LSM6DSOP (acc + gyro) Mems sensor
https://www.st.com/resource/en/datasheet/lsm6dsop.pdf
--- drivers/iio/imu/st_lsm6dsx/Kconfig | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 2 ++ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 6 +++++- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 5 +++++ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c | 5 +++++ 6 files changed, 19 insertions(+), 3 deletions(-)
drivers/iio/imu/st_lsm6dsx/Kconfig +1 -1
@@ -12,7 +12,7 @@ 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, the accelerometer/gyroscope + ism330dhcx, lsm6dsrx, lsm6ds0, lsm6dsop, the accelerometer/gyroscope of lsm9ds1 and lsm6dst. To compile this driver as a module, choose M here: the module
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h +2 -0
@@ -30,6 +30,7 @@#define ST_LSM6DS0_DEV_NAME "lsm6ds0"#define ST_LSM6DSRX_DEV_NAME "lsm6dsrx"#define ST_LSM6DST_DEV_NAME "lsm6dst" +#define ST_LSM6DSOP_DEV_NAME "lsm6dsop"enum st_lsm6dsx_hw_id {ST_LSM6DS3_ID ,
@@ -47,6 +48,7 @@ enum st_lsm6dsx_hw_id {ST_LSM6DS0_ID ,ST_LSM6DSRX_ID ,ST_LSM6DST_ID , +ST_LSM6DSOP_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/LSM6DST: +* LSM6DSO/LSM6DSOX/ASM330LHH/LSM6DSR/LSM6DSRX/ISM330DHCX/LSM6DST/LSM6DSOP: * 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 +5 -1
@@ -26,7 +26,7 @@* - Gyroscope supported full-scale [dps]: +-125/+-245/+-500/+-1000/+-2000 * - FIFO size: 4KB * -* - LSM6DSO/LSM6DSOX/ASM330LHH/LSM6DSR/ISM330DHCX/LSM6DST: +* - LSM6DSO/LSM6DSOX/ASM330LHH/LSM6DSR/ISM330DHCX/LSM6DST/LSM6DSOP: * - Accelerometer/Gyroscope supported ODR [Hz]: 13, 26, 52, 104, 208, 416, * 833 * - Accelerometer supported full-scale [g]: +-2/+-4/+-8/+-16
@@ -990,6 +990,10 @@ static const struct st_lsm6dsx_settings st_lsm6dsx_sensor_settings[] = { .hw_id = ST_ASM330LHH_ID, .name = ST_ASM330LHH_DEV_NAME, .wai = 0x6b, + }, { + .hw_id = ST_LSM6DSOP_ID, + .name = ST_LSM6DSOP_DEV_NAME, + .wai = 0x6c, }, }, .channels = {
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c +5 -0
@@ -98,6 +98,10 @@ static const struct of_device_id st_lsm6dsx_i2c_of_match[] = { .compatible = "st,lsm6dst", .data = (void *)ST_LSM6DST_ID, }, + { + .compatible = "st,lsm6dsop", + .data = (void *)ST_LSM6DSOP_ID, + }, {}, };MODULE_DEVICE_TABLE (of, st_lsm6dsx_i2c_of_match);
@@ -118,6 +122,7 @@ static const struct i2c_device_id st_lsm6dsx_i2c_id_table[] = { { ST_LSM6DS0_DEV_NAME, ST_LSM6DS0_ID }, { ST_LSM6DSRX_DEV_NAME, ST_LSM6DSRX_ID }, { ST_LSM6DST_DEV_NAME, ST_LSM6DST_ID }, + { ST_LSM6DSOP_DEV_NAME, ST_LSM6DSOP_ID }, {}, };MODULE_DEVICE_TABLE (i2c, st_lsm6dsx_i2c_id_table);
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c +5 -0
@@ -98,6 +98,10 @@ static const struct of_device_id st_lsm6dsx_spi_of_match[] = { .compatible = "st,lsm6dst", .data = (void *)ST_LSM6DST_ID, }, + { + .compatible = "st,lsm6dsop", + .data = (void *)ST_LSM6DSOP_ID, + }, {}, };MODULE_DEVICE_TABLE (of, st_lsm6dsx_spi_of_match);
@@ -118,6 +122,7 @@ static const struct spi_device_id st_lsm6dsx_spi_id_table[] = { { ST_LSM6DS0_DEV_NAME, ST_LSM6DS0_ID }, { ST_LSM6DSRX_DEV_NAME, ST_LSM6DSRX_ID }, { ST_LSM6DST_DEV_NAME, ST_LSM6DST_ID }, + { ST_LSM6DSOP_DEV_NAME, ST_LSM6DSOP_ID }, {}, };MODULE_DEVICE_TABLE (spi, st_lsm6dsx_spi_id_table);
Signature · 1 line
2.28.0
Lorenzo Bianconi
maintainerPATCH 2/2 dt-bindings: iio: imu: st_lsm6dsx: add lsm6dsop device bindings
In reply to Lorenzo Bianconi--- Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml +1 -0
@@ -30,6 +30,7 @@ properties: - st,lsm6ds0 - st,lsm6dsrx - st,lsm6dst + - st,lsm6dsop reg: maxItems: 1
Signature · 1 line
2.28.0
Jonathan Cameron
maintainerQuoted 11 lines · On Sun, 29 Nov 2020 10:43:05 +0100 Lorenzo Bianconi <[email protected]> wrote:
Add support for LSM6DSOP IMU mems sensor
https://www.st.com/resource/en/datasheet/lsm6dsop.pdfThis series is based on "iio: imu:
st_lsmdsx: compactst_lsm6dsx_sensor_settingstable"
https://patchwork.kernel.org/project/linux-iio/list/?series=392743Lorenzo Bianconi (2):
iio: imu:st_lsm6dsx: add support to LSM6DSOP
dt-bindings: iio: imu:st_lsm6dsx: add lsm6dsop device bindings
Quoted 9 lines
Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml | 1 + drivers/iio/imu/st_lsm6dsx/Kconfig | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 2 ++ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 6 +++++- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 5 +++++ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c | 5 +++++ 7 files changed, 20 insertions(+), 3 deletions(-)
Series applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to do work their magic.
Thanks,
Jonathan