Skip to contentSkip to conversation

iio: add support for Bosch BMX055 IMU

PATCH Superseded Jun Yan 4 participants 16 messages Jan 29 – Feb 3

Subsystems (2)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Jun Yan

author
#0 lore raw

cover iio: add support for Bosch BMX055 IMU

The BMX055[1] is a Bosch 9-axis IMU integrating a 3-axis accelerometer, gyroscope and geomagnetic sensor.

It supports SPI/I²C interfaces, and existing compatible drivers can be reused by simply adding the corresponding device IDs as follows:

- accelerometer: bmc150-accel
- gyroscope: bmg160
- magnetometer: bmc150_magn

[1] https://cdn.sparkfun.com/assets/b/9/1/f/4/bst-bmx055-ds000_datasheet.pdf

Jun Yan (6):
dt-bindings: iio: accel: bosch,bma255: add bmx055 accel binding
iio: accel: bmc150-accel: add support for bmx055 accel
dt-bindings: iio: magnetometer: bosch,bmc150_magn: add bmx055
magnetometer binding
iio: magnetometer: bmc150_magn: add support for bmx055 magnetometer
dt-bindings: iio: gyroscope: bosch,bmg160: add bmx055 gyroscope
binding
iio: gyro: bmg160: add support for bmx055 gyroscope

 Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml | 1 +
 .../devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml       | 1 +
 .../bindings/iio/magnetometer/bosch,bmc150_magn.yaml          | 1 +
 drivers/iio/accel/Kconfig                                     | 3 ++-
 drivers/iio/accel/bmc150-accel-core.c                         | 2 +-
 drivers/iio/accel/bmc150-accel-i2c.c                          | 2 ++
 drivers/iio/accel/bmc150-accel-spi.c                          | 1 +
 drivers/iio/gyro/Kconfig                                      | 4 ++--
 drivers/iio/gyro/bmg160_i2c.c                                 | 2 ++
 drivers/iio/gyro/bmg160_spi.c                                 | 2 ++
 drivers/iio/magnetometer/Kconfig                              | 4 ++--
 drivers/iio/magnetometer/bmc150_magn_i2c.c                    | 3 +++
 drivers/iio/magnetometer/bmc150_magn_spi.c                    | 2 ++
 13 files changed, 22 insertions(+), 6 deletions(-)
Signature · 1 line
2.52.0
author
#1 lore raw

PATCH 1/6 dt-bindings: iio: accel: bosch,bma255: add bmx055 accel binding

Add the device-tree binding for the Bosch BMX055 IMU (accelerometer part).

Datasheet: https://cdn.sparkfun.com/assets/b/9/1/f/4/bst-bmx055-ds000_datasheet.pdf

---
 Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml +1 -0
index c1387e02eb82..78f043c38e98 100644
@@ -28,6 +28,7 @@ properties:
       - bosch,bmc150_accel
       - bosch,bmc156_accel
       - bosch,bmi055_accel
+      - bosch,bmx055_accel
 
       # bma180 driver in Linux
       - bosch,bma023
Signature · 1 line
2.52.0
maintainer
#2 lore raw

Re: [PATCH 1/6] dt-bindings: iio: accel: bosch,bma255: add bmx055 accel binding

Quoted 2 lines · Jun Yan

Add the device-tree binding for the Bosch BMX055 IMU (accelerometer part).

Please use get_maintainer.pl and send to the correct lists if you want this reviewed.

Quoted 22 lines

Datasheet: https://cdn.sparkfun.com/assets/b/9/1/f/4/bst-bmx055-ds000_datasheet.pdf

---
 Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml +1 -1
index c1387e02eb82..78f043c38e98 100644
@@ -28,6 +28,7 @@ properties:
       - bosch,bmc150_accel
       - bosch,bmc156_accel
       - bosch,bmi055_accel
+      - bosch,bmx055_accel
 
       # bma180 driver in Linux
       - bosch,bma023
--

2.52.0

author
#3 lore raw

Re: [PATCH 1/6] dt-bindings: iio: accel: bosch,bma255: add bmx055 accel binding

