From: Stephan Gerhold <stephan@gerhold.net> Date: 2021-06-14 16:34:40
This patch series first fixes the interrupt type in the
bosch,bma255.yaml schema and then combines it with the
bosch,bma180.yaml schema since they are pretty much identical.
Stephan Gerhold (3):
dt-bindings: iio: accel: bma255: Fix interrupt type
dt-bindings: iio: accel: bma255: Sort compatibles
dt-bindings: iio: accel: bma255: Merge bosch,bma180 schema
.../bindings/iio/accel/bosch,bma180.yaml | 61 -------------------
.../bindings/iio/accel/bosch,bma255.yaml | 23 ++++---
2 files changed, 16 insertions(+), 68 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/iio/accel/bosch,bma180.yaml
--
2.32.0
From: Stephan Gerhold <stephan@gerhold.net> Date: 2021-06-14 16:34:41
Bosch accelerometers similar to BMA255 are initially configured to
emit an active-high interrupt signal. This is currently not re-configured
in the bmc150-accel driver so the interrupt should most certainly be
IRQ_TYPE_EDGE_RISING (or potentially IRQ_TYPE_LEVEL_HIGH).
(Unless there is some kind of inverter installed on the board...)
At the moment the bmc150-accel driver forcefully requests the IRQ
using IRQF_TRIGGER_RISING, which means that the IRQ type is currently
ignored in all existing device trees.
Fixes: 6259551 ("iio: accel: bmc150-accel: Add DT bindings")
Cc: Linus Walleij <redacted>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
It's probably better to let the bmc150-accel driver rely on the IRQ
type provided by the device tree in case of inverters or something.
However:
1. We need to fix up several broken device trees first (I found
IRQ_TYPE_LEVEL_LOW in some device trees).
2. Similarly, I'm not sure if this might break some ACPI devices
in case they have the wrong IRQ type listed?
As a first step this patch just fixes the documentation.
---
Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -38,7 +38,7 @@ properties:description:|The first interrupt listed must be the one connected to the INT1 pin,the second (optional) interrupt listed must be the one connected to the-INT2 pin (if available).+INT2 pin (if available). The type should be IRQ_TYPE_EDGE_RISING.mount-matrix:description:an optional 3x3 mounting rotation matrix.
On Mon, Jun 14, 2021 at 6:34 PM Stephan Gerhold [off-list ref] wrote:
Bosch accelerometers similar to BMA255 are initially configured to
emit an active-high interrupt signal. This is currently not re-configured
in the bmc150-accel driver so the interrupt should most certainly be
IRQ_TYPE_EDGE_RISING (or potentially IRQ_TYPE_LEVEL_HIGH).
(Unless there is some kind of inverter installed on the board...)
At the moment the bmc150-accel driver forcefully requests the IRQ
using IRQF_TRIGGER_RISING, which means that the IRQ type is currently
ignored in all existing device trees.
Fixes: 6259551 ("iio: accel: bmc150-accel: Add DT bindings")
Cc: Linus Walleij <redacted>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Linus Walleij <redacted>
However:
1. We need to fix up several broken device trees first (I found
IRQ_TYPE_LEVEL_LOW in some device trees).
Oh this situation... Some are mine I bet (I can fix those,
just poke me with something sharp.)
2. Similarly, I'm not sure if this might break some ACPI devices
in case they have the wrong IRQ type listed?
I never figured this out but Andy and maybe Bastien Nocera
knows more about this.
As a first step this patch just fixes the documentation.
Fair enough, it makes things better.
Yours,
Linus Walleij
From: Rob Herring <robh@kernel.org> Date: 2021-06-24 20:38:20
On Mon, 14 Jun 2021 18:31:48 +0200, Stephan Gerhold wrote:
Bosch accelerometers similar to BMA255 are initially configured to
emit an active-high interrupt signal. This is currently not re-configured
in the bmc150-accel driver so the interrupt should most certainly be
IRQ_TYPE_EDGE_RISING (or potentially IRQ_TYPE_LEVEL_HIGH).
(Unless there is some kind of inverter installed on the board...)
At the moment the bmc150-accel driver forcefully requests the IRQ
using IRQF_TRIGGER_RISING, which means that the IRQ type is currently
ignored in all existing device trees.
Fixes: 6259551 ("iio: accel: bmc150-accel: Add DT bindings")
Cc: Linus Walleij <redacted>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
It's probably better to let the bmc150-accel driver rely on the IRQ
type provided by the device tree in case of inverters or something.
However:
1. We need to fix up several broken device trees first (I found
IRQ_TYPE_LEVEL_LOW in some device trees).
2. Similarly, I'm not sure if this might break some ACPI devices
in case they have the wrong IRQ type listed?
As a first step this patch just fixes the documentation.
---
Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Stephan Gerhold <stephan@gerhold.net> Date: 2021-06-14 16:34:43
In Linux the bma180 and bmc150-accel driver cover fairly similar chips
from Bosch (just with minor register differences). For the DT schema,
this does not make any difference: They both represent I2C/SPI devices,
have one or two interrupts plus a vdd/vddio-supply.
This means there is no need to duplicate the schema, we can just
document the compatibles for both drivers in a single DT schema.
Suggested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
Some additional notes:
- The datasheet links in bma180 sadly seem all broken for me so
I just dropped them.
- I separated the bma180/bmc150-accel compatibles using a comment.
This is just for clarity, it has no influence on the schema.
- I added myself as second maintainer for the bma255 binding since
Jonathan seemed to be happy to get unlisted for bma180. :)
In the future we could consider combining even more schemas.
In particular bosch,bma400.yaml and bosch,bmi088.yaml are also
almost identical, although they currently specify different interrupt
types. I think in general the situation for those Bosch sensors is
exactly the same: The sensors can be configured to either active-high
or active-low level. However, at the moment neither bma400 or bmi088
actually implement interrupt support. For now I kept those schemas
as-is, I think this is better left up for follow-up patches.
---
.../bindings/iio/accel/bosch,bma180.yaml | 61 -------------------
.../bindings/iio/accel/bosch,bma255.yaml | 9 +++
2 files changed, 9 insertions(+), 61 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/iio/accel/bosch,bma180.yaml
@@ -8,6 +8,7 @@ title: Bosch BMA255 and Similar Accelerometersmaintainers:-Linus Walleij <linus.walleij@linaro.org>+-Stephan Gerhold <stephan@gerhold.net>description:3 axis accelerometers with varying range and I2C or SPI
@@ -16,6 +17,7 @@ description:properties:compatible:enum:+# bmc150-accel driver in Linux-bosch,bma222-bosch,bma222e-bosch,bma250e
@@ -26,6 +28,13 @@ properties:-bosch,bmc150_accel-bosch,bmi055_accel+# bma180 driver in Linux+-bosch,bma023+-bosch,bma150+-bosch,bma180+-bosch,bma250+-bosch,smb380+reg:maxItems:1
On Mon, Jun 14, 2021 at 6:34 PM Stephan Gerhold [off-list ref] wrote:
In Linux the bma180 and bmc150-accel driver cover fairly similar chips
from Bosch (just with minor register differences). For the DT schema,
this does not make any difference: They both represent I2C/SPI devices,
have one or two interrupts plus a vdd/vddio-supply.
This means there is no need to duplicate the schema, we can just
document the compatibles for both drivers in a single DT schema.
Suggested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Linus Walleij <redacted>
Some additional notes:
- The datasheet links in bma180 sadly seem all broken for me so
I just dropped them.
Fair enough, but some people would be able to obtain them using the
Wayback machine.
- I separated the bma180/bmc150-accel compatibles using a comment.
This is just for clarity, it has no influence on the schema.
Some DT binding maintainers may be allergic to any mention of
Linux particulars in binding documents but I am not so fine by me.
- I added myself as second maintainer for the bma255 binding since
Jonathan seemed to be happy to get unlisted for bma180. :)
Thanks!
In the future we could consider combining even more schemas.
In particular bosch,bma400.yaml and bosch,bmi088.yaml are also
almost identical, although they currently specify different interrupt
types. I think in general the situation for those Bosch sensors is
exactly the same: The sensors can be configured to either active-high
or active-low level. However, at the moment neither bma400 or bmi088
actually implement interrupt support. For now I kept those schemas
as-is, I think this is better left up for follow-up patches.
The situation is caused by Bosch sensortec
division not being particularly involved with the maintenance of these
drivers in the Linux kernel. (They did send a few initial patches
some years back, but since have not been heard from.)
It would be great to get the attention of someone in charge
@bosch-sensortec.com.
Their own drivers seem to target stuff like Arduino but more
generally on the "OS independence shim"-paradigm:
https://github.com/BoschSensortec
They have their own community here:
https://community.bosch-sensortec.com/t5/Bosch-Sensortec-Community/ct-p/bst_community
Their users ask questions about Linux sensor support all the time.
Their stance seem to be to work directly with companies making
products through FAE:s (field application engineers). It's a bit
like a guild.
I tried to find a real mail address to them but failed.
Yours,
Linus Walleij
From: Stephan Gerhold <stephan@gerhold.net> Date: 2021-06-16 17:37:03
On Wed, Jun 16, 2021 at 11:04:36AM +0200, Linus Walleij wrote:
On Mon, Jun 14, 2021 at 6:34 PM Stephan Gerhold [off-list ref] wrote:
quoted
In Linux the bma180 and bmc150-accel driver cover fairly similar chips
from Bosch (just with minor register differences). For the DT schema,
this does not make any difference: They both represent I2C/SPI devices,
have one or two interrupts plus a vdd/vddio-supply.
This means there is no need to duplicate the schema, we can just
document the compatibles for both drivers in a single DT schema.
Suggested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Linus Walleij <redacted>
quoted
Some additional notes:
- The datasheet links in bma180 sadly seem all broken for me so
I just dropped them.
Fair enough, but some people would be able to obtain them using the
Wayback machine.
Good point, perhaps we should add some links directly to the Wayback
Machine if it still has some of the datasheets. Those links should be
more stable. :)
quoted
- I separated the bma180/bmc150-accel compatibles using a comment.
This is just for clarity, it has no influence on the schema.
Some DT binding maintainers may be allergic to any mention of
Linux particulars in binding documents but I am not so fine by me.
Yeah, I kind of expected this to be honest. I don't mind removing those
comments, just thought it would be a bit less confusing for people who
read the bindings (so they know which driver covers which compatibles).
And for those using the bindings outside Linux, the comments can just be
ignored since they do not have any semantic meaning.
quoted
In the future we could consider combining even more schemas.
In particular bosch,bma400.yaml and bosch,bmi088.yaml are also
almost identical, although they currently specify different interrupt
types. I think in general the situation for those Bosch sensors is
exactly the same: The sensors can be configured to either active-high
or active-low level. However, at the moment neither bma400 or bmi088
actually implement interrupt support. For now I kept those schemas
as-is, I think this is better left up for follow-up patches.
The situation is caused by Bosch sensortec
division not being particularly involved with the maintenance of these
drivers in the Linux kernel. (They did send a few initial patches
some years back, but since have not been heard from.)
It would be great to get the attention of someone in charge
@bosch-sensortec.com.
Their own drivers seem to target stuff like Arduino but more
generally on the "OS independence shim"-paradigm:
https://github.com/BoschSensortec
They have their own community here:
https://community.bosch-sensortec.com/t5/Bosch-Sensortec-Community/ct-p/bst_community
Their users ask questions about Linux sensor support all the time.
Their stance seem to be to work directly with companies making
products through FAE:s (field application engineers). It's a bit
like a guild.
I tried to find a real mail address to them but failed.
Yeah it would be nice if they would become a bit more involved. But from
my experience with various other vendors I'm not really expecting much
here sadly. However, I would be very happy to be proven otherwise. :)
Thanks!
Stephan
From: Rob Herring <robh@kernel.org> Date: 2021-06-24 20:40:16
On Mon, 14 Jun 2021 18:31:50 +0200, Stephan Gerhold wrote:
In Linux the bma180 and bmc150-accel driver cover fairly similar chips
from Bosch (just with minor register differences). For the DT schema,
this does not make any difference: They both represent I2C/SPI devices,
have one or two interrupts plus a vdd/vddio-supply.
This means there is no need to duplicate the schema, we can just
document the compatibles for both drivers in a single DT schema.
Suggested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
Some additional notes:
- The datasheet links in bma180 sadly seem all broken for me so
I just dropped them.
- I separated the bma180/bmc150-accel compatibles using a comment.
This is just for clarity, it has no influence on the schema.
- I added myself as second maintainer for the bma255 binding since
Jonathan seemed to be happy to get unlisted for bma180. :)
In the future we could consider combining even more schemas.
In particular bosch,bma400.yaml and bosch,bmi088.yaml are also
almost identical, although they currently specify different interrupt
types. I think in general the situation for those Bosch sensors is
exactly the same: The sensors can be configured to either active-high
or active-low level. However, at the moment neither bma400 or bmi088
actually implement interrupt support. For now I kept those schemas
as-is, I think this is better left up for follow-up patches.
---
.../bindings/iio/accel/bosch,bma180.yaml | 61 -------------------
.../bindings/iio/accel/bosch,bma255.yaml | 9 +++
2 files changed, 9 insertions(+), 61 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/iio/accel/bosch,bma180.yaml
From: Stephan Gerhold <stephan@gerhold.net> Date: 2021-06-14 16:34:43
Similar to recent rework in the bmc150-accel driver, sort the compatible
list in the DT schema so there is a consistent order.
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
.../devicetree/bindings/iio/accel/bosch,bma255.yaml | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
On Mon, Jun 14, 2021 at 6:34 PM Stephan Gerhold [off-list ref] wrote:
Similar to recent rework in the bmc150-accel driver, sort the compatible
list in the DT schema so there is a consistent order.
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
From: Rob Herring <robh@kernel.org> Date: 2021-06-24 20:38:36
On Mon, 14 Jun 2021 18:31:49 +0200, Stephan Gerhold wrote:
Similar to recent rework in the bmc150-accel driver, sort the compatible
list in the DT schema so there is a consistent order.
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
.../devicetree/bindings/iio/accel/bosch,bma255.yaml | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
From: Jonathan Cameron <jic23@kernel.org> Date: 2021-07-18 14:48:43
On Mon, 14 Jun 2021 18:31:47 +0200
Stephan Gerhold [off-list ref] wrote:
This patch series first fixes the interrupt type in the
bosch,bma255.yaml schema and then combines it with the
bosch,bma180.yaml schema since they are pretty much identical.
Stephan Gerhold (3):
dt-bindings: iio: accel: bma255: Fix interrupt type
dt-bindings: iio: accel: bma255: Sort compatibles
dt-bindings: iio: accel: bma255: Merge bosch,bma180 schema
.../bindings/iio/accel/bosch,bma180.yaml | 61 -------------------
.../bindings/iio/accel/bosch,bma255.yaml | 23 ++++---
2 files changed, 16 insertions(+), 68 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/iio/accel/bosch,bma180.yaml
Series applied to the togreg branch of iio.git and pushed out as testing
to let 0-day have a shot at them.
I 'think' the outstanding discussion was all about potential follow up patches
rather than anything here, but if I've missed a reason we should hold off
on these then shout.
Thanks,
Jonathan