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 v5 4/4] iio: light: ltr501: Add support for the LTR-659PS-01 proximity sensor
Date: Sun, 22 Nov 2026 08:18:30 +0000 [thread overview]
Message-ID: <sashiko-outbox-227817@kernel.org> (raw)
In-Reply-To: <20261122080753.36349-5-clamor95@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] iio: light: ltr501: unexported iio_find_channel_from_si()
breaks module build
--
commit 718e10915f3477f57c274d88a2bc69f6fa1e9766
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 sensor,
introduces a no_als_support flag to skip ALS register accesses on
proximity-only chips, and updates ltr501_trigger_handler() to check
channel types via iio_find_channel_from_si().
> diff --git a/drivers/iio/light/ltr501.c b/drivers/iio/light/ltr501.c
> index a471c90cf0a75..37682e7067b52 100644
> --- a/drivers/iio/light/ltr501.c
> +++ b/drivers/iio/light/ltr501.c
[ ... ]
> @@ -1251,16 +1286,21 @@ static irqreturn_t ltr501_trigger_handler(int irq, void *p)
> aligned_s64 ts;
> } scan = { };
> __le16 als_buf[2];
> + unsigned int si;
> 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;
> + iio_for_each_active_channel(indio_dev, si) {
> + const struct iio_chan_spec *chan = iio_find_channel_from_si(indio_dev, si);
> +
> + if (chan->type == IIO_INTENSITY)
> + mask |= LTR501_STATUS_ALS_RDY;
> +
> + if (chan->type == IIO_PROXIMITY)
> + mask |= LTR501_STATUS_PS_RDY;
> + }
[Severity: High]
As reported by kernel test robot on v3 [1], does calling
iio_find_channel_from_si() here break modular builds when CONFIG_LTR501=m?
iio_find_channel_from_si() is defined in drivers/iio/industrialio-core.c
without EXPORT_SYMBOL or EXPORT_SYMBOL_GPL, causing modpost to fail with
an undefined symbol error when ltr501 is built as a module.
[1] https://lore.kernel.org/r/202611090518.mm6yt2nO-lkp@intel.com
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261122080753.36349-1-clamor95@gmail.com?part=4
prev parent reply other threads:[~2026-11-22 8:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-22 8:07 [PATCH v5 0/4] iio: light: ltr501: Add LTR-659PS-01 prox sensor support Svyatoslav Ryhel
2026-11-22 8:07 ` [PATCH v5 1/4] iio: light: ltr501: Switch to read_avail() op from manual attribute registration Svyatoslav Ryhel
2026-11-22 8:07 ` [PATCH v5 2/4] iio: light: ltr501: Switch to modern match mechanism Svyatoslav Ryhel
2026-11-22 8:07 ` [PATCH v5 3/4] dt-bindings: iio: light: ltr501: Document LTR659 proximity sensor Svyatoslav Ryhel
2026-11-22 8:07 ` [PATCH v5 4/4] iio: light: ltr501: Add support for the LTR-659PS-01 " Svyatoslav Ryhel
2026-11-22 8:18 ` sashiko-bot [this message]
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-227817@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