Skip to contentSkip to conversation

dt-bindings: iio: accel: bma255: Fix bmc150/bmi055 compatible

PATCH Applied Stephan Gerhold 5 participants 8 messages Dec 2, 2020 – Jan 15, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: iio: accel: bma255: Fix bmc150/bmi055 compatible

The bmc150-accel-i2c.c driver has an "_accel" suffix for the compatibles of BMC150 and BMI055. This is necessary because BMC150 contains both accelerometer (bosch,bmc150_accel) and magnetometer (bosch,bmc150_magn) and therefore "bosch,bmc150" would be ambiguous.

However, the binding documentation suggests using "bosch,bmc150". Add the "_accel" suffix for BMC150 and BMI055 so the binding docs match what is expected by the driver.

Cc Linus Walleij <[email protected]>
Fixes 496a39526fce8 ("iio: accel: bmc150-accel: Add DT bindings")
---
 Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml +2 -2
index 6eef3480ea8f..c2efbb813ca2 100644
@@ -16,8 +16,8 @@ description:
 properties:
   compatible:
     enum:
-      - bosch,bmc150
-      - bosch,bmi055
+      - bosch,bmc150_accel
+      - bosch,bmi055_accel
       - bosch,bma255
       - bosch,bma250e
       - bosch,bma222
Signature · 1 line
2.29.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Stephan Gerhold

The bmc150-accel-i2c.c driver has an "_accel" suffix for the compatibles of BMC150 and BMI055. This is necessary because BMC150 contains both accelerometer (bosch,bmc150_accel) and magnetometer (bosch,bmc150_magn) and therefore "bosch,bmc150" would be ambiguous.

Quoted 7 lines

However, the binding documentation suggests using "bosch,bmc150". Add the "_accel" suffix for BMC150 and BMI055 so the binding docs match what is expected by the driver.

Cc Linus Walleij <[email protected]>
Fixes 496a39526fce8 ("iio: accel: bmc150-accel: Add DT bindings")

I see this pattern elsewhere so by tradition:

I suppose this is one of those situations where the two parts of the component are on the same physical I2C bus, and phsycially inside the same package, but accessed at two different I2C addresses?

These components are kind of ambiguous by nature. Technically both devices could have the same compatible (by the label on the package) but then we would need some other property on the node to say which compatible is for which part of the component, so tagging on "_function" like bmc150_accel and bmc150_magn is one way to solve this, and I don't know anything better.

Yours,
Linus Walleij

#2 lore raw
Quoted 15 lines · Linus Walleij
Quoted 5 lines · Stephan Gerhold

The bmc150-accel-i2c.c driver has an "_accel" suffix for the compatibles of BMC150 and BMI055. This is necessary because BMC150 contains both accelerometer (bosch,bmc150_accel) and magnetometer (bosch,bmc150_magn) and therefore "bosch,bmc150" would be ambiguous.

Quoted 7 lines

However, the binding documentation suggests using "bosch,bmc150". Add the "_accel" suffix for BMC150 and BMI055 so the binding docs match what is expected by the driver.

Cc Linus Walleij <[email protected]>
Fixes 496a39526fce8 ("iio: accel: bmc150-accel: Add DT bindings")
Quoted 7 lines

I see this pattern elsewhere so by tradition:

I suppose this is one of those situations where the two parts of the component are on the same physical I2C bus, and phsycially inside the same package, but accessed at two different I2C addresses?

Yep, it looks like this (from arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi):

&blsp_i2c2 {
	status = "okay";

	accelerometer@10 {
		compatible = "bosch,bmc150_accel";
		reg = <0x10>;
		interrupt-parent = <&msmgpio>;
		interrupts = <115 IRQ_TYPE_EDGE_RISING>;
	};

	magnetometer@12 {
		compatible = "bosch,bmc150_magn";
		reg = <0x12>;
	};
};

They look pretty much like separate components in the device tree.

Quoted 7 lines

These components are kind of ambiguous by nature. Technically both devices could have the same compatible (by the label on the package) but then we would need some other property on the node to say which compatible is for which part of the component, so tagging on "_function" like bmc150_accel and bmc150_magn is one way to solve this, and I don't know anything better.

The _accel and _magn compatibles are also actively used already, so unless there is a significantly better option I think it's better to keep existing uses working.

Thanks!
Stephan

maintainer Reviewed-by on v1 1/1
#3 lore raw
In reply to Stephan Gerhold
Quoted 9 lines · Stephan Gerhold

The bmc150-accel-i2c.c driver has an "_accel" suffix for the compatibles of BMC150 and BMI055. This is necessary because BMC150 contains both accelerometer (bosch,bmc150_accel) and magnetometer (bosch,bmc150_magn) and therefore "bosch,bmc150" would be ambiguous.

However, the binding documentation suggests using "bosch,bmc150". Add the "_accel" suffix for BMC150 and BMI055 so the binding docs match what is expected by the driver.

Quoted 7 lines
Cc Linus Walleij <[email protected]>
Fixes 496a39526fce8 ("iio: accel: bmc150-accel: Add DT bindings")
---
 Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
maintainer Applied
#4 lore raw
Quoted 18 lines · On Wed, 9 Dec 2020 12:17:39 -0600 Rob Herring <[email protected]> wrote:
Quoted 9 lines · Stephan Gerhold