Quoted 8 lines
Quoted 2 lines · On Thu, Jan 29, 2026 at 1:13=E2=80=AFAM Jun Yan <[email protected]> =…

Add the device-tree binding for the Bosch BMX055 IMU (accelerometer part)=

.

Please use get_maintainer.pl and send to the correct lists if you want this reviewed.

Sorry, I will resend this patch to the corresponding maintainers at the appropriate time (either in V2 or as a resend).

Best Regards,

Jun Yan

Quoted 26 lines
Quoted 3 lines

Datasheet: https://cdn.sparkfun.com/assets/b/9/1/f/4/bst-bmx055-ds000_dat=

asheet.pdf

Review

Quoted 6 lines
---
 Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml | 1 +
 1 file changed, 1 insertion(+)
(quoted diff) +0 -0

l b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml

Quoted 14 lines

index c1387e02eb82..78f043c38e98 100644

Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml +1 -1
@@ -28,6 +28,7 @@ properties:
       - bosch,bmc150_accel
       - bosch,bmc156_accel
       - bosch,bmi055_accel
+      - bosch,bmx055_accel
 
       # bma180 driver in Linux
       - bosch,bma023
--

2.52.0

author
#4 lore raw

PATCH 2/6 iio: accel: bmc150-accel: add support for bmx055 accel

In reply to Jun Yan

Add the accelerometer driver for the BMX055 IMU, which is an integrated IMU including accelerometer, gyroscope and magnetometer.

The gyroscope part of the device can be supported by the bmg160 driver, while the magnetometer part can be supported by the bmc150_magn driver.

---
 drivers/iio/accel/Kconfig             | 3 ++-
 drivers/iio/accel/bmc150-accel-core.c | 2 +-
 drivers/iio/accel/bmc150-accel-i2c.c  | 2 ++
 drivers/iio/accel/bmc150-accel-spi.c  | 1 +
 4 files changed, 6 insertions(+), 2 deletions(-)
drivers/iio/accel/Kconfig +2 -1
index 3d3f8d8673dd..757b7e6bc51e 100644
@@ -281,11 +281,12 @@ config BMC150_ACCEL
 	help
 	  Say yes here to build support for the following Bosch accelerometers:
 	  BMA222, BMA222E, BMA250E, BMA253, BMA254, BMA255, BMA280, BMC150, BMC156
-	  BMI055.
+	  BMI055, BMX055.
 
 	  Note that some of these are combo modules:
 	    - BMC150/BMC156: accelerometer and magnetometer
 	    - BMI055: accelerometer and gyroscope
+	    - BMX055: accelerometer, gyroscope and magnetometer
 
 	  This driver is only implementing accelerometer part, which has
 	  its own address and register map.
