From: sashiko-bot@kernel.org
To: "Svyatoslav Ryhel" <clamor95@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v3 4/4] iio: light: ltr501: Add support for the LTR-659PS-01 proximity sensor
Date: Sun, 08 Nov 2026 10:01:42 +0000 [thread overview]
Message-ID: <sashiko-outbox-203677@kernel.org> (raw)
In-Reply-To: <20261108094253.83899-5-clamor95@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] iio: light: ltr501: call to unexported
iio_find_channel_from_si() breaks module build
--
commit a70950dbacecbff02b036d8bf018419c3106a456
Author: Svyatoslav Ryhel <clamor95@gmail.com>
iio: light: ltr501: Add support for the LTR-659PS-01 proximity sensor
This commit adds support for the Lite-On LTR-659PS-01 proximity-only
sensor, introduces a no_als_support flag to skip ALS register accesses,
and updates ltr501_trigger_handler() to inspect channel types rather than
fixed scan indices.
> diff --git a/drivers/iio/light/ltr501.c b/drivers/iio/light/ltr501.c
> index ca6c8cffb4001..b97b8da98e86c 100644
> --- a/drivers/iio/light/ltr501.c
> +++ b/drivers/iio/light/ltr501.c
[ ... ]
> @@ -1260,16 +1295,21 @@ static irqreturn_t ltr501_trigger_handler(int irq, void *p)
> aligned_s64 ts;
> } scan = { };
> __le16 als_buf[2];
> + unsigned int i;
> u8 mask = 0;
> int j = 0;
> int ret, psdata;
>
> /* figure out which data needs to be ready */
> - if (test_bit(0, indio_dev->active_scan_mask) ||
> - test_bit(1, indio_dev->active_scan_mask))
> - mask |= LTR501_STATUS_ALS_RDY;
> - if (test_bit(2, indio_dev->active_scan_mask))
> - mask |= LTR501_STATUS_PS_RDY;
> + for_each_set_bit(i, indio_dev->active_scan_mask, indio_dev->num_channels) {
> + const struct iio_chan_spec *chan = iio_find_channel_from_si(indio_dev, i);
> +
> + if (chan->type == IIO_INTENSITY)
> + mask |= LTR501_STATUS_ALS_RDY;
> +
> + if (chan->type == IIO_PROXIMITY)
> + mask |= LTR501_STATUS_PS_RDY;
> + }
[Severity: High]
Does calling iio_find_channel_from_si() break the build when
CONFIG_LTR501=m?
iio_find_channel_from_si() in drivers/iio/industrialio-core.c is not
exported with EXPORT_SYMBOL_GPL(), so linking ltr501.ko fails at modpost
with an undefined symbol error.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261108094253.83899-1-clamor95@gmail.com?part=4
next prev parent reply other threads:[~2026-11-08 10:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-08 9:42 [PATCH v3 0/4] iio: light: ltr501: Add LTR-659PS-01 prox sensor support Svyatoslav Ryhel
2026-11-08 9:42 ` [PATCH v3 1/4] iio: light: ltr501: Switch to read_avail() op from manual attribute registration Svyatoslav Ryhel
2026-11-08 9:50 ` sashiko-bot
2026-11-09 20:03 ` Andy Shevchenko
2026-11-08 9:42 ` [PATCH v3 2/4] iio: light: ltr501: Switch to modern match mechanism Svyatoslav Ryhel
2026-11-08 9:42 ` [PATCH v3 3/4] dt-bindings: iio: light: ltr501: Document LTR659 proximity sensor Svyatoslav Ryhel
2026-11-08 9:42 ` [PATCH v3 4/4] iio: light: ltr501: Add support for the LTR-659PS-01 " Svyatoslav Ryhel
2026-11-08 10:01 ` sashiko-bot [this message]
2026-11-08 21:48 ` kernel test robot
2026-11-09 20:04 ` Andy Shevchenko
2026-11-09 20:07 ` Svyatoslav Ryhel
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=sashiko-outbox-203677@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=clamor95@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--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