The bmc150-accel-i2c.c driver has an "_accel" suffix for the compatibles of BMC150 and BMI055. This is necessary because BMC150 contains both accelerometer (bosch,bmc150_accel) and magnetometer (bosch,bmc150_magn) and therefore "bosch,bmc150" would be ambiguous.

However, the binding documentation suggests using "bosch,bmc150". Add the "_accel" suffix for BMC150 and BMI055 so the binding docs match what is expected by the driver.

Quoted 7 lines
Cc Linus Walleij <[email protected]>
Fixes 496a39526fce8 ("iio: accel: bmc150-accel: Add DT bindings")
---
 Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 1 line

Applied to the fixes-togreg branch of iio.git which is now based on stuff queued up for the merge window. I'll send a pull not long after rc1.

Thanks,

Jonathan

maintainer
#5 lore raw
Quoted 21 lines · On Sun, 13 Dec 2020 13:25:14 +0000 Jonathan Cameron <[email protected]> wrote:
Quoted 18 lines · On Wed, 9 Dec 2020 12:17:39 -0600 Rob Herring <[email protected]> wrote:
Quoted 16 lines · Stephan Gerhold

The bmc150-accel-i2c.c driver has an "_accel" suffix for the compatibles of BMC150 and BMI055. This is necessary because BMC150 contains both accelerometer (bosch,bmc150_accel) and magnetometer (bosch,bmc150_magn) and therefore "bosch,bmc150" would be ambiguous.

However, the binding documentation suggests using "bosch,bmc150". Add the "_accel" suffix for BMC150 and BMI055 so the binding docs match what is expected by the driver.

Cc Linus Walleij <[email protected]>
Fixes 496a39526fce8 ("iio: accel: bmc150-accel: Add DT bindings")
---
 Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 4 lines
Quoted 1 line

Applied to the fixes-togreg branch of iio.git which is now based on stuff queued up for the merge window. I'll send a pull not long after rc1.

Not sure why, but the Fixes tag above is invalid.

As a result I need to rebase this branch anyway so I've also brought it forward to staging/staging-linus as of today.

Hopefully I'll get pull request out tomorrow. Sorry for the delay!

Jonathan

Quoted 5 lines

Thanks,

Jonathan

#6 lore raw
Quoted 24 lines · Jonathan Cameron
Quoted 21 lines · On Sun, 13 Dec 2020 13:25:14 +0000 Jonathan Cameron <[email protected]> wrote:
Quoted 18 lines · On Wed, 9 Dec 2020 12:17:39 -0600 Rob Herring <[email protected]> wrote:
Quoted 16 lines · Stephan Gerhold

The bmc150-accel-i2c.c driver has an "_accel" suffix for the compatibles of BMC150 and BMI055. This is necessary because BMC150 contains both accelerometer (bosch,bmc150_accel) and magnetometer (bosch,bmc150_magn) and therefore "bosch,bmc150" would be ambiguous.

However, the binding documentation suggests using "bosch,bmc150". Add the "_accel" suffix for BMC150 and BMI055 so the binding docs match what is expected by the driver.

Cc Linus Walleij <[email protected]>
Fixes 496a39526fce8 ("iio: accel: bmc150-accel: Add DT bindings")
---
 Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Applied to the fixes-togreg branch of iio.git which is now based on stuff queued up for the merge window. I'll send a pull not long after rc1.

Not sure why, but the Fixes tag above is invalid.

I think we can call this a "race condition" :)

I sent the patch on Dec 02 and you rebased the patch on Dec 03 for "iio-for-5.11b-take2" (because some sign offs were missing there). My patch simply refers to the old commit hash.

Stephan

#7 lore raw
Quoted 33 lines · On Fri, 15 Jan 2021 09:37:42 +0100 Stephan Gerhold <[email protected]> wrote:
Quoted 24 lines · Jonathan Cameron
Quoted 21 lines · On Sun, 13 Dec 2020 13:25:14 +0000 Jonathan Cameron <[email protected]> wrote:
Quoted 18 lines · On Wed, 9 Dec 2020 12:17:39 -0600 Rob Herring <[email protected]> wrote:
Quoted 16 lines · Stephan Gerhold

The bmc150-accel-i2c.c driver has an "_accel" suffix for the compatibles of BMC150 and BMI055. This is necessary because BMC150 contains both accelerometer (bosch,bmc150_accel) and magnetometer (bosch,bmc150_magn) and therefore "bosch,bmc150" would be ambiguous.

However, the binding documentation suggests using "bosch,bmc150". Add the "_accel" suffix for BMC150 and BMI055 so the binding docs match what is expected by the driver.

Cc Linus Walleij <[email protected]>
Fixes 496a39526fce8 ("iio: accel: bmc150-accel: Add DT bindings")
---
 Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Applied to the fixes-togreg branch of iio.git which is now based on stuff queued up for the merge window. I'll send a pull not long after rc1.

Not sure why, but the Fixes tag above is invalid.

Quoted 7 lines

I think we can call this a "race condition" :)

I sent the patch on Dec 02 and you rebased the patch on Dec 03 for "iio-for-5.11b-take2" (because some sign offs were missing there). My patch simply refers to the old commit hash.

Stephan

That would do it! :)

I suspected as much but was being lazy so didn't bother looking :)

Jonathan