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 v3 5/6] iio: light: ltr501: Add ltr329 driver support
Date: Tue, 04 Aug 2026 17:59:35 +0000 [thread overview]
Message-ID: <20260804175936.BBD901F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260804-liteon-ltr329-v3-5-c6b768c7c745@geanix.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The software trigger handler incorrectly maps the TIMESTAMP channel to the Proximity Sensor for ALS-only chips, causing an I2C polling timeout and trigger failure.
--
--- Patch [5]: [PATCH v3 5/6] iio: light: ltr501: Add ltr329 driver support ---
commit 62d63375d5ea8d7644dcba28928c83f753f6e2cf
Author: Esben Haabendal <esben@geanix.com>
iio: light: ltr501: Add ltr329 driver support
This patch adds support for the LTR-329ALS-01 chip, which is similar to
the LTR-303ALS-01 but lacks interrupt support.
> diff --git a/drivers/iio/light/ltr501.c b/drivers/iio/light/ltr501.c
> index b36bd10a02624..9d37872ceec58 100644
> --- a/drivers/iio/light/ltr501.c
> +++ b/drivers/iio/light/ltr501.c
[ ... ]
> @@ -1257,6 +1271,18 @@ static const struct ltr501_chip_info ltr501_chip_info_tbl[] = {
> .channels = ltr301_channels,
> .no_channels = ARRAY_SIZE(ltr301_channels),
> },
> + [ltr329] = {
> + .partid = 0x0A,
> + .als_gain = ltr559_als_gain_tbl,
> + .als_gain_tbl_size = ARRAY_SIZE(ltr559_als_gain_tbl),
> + .als_mode_active = BIT(0),
> + .als_gain_mask = BIT(2) | BIT(3) | BIT(4),
> + .als_gain_shift = 2,
> + .no_irq_support = true,
> + .info_no_irq = <r301_info_no_irq,
> + .channels = ltr301_channels,
[Severity: High]
This isn't a bug introduced by this patch, but will the trigger handler fail
for the LTR-329 when using ltr301_channels?
Looking at ltr301_channels, scan_index 2 is defined as the software
timestamp:
drivers/iio/light/ltr501.c:ltr301_channels[] = {
...
IIO_CHAN_SOFT_TIMESTAMP(2),
};
However, in ltr501_trigger_handler(), test_bit(2, ...) hardcodes the
assumption that scan_index 2 is the proximity sensor:
drivers/iio/light/ltr501.c:ltr501_trigger_handler() {
...
if (test_bit(2, indio_dev->active_scan_mask))
mask |= LTR501_STATUS_PS_RDY;
ret = ltr501_drdy(data, mask);
...
}
If a user enables the IIO timestamp channel (scan_index 2) on an ALS-only
chip like the LTR-329, will ltr501_drdy() timeout waiting for the proximity
sensor ready bit, effectively breaking triggered buffers?
> + .no_channels = ARRAY_SIZE(ltr301_channels),
> + },
> };
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260804-liteon-ltr329-v3-0-c6b768c7c745@geanix.com?part=5
next prev parent reply other threads:[~2026-08-04 17:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 17:02 [PATCH v3 0/6] iio: light: ltr501: Add ltr329 support Esben Haabendal
2026-08-04 17:02 ` [PATCH v3 1/6] dt-bindings: iio: light: ltr501: Sort compatible enum array Esben Haabendal
2026-08-05 7:14 ` Krzysztof Kozlowski
2026-08-04 17:02 ` [PATCH v3 2/6] dt-bindings: iio: light: ltr501: Add missing ltr303 compatible Esben Haabendal
2026-08-05 7:14 ` Krzysztof Kozlowski
2026-08-04 17:02 ` [PATCH v3 3/6] dt-bindings: iio: light: ltr501: Add ltr329 compatible Esben Haabendal
2026-08-04 17:16 ` sashiko-bot
2026-08-05 7:15 ` Krzysztof Kozlowski
2026-08-04 17:02 ` [PATCH v3 4/6] iio: light: ltr501: Power down chip if request irq fails Esben Haabendal
2026-08-04 17:36 ` sashiko-bot
2026-08-04 17:02 ` [PATCH v3 5/6] iio: light: ltr501: Add ltr329 driver support Esben Haabendal
2026-08-04 17:59 ` sashiko-bot [this message]
2026-08-04 17:02 ` [PATCH v3 6/6] iio: light: ltr501: Fix sorting order of device arrays Esben Haabendal
2026-08-05 17:15 ` [PATCH v3 0/6] iio: light: ltr501: Add ltr329 support Kuppuswamy Sathyanarayanan
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=20260804175936.BBD901F000E9@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