* [PATCH v2 1/2] dt-bindings: iio: bmc150_magn: Document and fix missing compatibles
@ 2020-06-22 6:01 Krzysztof Kozlowski
2020-06-22 6:01 ` [PATCH v2 2/2] iio: magnetometer: bmc150: Add proper compatible BMC156 and BMM150 Krzysztof Kozlowski
2020-06-27 13:43 ` [PATCH v2 1/2] dt-bindings: iio: bmc150_magn: Document and fix missing compatibles Jonathan Cameron
0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2020-06-22 6:01 UTC (permalink / raw)
To: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler, Rob Herring, Krzysztof Kozlowski,
linux-iio, devicetree, linux-kernel
The driver supports also BMC156B and BMM150B but these compatibles had
redundant suffix "_magn". Add existing compatibles marking them
deprecated along with adding a new, proper one for this family of
devices.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
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(-)
diff --git a/Documentation/devicetree/bindings/iio/magnetometer/bmc150_magn.txt b/Documentation/devicetree/bindings/iio/magnetometer/bmc150_magn.txt
index fd5fca90fb39..efeda055be6a 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"
+ "bosch,bmc156_magn" (DEPRECATED, use bosch,bmc156)
+ "bosch,bmm150_magn" (DEPRECATED, use bosch,bmc156)
- reg : the I2C address of the magnetometer
Optional properties:
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] iio: magnetometer: bmc150: Add proper compatible BMC156 and BMM150
2020-06-22 6:01 [PATCH v2 1/2] dt-bindings: iio: bmc150_magn: Document and fix missing compatibles Krzysztof Kozlowski
@ 2020-06-22 6:01 ` Krzysztof Kozlowski
2020-06-27 13:43 ` [PATCH v2 1/2] dt-bindings: iio: bmc150_magn: Document and fix missing compatibles Jonathan Cameron
1 sibling, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2020-06-22 6:01 UTC (permalink / raw)
To: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler, Rob Herring, Krzysztof Kozlowski,
linux-iio, devicetree, linux-kernel
The compatibles (except BMC150) should not have "_magn" suffix and
BMC156 is compatible with BMM150 so use just one compatible.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
Changes since v1:
1. New patch.
---
drivers/iio/magnetometer/bmc150_magn_i2c.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/magnetometer/bmc150_magn_i2c.c b/drivers/iio/magnetometer/bmc150_magn_i2c.c
index fb45b63c56e4..038618da99f3 100644
--- a/drivers/iio/magnetometer/bmc150_magn_i2c.c
+++ b/drivers/iio/magnetometer/bmc150_magn_i2c.c
@@ -57,8 +57,9 @@ 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,bmc156" },
+ { .compatible = "bosch,bmc156_magn" }, /* deprecated compatible */
+ { .compatible = "bosch,bmm150_magn" }, /* deprecated compatible */
{ }
};
MODULE_DEVICE_TABLE(of, bmc150_magn_of_match);
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: iio: bmc150_magn: Document and fix missing compatibles
2020-06-22 6:01 [PATCH v2 1/2] dt-bindings: iio: bmc150_magn: Document and fix missing compatibles Krzysztof Kozlowski
2020-06-22 6:01 ` [PATCH v2 2/2] iio: magnetometer: bmc150: Add proper compatible BMC156 and BMM150 Krzysztof Kozlowski
@ 2020-06-27 13:43 ` Jonathan Cameron
2020-06-29 6:52 ` Krzysztof Kozlowski
1 sibling, 1 reply; 4+ messages in thread
From: Jonathan Cameron @ 2020-06-27 13:43 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
Rob Herring, linux-iio, devicetree, linux-kernel
On Mon, 22 Jun 2020 08:01:09 +0200
Krzysztof Kozlowski <krzk@kernel.org> wrote:
> The driver supports also BMC156B and BMM150B but these compatibles had
> redundant suffix "_magn". Add existing compatibles marking them
> deprecated along with adding a new, proper one for this family of
> devices.
Thanks for tidying this up.
The BMC156B is a dual magnetometer and accelerometer chip
so for that one the _magn postfix probably is needed.
Or am I missing something?
The way this does SPI is rather odd but seems to be the same as the bmc150
(two chips with non overlapping register maps).
Jonathan
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
>
> ---
>
> 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(-)
>
> diff --git a/Documentation/devicetree/bindings/iio/magnetometer/bmc150_magn.txt b/Documentation/devicetree/bindings/iio/magnetometer/bmc150_magn.txt
> index fd5fca90fb39..efeda055be6a 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"
> + "bosch,bmc156_magn" (DEPRECATED, use bosch,bmc156)
> + "bosch,bmm150_magn" (DEPRECATED, use bosch,bmc156)
> - reg : the I2C address of the magnetometer
>
> Optional properties:
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: iio: bmc150_magn: Document and fix missing compatibles
2020-06-27 13:43 ` [PATCH v2 1/2] dt-bindings: iio: bmc150_magn: Document and fix missing compatibles Jonathan Cameron
@ 2020-06-29 6:52 ` Krzysztof Kozlowski
0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2020-06-29 6:52 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
Rob Herring, linux-iio, devicetree, linux-kernel
On Sat, Jun 27, 2020 at 02:43:59PM +0100, Jonathan Cameron wrote:
> On Mon, 22 Jun 2020 08:01:09 +0200
> Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> > The driver supports also BMC156B and BMM150B but these compatibles had
> > redundant suffix "_magn". Add existing compatibles marking them
> > deprecated along with adding a new, proper one for this family of
> > devices.
> Thanks for tidying this up.
>
> The BMC156B is a dual magnetometer and accelerometer chip
> so for that one the _magn postfix probably is needed.
>
> Or am I missing something?
>
> The way this does SPI is rather odd but seems to be the same as the bmc150
> (two chips with non overlapping register maps).
You're right, only one compatible should be trimmed from suffix. I'll
send v3.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-06-29 20:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-22 6:01 [PATCH v2 1/2] dt-bindings: iio: bmc150_magn: Document and fix missing compatibles Krzysztof Kozlowski
2020-06-22 6:01 ` [PATCH v2 2/2] iio: magnetometer: bmc150: Add proper compatible BMC156 and BMM150 Krzysztof Kozlowski
2020-06-27 13:43 ` [PATCH v2 1/2] dt-bindings: iio: bmc150_magn: Document and fix missing compatibles Jonathan Cameron
2020-06-29 6:52 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).