From: David Lechner <dlechner@baylibre.com>
To: Petre Rodan <petre.rodan@subdimension.ro>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>
Subject: Re: [PATCH 01/10] dt-bindings: iio: accel: bosch,BMA220 improvements
Date: Fri, 5 Sep 2025 15:15:55 -0500 [thread overview]
Message-ID: <210871b8-4967-40c9-bbaf-338d2d6d9c63@baylibre.com> (raw)
In-Reply-To: <20250901194742.11599-2-petre.rodan@subdimension.ro>
On 9/1/25 2:47 PM, Petre Rodan wrote:
> - fix title typo
> - add optional watchdog setting that recovers the sensor from a stuck-low
> SDA condition
> - set correct SPI phase and polarity
> - interrupt on rising edge. the level-based interrupt that is being
> replaced was not actually implemented in the driver.
>
> This set of changes should not negatively affect existing users.
>
> Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>
> ---
> .../bindings/iio/accel/bosch,bma220.yaml | 20 +++++++++++++++++--
> 1 file changed, 18 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml
> index ec643de031a3..f71b2320b010 100644
> --- a/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml
> @@ -4,7 +4,7 @@
> $id: http://devicetree.org/schemas/iio/accel/bosch,bma220.yaml#
> $schema: http://devicetree.org/meta-schemas/core.yaml#
>
> -title: Bosch BMA220 Trixial Acceleration Sensor
> +title: Bosch BMA220 Triaxial Acceleration Sensor
>
> maintainers:
> - Jonathan Cameron <Jonathan.Cameron@huawei.com>
> @@ -20,6 +20,20 @@ properties:
> interrupts:
> maxItems: 1
>
> + bosch,watchdog:
> + description:
> + In order to prevent the built-in I2C slave to lock-up the I2C bus, a
> + watchdog timer is introduced. The WDT observes internal I2C signals and
> + resets the I2C interface if the bus is locked-up by the BMA220.
> + 0 - off
> + 1 - 1ms
> + 2 - 10ms
> + enum: [0, 1, 2]
> + $ref: /schemas/types.yaml#/definitions/uint32
Why should this depend on how the chip is wired up? Normally, we don't have this
sort of control in devicetree. E.g. if it is useful, why shouldn't drivers just
always enable it?
If we can make the case that it belongs in the devicetree, it should use
standard units, e.g. property should be watchdog-timeout-ms with enum: [1, 10].
Maybe 0 for disabled is OK too - in that case should have default: 0.
> +
> + spi-cpha: true
> + spi-cpol: true
> +
> vdda-supply: true
> vddd-supply: true
> vddio-supply: true
> @@ -44,8 +58,10 @@ examples:
> compatible = "bosch,bma220";
> reg = <0>;
> spi-max-frequency = <2500000>;
> + spi-cpol;
> + spi-cpha;
> interrupt-parent = <&gpio0>;
> - interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
> + interrupts = <0 IRQ_TYPE_EDGE_RISING>;
> };
> };
> ...
> --
> 2.49.1
>
next prev parent reply other threads:[~2025-09-05 20:15 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-01 19:47 [PATCH 0/10] iio: accel: BMA220 improvements Petre Rodan
2025-09-01 19:47 ` [PATCH 01/10] dt-bindings: iio: accel: bosch,BMA220 improvements Petre Rodan
2025-09-02 5:57 ` Krzysztof Kozlowski
2025-09-02 16:02 ` Petre Rodan
2025-09-02 16:14 ` David Lechner
2025-09-02 19:22 ` Krzysztof Kozlowski
2025-09-05 20:15 ` David Lechner [this message]
2025-09-06 2:46 ` Petre Rodan
2025-09-06 14:36 ` David Lechner
2025-09-01 19:47 ` [PATCH 02/10] iio: accel: BMA220 split original spi driver Petre Rodan
2025-09-07 12:29 ` Jonathan Cameron
2025-09-01 19:47 ` [PATCH 03/10] iio: accel: BMA220 migrate to regmap API Petre Rodan
2025-09-07 12:45 ` Jonathan Cameron
2025-09-08 3:27 ` Petre Rodan
2025-09-09 16:15 ` Jonathan Cameron
2025-09-01 19:47 ` [PATCH 04/10] iio: accel: BMA220 add i2c module Petre Rodan
2025-09-07 12:46 ` Jonathan Cameron
2025-09-01 19:47 ` [PATCH 05/10] iio: accel: BMA220 make use of the watchdog functionality Petre Rodan
2025-09-07 12:48 ` Jonathan Cameron
2025-09-01 19:47 ` [PATCH 06/10] iio: accel: BMA220 add LPF cut-off frequency mapping Petre Rodan
2025-09-05 19:59 ` David Lechner
2025-09-07 12:50 ` Jonathan Cameron
2025-09-01 19:47 ` [PATCH 07/10] iio: accel: BMA220 add debugfs reg access Petre Rodan
2025-09-01 19:47 ` [PATCH 08/10] iio: accel: BMA220 add events Petre Rodan
2025-09-07 13:02 ` Jonathan Cameron
2025-09-01 19:47 ` [PATCH 09/10] iio: accel: BMA220 add event attrs Petre Rodan
2025-09-07 13:15 ` Jonathan Cameron
2025-09-07 13:28 ` Petre Rodan
2025-09-09 16:20 ` Jonathan Cameron
2025-09-01 19:47 ` [PATCH 10/10] iio: accel: BMA220 add maintainer Petre Rodan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=210871b8-4967-40c9-bbaf-338d2d6d9c63@baylibre.com \
--to=dlechner@baylibre.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=petre.rodan@subdimension.ro \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®