drivers/iio/accel/bmc150-accel-core.c +1 -1
index 42ccf0316ce5..5f33273adc0d 100644
@@ -1132,7 +1132,7 @@ static const struct bmc150_accel_chip_info bmc150_accel_chip_info_tbl[] = {
 				 {306458, BMC150_ACCEL_DEF_RANGE_16G} },
 	},
 	{
-		.name = "BMA253/BMA254/BMA255/BMC150/BMC156/BMI055",
+		.name = "BMA253/BMA254/BMA255/BMC150/BMC156/BMI055/BMX055",
 		.chip_id = 0xFA,
 		.channels = bmc150_accel_channels,
 		.num_channels = ARRAY_SIZE(bmc150_accel_channels),
drivers/iio/accel/bmc150-accel-i2c.c +2 -0
index b4604f441553..6ba07c027b64 100644
@@ -255,6 +255,7 @@ static const struct i2c_device_id bmc150_accel_id[] = {
 	{"bmc150_accel"},
 	{"bmc156_accel", BOSCH_BMC156},
 	{"bmi055_accel"},
+	{"bmx055_accel"},
 	{ }
 };
 
@@ -271,6 +272,7 @@ static const struct of_device_id bmc150_accel_of_match[] = {
 	{ .compatible = "bosch,bmc150_accel" },
 	{ .compatible = "bosch,bmc156_accel" },
 	{ .compatible = "bosch,bmi055_accel" },
+	{ .compatible = "bosch,bmx055_accel" },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, bmc150_accel_of_match);
drivers/iio/accel/bmc150-accel-spi.c +1 -0
index 26ce50b37716..90d5be54d76e 100644
@@ -62,6 +62,7 @@ static const struct spi_device_id bmc150_accel_id[] = {
 	{"bmc150_accel"},
 	{"bmc156_accel", BOSCH_BMC156},
 	{"bmi055_accel"},
+	{"bmx055_accel"},
 	{ }
 };
 MODULE_DEVICE_TABLE(spi, bmc150_accel_id);
Signature · 1 line
2.52.0
#5 lore raw

Re: [PATCH 2/6] iio: accel: bmc150-accel: add support for bmx055 accel

Quoted 5 lines · Jun Yan

Add the accelerometer driver for the BMX055 IMU, which is an integrated IMU including accelerometer, gyroscope and magnetometer.

The gyroscope part of the device can be supported by the bmg160 driver, while the magnetometer part can be supported by the bmc150_magn driver.

...

drivers/iio/accel/Kconfig config BMC150_ACCEL · line 284

Quoted 5 lines
drivers/iio/accel/Kconfig +1 -1
 	help
 	  Say yes here to build support for the following Bosch accelerometers:
 	  BMA222, BMA222E, BMA250E, BMA253, BMA254, BMA255, BMA280, BMC150, BMC156
-	  BMI055.
+	  BMI055, BMX055.

Better to split this a bit. like:

- BMA222, BMA222E, BMA250E, BMA253, BMA254, BMA255, BMA280
- BMC150, BMC156
- BMI055
- BMX055

drivers/iio/accel/Kconfig config BMC150_ACCEL · line 289

Quoted 4 lines
drivers/iio/accel/Kconfig +1 -0
 	  Note that some of these are combo modules:
 	    - BMC150/BMC156: accelerometer and magnetometer
 	    - BMI055: accelerometer and gyroscope
+	    - BMX055: accelerometer, gyroscope and magnetometer

Mind an Oxford comma.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
author
#6 lore raw

PATCH 3/6 dt-bindings: iio: magnetometer: bosch,bmc150_magn: add bmx055 magnetometer binding

In reply to Jun Yan

Add the device-tree binding for the bosch BMX055 IMU (magnetometer part).

Datasheet: https://cdn.sparkfun.com/assets/b/9/1/f/4/bst-bmx055-ds000_datasheet.pdf

---
 .../devicetree/bindings/iio/magnetometer/bosch,bmc150_magn.yaml  | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/iio/magnetometer/bosch,bmc150_magn.yaml +1 -0
index a3838ab0c524..fced5630cec9 100644
@@ -26,6 +26,7 @@ properties:
       - bosch,bmc156_magn
       - bosch,bmm150
       - bosch,bmm150_magn
+      - bosch,bmx055_magn
 
   reg:
     maxItems: 1
Signature · 1 line
2.52.0
author
#7 lore raw

PATCH 4/6 iio: magnetometer: bmc150_magn: add support for bmx055 magnetometer

In reply to Jun Yan

Add the magnetometer driver for the BMX055 IMU, which is an integrated IMU including accelerometer, gyroscope and magnetometer.

The accelerometer part can be supported by the bmc150-accel driver, while the gyroscope part can be supported by the bmg160 driver.

---
 drivers/iio/magnetometer/Kconfig           | 4 ++--
 drivers/iio/magnetometer/bmc150_magn_i2c.c | 3 +++
 drivers/iio/magnetometer/bmc150_magn_spi.c | 2 ++
 3 files changed, 7 insertions(+), 2 deletions(-)
drivers/iio/magnetometer/Kconfig +2 -2
index 2b81b22c9550..efcd24ef10a3 100644
@@ -85,7 +85,7 @@ config BMC150_MAGN_I2C
 	  This driver is only implementing magnetometer part, which has
 	  its own address and register map.
 
-	  This driver also supports I2C Bosch BMC156 and BMM150 chips.
+	  This driver also supports I2C Bosch BMC156, BMM150 and BMX055 chips.
 	  To compile this driver as a module, choose M here: the module will be
 	  called bmc150_magn_i2c.
 
@@ -102,7 +102,7 @@ config BMC150_MAGN_SPI
 	  This driver is only implementing magnetometer part, which has
 	  its own address and register map.
 
-	  This driver also supports SPI Bosch BMC156 and BMM150 chips.
+	  This driver also supports SPI Bosch BMC156, BMM150 and BMX055 chips.
 	  To compile this driver as a module, choose M here: the module will be
 	  called bmc150_magn_spi.
 
drivers/iio/magnetometer/bmc150_magn_i2c.c +3 -0
index b110791f688a..95c1fbf38348 100644
@@ -4,6 +4,7 @@
  *  - BMC150
  *  - BMC156
  *  - BMM150
+ *  - BMX055
  *
  * Copyright (c) 2016, Intel Corporation.
  */
@@ -42,6 +43,7 @@ static const struct i2c_device_id bmc150_magn_i2c_id[] = {
 	{ "bmc150_magn" },
 	{ "bmc156_magn" },
 	{ "bmm150_magn" },
+	{ "bmx055_magn" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, bmc150_magn_i2c_id);
@@ -51,6 +53,7 @@ static const struct of_device_id bmc150_magn_of_match[] = {
 	{ .compatible = "bosch,bmc156_magn" },
 	{ .compatible = "bosch,bmm150_magn" }, /* deprecated compatible */
 	{ .compatible = "bosch,bmm150" },
+	{ .compatible = "bosch,bmx055_magn" },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, bmc150_magn_of_match);
drivers/iio/magnetometer/bmc150_magn_spi.c +2 -0
index 896b1d280731..44e82cbfa5a8 100644
@@ -4,6 +4,7 @@
  *  - BMC150
  *  - BMC156
  *  - BMM150
+ *  - BMX055
  *
  * Copyright (c) 2016, Intel Corporation.
  */
@@ -37,6 +38,7 @@ static const struct spi_device_id bmc150_magn_spi_id[] = {
 	{"bmc150_magn", 0},
 	{"bmc156_magn", 0},
 	{"bmm150_magn", 0},
+	{"bmx055_magn", 0},
 	{ }
 };
 MODULE_DEVICE_TABLE(spi, bmc150_magn_spi_id);
Signature · 1 line
2.52.0
#8 lore raw

Re: [PATCH 4/6] iio: magnetometer: bmc150_magn: add support for bmx055 magnetometer

Quoted 5 lines · Jun Yan

Add the magnetometer driver for the BMX055 IMU, which is an integrated IMU including accelerometer, gyroscope and magnetometer.

The accelerometer part can be supported by the bmc150-accel driver, while the gyroscope part can be supported by the bmg160 driver.

...

Quoted 6 lines
drivers/iio/magnetometer/Kconfig +1 -1
 	  This driver is only implementing magnetometer part, which has
 	  its own address and register map.
 
-	  This driver also supports I2C Bosch BMC156 and BMM150 chips.
+	  This driver also supports I2C Bosch BMC156, BMM150 and BMX055 chips.
 	  To compile this driver as a module, choose M here: the module will be

drivers/iio/magnetometer/Kconfig config BMC150_MAGN_I2C

Quoted 10 lines
drivers/iio/magnetometer/Kconfig +1 -1
 	  called bmc150_magn_i2c.
 
 
 	  This driver is only implementing magnetometer part, which has
 	  its own address and register map.
 
-	  This driver also supports SPI Bosch BMC156 and BMM150 chips.
+	  This driver also supports SPI Bosch BMC156, BMM150 and BMX055 chips.
 	  To compile this driver as a module, choose M here: the module will be
 	  called bmc150_magn_spi.

Mind an Oxford comma in both cases.

...

drivers/iio/magnetometer/bmc150_magn_spi.c static const struct spi_device_id bmc150_magn_spi_id[] = { · line 41

Quoted 4 lines
drivers/iio/magnetometer/bmc150_magn_spi.c +1 -0
 	{"bmc150_magn", 0},
 	{"bmc156_magn", 0},
 	{"bmm150_magn", 0},
+	{"bmx055_magn", 0},

At some point we need to get rid of ', 0' parts.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
author
#9 lore raw

PATCH 5/6 dt-bindings: iio: gyroscope: bosch,bmg160: add bmx055 gyroscope binding

In reply to Jun Yan

Add the device-tree binding for the bosch BMX055 IMU (gyroscope part).

Datasheet: https://cdn.sparkfun.com/assets/b/9/1/f/4/bst-bmx055-ds000_datasheet.pdf

---
 .../devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml          | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml +1 -0
index 3c6fe74af0b8..907fca4e5895 100644
@@ -15,6 +15,7 @@ properties:
       - bosch,bmg160
       - bosch,bmi055_gyro
       - bosch,bmi088_gyro
+      - bosch,bmx055_gyro
 
   reg:
     maxItems: 1
Signature · 1 line
2.52.0
maintainer
#10 lore raw

Re: [PATCH 5/6] dt-bindings: iio: gyroscope: bosch,bmg160: add bmx055 gyroscope binding

Quoted 4 lines · On Thu, 29 Jan 2026 15:11:01 +0800 Jun Yan <[email protected]> wrote:

Add the device-tree binding for the bosch BMX055 IMU (gyroscope part).

Datasheet: https://cdn.sparkfun.com/assets/b/9/1/f/4/bst-bmx055-ds000_datasheet.pdf

Hi Jun,

Is there anything stopping the use of fallback compatibles? It seems from the driver that even the chip ID matches.

That is, can we have
compatible = 'bosch,bmx055_gyro', 'bosch,bmg160'.

or something like that (I can't remember exact syntax) so that if we have a newer DT, it will work on an older kernel?

Thanks,

Jonathan

Quoted 16 lines
---
 .../devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml          | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml +1 -0
index 3c6fe74af0b8..907fca4e5895 100644
@@ -15,6 +15,7 @@ properties:
       - bosch,bmg160
       - bosch,bmi055_gyro
       - bosch,bmi088_gyro
+      - bosch,bmx055_gyro
 
   reg:
     maxItems: 1
author
#11 lore raw

Re: [PATCH 5/6] dt-bindings: iio: gyroscope: bosch,bmg160: add bmx055 gyroscope binding

Quoted 10 lines
Quoted 4 lines · On Thu, 29 Jan 2026 15:11:01 +0800 Jun Yan <[email protected]> wrote:

Add the device-tree binding for the bosch BMX055 IMU (gyroscope part).

Datasheet: https://cdn.sparkfun.com/assets/b/9/1/f/4/bst-bmx055-ds000_datasheet.pdf

Hi Jun,

Quoted 8 lines

Is there anything stopping the use of fallback compatibles? It seems from the driver that even the chip ID matches.

That is, can we have
compatible = 'bosch,bmx055_gyro', 'bosch,bmg160'.

or something like that (I can't remember exact syntax) so that if we have a newer DT, it will work on an older kernel?

Yes, using fallback compatibles is a better approach. So from my understanding, it should be modified to:

properties:
compatible:
oneOf:
- const: bosch,bmg160
- items:
- enum:
- bosch,bmg160
- bosch,bmi055_gyro
- bosch,bmi088_gyro
- bosch,bmx055_gyro
- const: bosch,bmg160

Or in a similar format?

And drop the change in the driver?

Best Regrads,

Jun Yan

Quoted 21 lines

Thanks,

Jonathan

Quoted 16 lines
---
 .../devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml          | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml +1 -0
index 3c6fe74af0b8..907fca4e5895 100644
@@ -15,6 +15,7 @@ properties:
       - bosch,bmg160
       - bosch,bmi055_gyro
       - bosch,bmi088_gyro
+      - bosch,bmx055_gyro
 
   reg:
     maxItems: 1
maintainer
#12 lore raw

Re: [PATCH 5/6] dt-bindings: iio: gyroscope: bosch,bmg160: add bmx055 gyroscope binding

Quoted 33 lines · On Fri, 30 Jan 2026 10:24:52 +0800 Jun Yan <[email protected]> wrote:
Quoted 10 lines
Quoted 4 lines · On Thu, 29 Jan 2026 15:11:01 +0800 Jun Yan <[email protected]> wrote:

Add the device-tree binding for the bosch BMX055 IMU (gyroscope part).

Datasheet: https://cdn.sparkfun.com/assets/b/9/1/f/4/bst-bmx055-ds000_datasheet.pdf

Hi Jun,

Quoted 8 lines

Is there anything stopping the use of fallback compatibles? It seems from the driver that even the chip ID matches.

That is, can we have
compatible = 'bosch,bmx055_gyro', 'bosch,bmg160'.

or something like that (I can't remember exact syntax) so that if we have a newer DT, it will work on an older kernel?

Yes, using fallback compatibles is a better approach. So from my understanding, it should be modified to:

properties:
compatible:
oneOf:
- const: bosch,bmg160
- items:
- enum:
- bosch,bmg160
- bosch,bmi055_gyro
- bosch,bmi088_gyro
- bosch,bmx055_gyro
- const: bosch,bmg160

Quoted 3 lines

Or in a similar format?

And drop the change in the driver?

Explicit matching can still be a good idea so we name things correctly etc, but this driver doesn't bother so indeed there shouldn't need to be a change.

Whether to add only the new device with the fallback is a question to the dt-maintainers. We'd also need to check if any DT files in tree need an update for that.

Jonathan

Quoted 28 lines

Best Regrads,

Jun Yan

Quoted 21 lines

Thanks,

Jonathan

Quoted 16 lines
---
 .../devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml          | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml +1 -0
index 3c6fe74af0b8..907fca4e5895 100644
@@ -15,6 +15,7 @@ properties:
       - bosch,bmg160
       - bosch,bmi055_gyro
       - bosch,bmi088_gyro
+      - bosch,bmx055_gyro
 
   reg:
     maxItems: 1  
author
#13 lore raw

Re: [PATCH 5/6] dt-bindings: iio: gyroscope: bosch,bmg160: add bmx055 gyroscope binding

Quoted 36 lines
Quoted 33 lines · On Fri, 30 Jan 2026 10:24:52 +0800 Jun Yan <[email protected]> wrote:
Quoted 10 lines
Quoted 4 lines · On Thu, 29 Jan 2026 15:11:01 +0800 Jun Yan <[email protected]> wrote:

Add the device-tree binding for the bosch BMX055 IMU (gyroscope part).

Datasheet: https://cdn.sparkfun.com/assets/b/9/1/f/4/bst-bmx055-ds000_datasheet.pdf

Hi Jun,

Quoted 8 lines

Is there anything stopping the use of fallback compatibles? It seems from the driver that even the chip ID matches.

That is, can we have
compatible = 'bosch,bmx055_gyro', 'bosch,bmg160'.

or something like that (I can't remember exact syntax) so that if we have a newer DT, it will work on an older kernel?

Yes, using fallback compatibles is a better approach. So from my understanding, it should be modified to:

properties:
compatible:
oneOf:
- const: bosch,bmg160
- items:
- enum:
- bosch,bmg160
- bosch,bmi055_gyro
- bosch,bmi088_gyro
- bosch,bmx055_gyro
- const: bosch,bmg160

Quoted 6 lines
Quoted 3 lines

Or in a similar format?

And drop the change in the driver?

Explicit matching can still be a good idea so we name things correctly etc, but this driver doesn't bother so indeed there shouldn't need to be a change.

Got it

Quoted 4 lines

Whether to add only the new device with the fallback is a question to the dt-maintainers. We'd also need to check if any DT files in tree need an update for that.

Alright, I'll redraft the patch and submit it to the corresponding dt-maintainer for review.

Best Regards,
Jun Yan

Quoted 31 lines

Jonathan

Quoted 28 lines

Best Regrads,

Jun Yan

Quoted 21 lines

Thanks,

Jonathan

Quoted 16 lines
---
 .../devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml          | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml +1 -0
index 3c6fe74af0b8..907fca4e5895 100644
@@ -15,6 +15,7 @@ properties:
       - bosch,bmg160
       - bosch,bmi055_gyro
       - bosch,bmi088_gyro
+      - bosch,bmx055_gyro
 
   reg:
     maxItems: 1  
author
#14 lore raw

PATCH 6/6 iio: gyro: bmg160: add support for bmx055 gyroscope

In reply to Jun Yan

Add the gyroscope driver for the BMX055 IMU, which is an integrated IMU including accelerometer, gyroscope and magnetometer.

The accelerometer can be supported by the bmc150-accel driver, while the magnetometer can be supported by the bmc150_magn driver.

---
 drivers/iio/gyro/Kconfig      | 4 ++--
 drivers/iio/gyro/bmg160_i2c.c | 2 ++
 drivers/iio/gyro/bmg160_spi.c | 2 ++
 3 files changed, 6 insertions(+), 2 deletions(-)
drivers/iio/gyro/Kconfig +2 -2
index 3e193ee0fb61..3a4caa8d238c 100644
@@ -72,8 +72,8 @@ config BMG160
 	select BMG160_SPI if (SPI)
 	help
 	  Say yes here to build support for BOSCH BMG160 Tri-axis Gyro Sensor
-	  driver connected via I2C or SPI. This driver also supports BMI055
-	  and BMI088 gyroscope.
+	  driver connected via I2C or SPI. This driver also supports BMI055,
+	  BMI088 and BMX055 gyroscope.
 
 	  This driver can also be built as a module.  If so, the module
 	  will be called bmg160_i2c or bmg160_spi.
drivers/iio/gyro/bmg160_i2c.c +2 -0
index 1fb8a7969c25..129d2da674ef 100644
@@ -50,6 +50,7 @@ static const struct i2c_device_id bmg160_i2c_id[] = {
 	{ "bmg160" },
 	{ "bmi055_gyro" },
 	{ "bmi088_gyro" },
+	{ "bmx055_gyro" },
 	{ }
 };
 
@@ -59,6 +60,7 @@ static const struct of_device_id bmg160_of_match[] = {
 	{ .compatible = "bosch,bmg160" },
 	{ .compatible = "bosch,bmi055_gyro" },
 	{ .compatible = "bosch,bmi088_gyro" },
+	{ .compatible = "bosch,bmx055_gyro" },
 	{ }
 };
 
drivers/iio/gyro/bmg160_spi.c +2 -0
index 6aecc5eb8347..ccf161f58f7a 100644
@@ -36,6 +36,7 @@ static const struct spi_device_id bmg160_spi_id[] = {
 	{"bmg160", 0},
 	{"bmi055_gyro", 0},
 	{"bmi088_gyro", 0},
+	{"bmx055_gyro", 0},
 	{ }
 };
 
@@ -45,6 +46,7 @@ static const struct of_device_id bmg160_of_match[] = {
 	{ .compatible = "bosch,bmg160" },
 	{ .compatible = "bosch,bmi055_gyro" },
 	{ .compatible = "bosch,bmi088_gyro" },
+	{ .compatible = "bosch,bmx055_gyro" },
 	{ }
 };
 
Signature · 1 line
2.52.0
#15 lore raw

Re: [PATCH 6/6] iio: gyro: bmg160: add support for bmx055 gyroscope

Quoted 5 lines · Jun Yan

Add the gyroscope driver for the BMX055 IMU, which is an integrated IMU including accelerometer, gyroscope and magnetometer.

The accelerometer can be supported by the bmc150-accel driver, while the magnetometer can be supported by the bmc150_magn driver.

Same comments as per previous reply.

Signature · 2 lines
With Best Regards,
Andy Shevchenko