Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Esben Haabendal" <esben@geanix.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v2 1/4] dt-bindings: iio: light: ltr501: Add missing ltr303 compatible
Date: Wed, 15 Jul 2026 12:37:56 +0000	[thread overview]
Message-ID: <20260715123756.A84F31F00A3F@smtp.kernel.org> (raw)
In-Reply-To: <20260715-liteon-ltr329-v2-1-d18af55edab5@geanix.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] Triggered buffer reads will always time out and fail for ltr303 (and ltr301) when the IIO timestamp channel is enabled.
--

--- Patch [1]: [PATCH v2 1/4] dt-bindings: iio: light: ltr501: Add missing ltr303 compatible ---
commit 0ab668b54a0d483bbb8920d0f07259a66c763c55
Author: Esben Haabendal <esben@geanix.com>

dt-bindings: iio: light: ltr501: Add missing ltr303 compatible

This commit updates the device tree bindings for the ltr501 driver to
include the liteon,ltr303 compatible string, which was missed when driver
support was added in 2021.

> diff --git a/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml b/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml
> index c8074f180a793..ab9bb68dd7363 100644
> --- a/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml
> +++ b/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml
> @@ -18,6 +18,7 @@ properties:
>        - liteon,ltr501
>        - liteon,ltr559
>        - liteon,ltr301
> +      - liteon,ltr303

[Severity: High]
This isn't a bug introduced by this patch, but could making this compatible
string valid expose a pre-existing timeout issue in the driver?

Looking at ltr501_trigger_handler() in drivers/iio/light/ltr501.c, the code
hardcodes a check for bit 2 in the scan mask to wait for proximity data:

if (test_bit(2, indio_dev->active_scan_mask))
        mask |= LTR501_STATUS_PS_RDY;

Since ltr303 (and ltr301) are ALS-only devices without a proximity sensor,
bit 2 actually maps to the IIO timestamp channel. If a user enables the
timestamp channel, will the driver wait for LTR501_STATUS_PS_RDY?

Because the hardware never sets this ready bit for an ALS-only variant, it
appears ltr501_drdy() would hit its 2.5-second timeout on every trigger
and return -EIO. Is a fix needed in the driver to properly handle the
timestamp channel for these variants?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260715-liteon-ltr329-v2-0-d18af55edab5@geanix.com?part=1

  reply	other threads:[~2026-07-15 12:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-15 12:27 [PATCH v2 0/4] iio: light: ltr501: Add ltr329 support Esben Haabendal
2026-07-15 12:27 ` [PATCH v2 1/4] dt-bindings: iio: light: ltr501: Add missing ltr303 compatible Esben Haabendal
2026-07-15 12:37   ` sashiko-bot [this message]
2026-07-15 12:27 ` [PATCH v2 2/4] dt-bindings: iio: light: ltr501: Add ltr329 compatible Esben Haabendal
2026-07-15 12:27 ` [PATCH v2 3/4] iio: light: ltr501: Add ltr329 driver support Esben Haabendal
2026-07-15 12:48   ` sashiko-bot
2026-07-15 12:53   ` Joshua Crofts
2026-07-15 13:55     ` Esben Haabendal
2026-07-15 13:58       ` Joshua Crofts
2026-07-15 13:16   ` Nuno Sá
2026-07-15 13:43     ` Esben Haabendal
2026-07-15 14:25       ` Nuno Sá
2026-07-15 12:27 ` [PATCH v2 4/4] iio: light: ltr501: Power down chip if request irq fails Esben Haabendal
2026-07-15 12:59   ` Joshua Crofts
2026-07-15 13:32     ` Esben Haabendal
2026-07-15 13:01   ` Nuno Sá
2026-07-15 13:31     ` Esben Haabendal
2026-07-15 13:53     ` Esben Haabendal
2026-07-15 12:55 ` [PATCH v2 0/4] iio: light: ltr501: Add ltr329 support Joshua Crofts
2026-07-15 13:17   ` Nuno Sá
2026-07-15 13:34     ` Esben Haabendal

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=20260715123756.A84F31F00A3F@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