Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Esben Haabendal" <esben@geanix.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: iio: accel: mma8452: Add drive-open-drain
Date: Wed, 15 Jul 2026 08:14:48 +0000	[thread overview]
Message-ID: <20260715081448.DE21D1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260715-mma8452-open-drain-v1-1-b1dd2a440c60@geanix.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The commit introduces the `drive-open-drain` device tree property to configure the sensor's interrupt pin as open drain, but fails to provide the necessary C driver implementation in `mma8452.c` to parse the property and write to the chip's control register.
--

--- Patch [1]: [PATCH 1/2] dt-bindings: iio: accel: mma8452: Add drive-open-drain ---
commit 3050ccf4ccce6dad107c37d81a589ca6d501304b
Author: Esben Haabendal <esben@geanix.com>
Subject: dt-bindings: iio: accel: mma8452: Add drive-open-drain

This commit adds the drive-open-drain property to the mma8452 device tree
binding. This allows configuring the sensor's interrupt pin as open drain
rather than the default push-pull mode.

> diff --git a/Documentation/devicetree/bindings/iio/accel/fsl,mma8452.yaml b/Documentation/devicetree/bindings/iio/accel/fsl,mma8452.yaml
> --- a/Documentation/devicetree/bindings/iio/accel/fsl,mma8452.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/fsl,mma8452.yaml
> @@ -39,6 +39,12 @@ properties:
>      minItems: 1
>      maxItems: 2
>  
> +  drive-open-drain:
> +    $ref: /schemas/types.yaml#/definitions/flag
> +    description: the interrupt line will be configured as open drain, which is
> +      useful if several sensors share the same interrupt line. (This binding is
> +      taken from pinctrl.)

[Severity: High]
Is there a missing corresponding driver update to support this new property?

Looking at mma8452_probe() in drivers/iio/accel/mma8452.c, the driver does not
appear to query this property or program the hardware control register to actually
enable the open-drain mode:

drivers/iio/accel/mma8452.c:mma8452_probe() {
    ...
    /* Missing device_property_read_bool() for drive-open-drain */
    ...
}

If device tree authors use this property on a shared interrupt line expecting
it to be honored, but the driver silently leaves the sensor in the default
push-pull mode, could this cause a short circuit when one device drives the
shared line high while another drives it low?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260715-mma8452-open-drain-v1-0-b1dd2a440c60@geanix.com?part=1

  reply	other threads:[~2026-07-15  8:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-15  8:07 [PATCH 0/2] io: accel: mma8452: Allow open drain interrupt pin configuration Esben Haabendal
2026-07-15  8:07 ` [PATCH 1/2] dt-bindings: iio: accel: mma8452: Add drive-open-drain Esben Haabendal
2026-07-15  8:14   ` sashiko-bot [this message]
2026-07-15  8:07 ` [PATCH 2/2] iio: accel: mma8452: Allow open drain interrupt pin configuration Esben Haabendal
2026-07-15  8:16   ` sashiko-bot
2026-07-15  8:42   ` Andy Shevchenko
2026-07-15  8:45   ` Joshua Crofts
2026-07-15  9:09     ` Andy Shevchenko

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=20260715081448.DE21D1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=esben@geanix.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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