diff mbox series

[v3,1/2] dt-bindings: iio: bmc150_magn: Document and fix missing compatibles

Message ID 20200629100537.20365-1-krzk@kernel.org
State Not Applicable, archived
Headers show
Series [v3,1/2] dt-bindings: iio: bmc150_magn: Document and fix missing compatibles | expand

Checks

Context Check Description
robh/checkpatch success

Commit Message

Krzysztof Kozlowski June 29, 2020, 10:05 a.m. UTC
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.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

---

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(-)

Comments

Jonathan Cameron July 4, 2020, 4:46 p.m. UTC | #1
On Mon, 29 Jun 2020 12:05:37 +0200
Krzysztof Kozlowski <krzk@kernel.org> wrote:

> The compatible for BMM150 should not have "_magn" suffix because, unlike
> two other Bosch devices, it is only a magnetometer.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

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

> 
> ---
> 
> 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(-)
> 
> diff --git a/drivers/iio/magnetometer/bmc150_magn_i2c.c b/drivers/iio/magnetometer/bmc150_magn_i2c.c
> index fb45b63c56e4..876e96005e33 100644
> --- a/drivers/iio/magnetometer/bmc150_magn_i2c.c
> +++ b/drivers/iio/magnetometer/bmc150_magn_i2c.c
> @@ -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);
Rob Herring July 13, 2020, 7:05 p.m. UTC | #2
On Mon, 29 Jun 2020 12:05:36 +0200, Krzysztof Kozlowski wrote:
> 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.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> 
> ---
> 
> 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(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/magnetometer/bmc150_magn.txt b/Documentation/devicetree/bindings/iio/magnetometer/bmc150_magn.txt
index fd5fca90fb39..22912e43b60c 100644
--- a/Documentation/devicetree/bindings/iio/magnetometer/bmc150_magn.txt
+++ b/Documentation/devicetree/bindings/iio/magnetometer/bmc150_magn.txt
@@ -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: