Skip to contentSkip to conversation

dt-bindings: iio: bmc150_magn: Document and fix missing compatibles

PATCH In review Krzysztof Kozlowski 3 participants 4 messages Jun 29, 2020 – Jul 13, 2020

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

PATCH v3 1/2 dt-bindings: iio: bmc150_magn: Document and fix missing compatibles

The driver supports also BMC156B and BMM150B. Add existing compatibles marking the BMM150B one as deprecated (due to redundant suffix "_magn" because the device unlike two others is a magnetometer only). Introduce a new, proper compatible for the deprecated one.

---

Changes since v2:
1. Add compatible only for bmm150.

Changes since v1:
1. Mark old compatibles as deprecated, add new one.

---
 .../devicetree/bindings/iio/magnetometer/bmc150_magn.txt    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/iio/magnetometer/bmc150_magn.txt +5 -1
index fd5fca90fb39..22912e43b60c 100644
@@ -4,7 +4,11 @@ http://ae-bst.resource.bosch.com/media/products/dokumente/bmc150/BST-BMC150-DS00
 
 Required properties:
 
-  - compatible : should be "bosch,bmc150_magn"
+  - compatible : should be one of:
+                 "bosch,bmc150_magn"
+                 "bosch,bmc156_magn"
+                 "bosch,bmm150"
+                 "bosch,bmm150_magn" (DEPRECATED, use bosch,bmm150)
   - reg : the I2C address of the magnetometer
 
 Optional properties:
Signature · 1 line
2.17.1
#1 lore raw

PATCH v3 2/2 iio: magnetometer: bmc150: Add proper compatible for BMM150

The compatible for BMM150 should not have "_magn" suffix because, unlike two other Bosch devices, it is only a magnetometer.

---

Changes since v2:
1. Add compatible only for bmm150.

Changes since v1:
1. New patch.

---
 drivers/iio/magnetometer/bmc150_magn_i2c.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/iio/magnetometer/bmc150_magn_i2c.c +2 -1
index fb45b63c56e4..876e96005e33 100644
@@ -58,7 +58,8 @@ MODULE_DEVICE_TABLE(i2c, bmc150_magn_i2c_id);
 static const struct of_device_id bmc150_magn_of_match[] = {
 	{ .compatible = "bosch,bmc150_magn" },
 	{ .compatible = "bosch,bmc156_magn" },
-	{ .compatible = "bosch,bmm150_magn" },
+	{ .compatible = "bosch,bmm150_magn" }, /* deprecated compatible */
+	{ .compatible = "bosch,bmm150" },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, bmc150_magn_of_match);
Signature · 1 line
2.17.1
maintainer
#2 lore raw

Re: [PATCH v3 2/2] iio: magnetometer: bmc150: Add proper compatible for BMM150

Quoted 4 lines · On Mon, 29 Jun 2020 12:05:37 +0200 Krzysztof Kozlowski <[email protected]> wrote:

The compatible for BMM150 should not have "_magn" suffix because, unlike two other Bosch devices, it is only a magnetometer.

Both applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to ignore them.

Thanks for tidying this up.

Jonathan

Quoted 26 lines

---

Changes since v2:
1. Add compatible only for bmm150.

Changes since v1:
1. New patch.

---
 drivers/iio/magnetometer/bmc150_magn_i2c.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/iio/magnetometer/bmc150_magn_i2c.c +2 -1
index fb45b63c56e4..876e96005e33 100644
@@ -58,7 +58,8 @@ MODULE_DEVICE_TABLE(i2c, bmc150_magn_i2c_id);
 static const struct of_device_id bmc150_magn_of_match[] = {
 	{ .compatible = "bosch,bmc150_magn" },
 	{ .compatible = "bosch,bmc156_magn" },
-	{ .compatible = "bosch,bmm150_magn" },
+	{ .compatible = "bosch,bmm150_magn" }, /* deprecated compatible */
+	{ .compatible = "bosch,bmm150" },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, bmc150_magn_of_match);
maintainer Reviewed-by on v3 1/2
#3 lore raw
In reply to Krzysztof Kozlowski
Quoted 9 lines · Krzysztof Kozlowski

The driver supports also BMC156B and BMM150B. Add existing compatibles marking the BMM150B one as deprecated (due to redundant suffix "_magn" because the device unlike two others is a magnetometer only). Introduce a new, proper compatible for the deprecated one.

---

Quoted 9 lines

Changes since v2:
1. Add compatible only for bmm150.

Changes since v1:
1. Mark old compatibles as deprecated, add new one.

---
 .../devicetree/bindings/iio/magnetometer/bmc150_magn.txt    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)