iio: accel: bmi088: Add support for bmi090l accel
authorLI Qingwu <Qing-wu.Li@leica-geosystems.com.cn>
Thu, 26 May 2022 13:33:58 +0000 (13:33 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 11 Jun 2022 13:35:28 +0000 (14:35 +0100)
Add supports for BMI090L, it's a high-performance Inertial
Measurement Unit, with an accelerometer and gyroscope.
The commit adds the accelerometer driver for the SPI interface.
The gyroscope part is already supported by the BMG160 driver.
Same as BMI088, BMI090L have the range of +/-3, 6, 12, and 24g.

Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Signed-off-by: LI Qingwu <Qing-wu.Li@leica-geosystems.com.cn>
Link: https://lore.kernel.org/r/20220526133359.2261928-6-Qing-wu.Li@leica-geosystems.com.cn
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/bmi088-accel-core.c
drivers/iio/accel/bmi088-accel-spi.c
drivers/iio/accel/bmi088-accel.h

index 977e1653472d0ffe1743cc6306efb4db20d8b400..89eeb36456b3f1044dafba8a61e95dcd0bee5e06 100644 (file)
@@ -479,6 +479,13 @@ static const struct bmi088_accel_chip_info bmi088_accel_chip_info_tbl[] = {
                .num_channels = ARRAY_SIZE(bmi088_accel_channels),
                .scale_table = {{0, 897}, {0, 1794}, {0, 3589}, {0, 7178}},
        },
+       [BOSCH_BMI090L] = {
+               .name = "bmi090l-accel",
+               .chip_id = 0x1A,
+               .channels = bmi088_accel_channels,
+               .num_channels = ARRAY_SIZE(bmi088_accel_channels),
+               .scale_table = {{0, 897}, {0, 1794}, {0, 3589}, {0, 7178}},
+       },
 };
 
 static const struct iio_info bmi088_accel_info = {
index 6a5d17ebcf6e079e7c8c846bb02fc5c3708c7d1d..9e2ed3bd5661975f026aa129770c0381c1b08631 100644 (file)
@@ -64,6 +64,7 @@ static void bmi088_accel_remove(struct spi_device *spi)
 static const struct of_device_id bmi088_of_match[] = {
        { .compatible = "bosch,bmi085-accel" },
        { .compatible = "bosch,bmi088-accel" },
+       { .compatible = "bosch,bmi090l-accel" },
        {}
 };
 MODULE_DEVICE_TABLE(of, bmi088_of_match);
@@ -71,6 +72,7 @@ MODULE_DEVICE_TABLE(of, bmi088_of_match);
 static const struct spi_device_id bmi088_accel_id[] = {
        {"bmi085-accel",  BOSCH_BMI085},
        {"bmi088-accel",  BOSCH_BMI088},
+       {"bmi090l-accel", BOSCH_BMI090L},
        {}
 };
 MODULE_DEVICE_TABLE(spi, bmi088_accel_id);
index 044999eb4fd60d4fc714e01f77c345312db07827..80cd396a3141636aa2ed9e03e841f85b279357b2 100644 (file)
@@ -11,6 +11,7 @@ struct device;
 enum bmi_device_type {
        BOSCH_BMI085,
        BOSCH_BMI088,
+       BOSCH_BMI090L,
        BOSCH_UNKNOWN,
 };