From: sashiko-bot@kernel.org
To: "Peter LaDow" <pladow@gmail.com>
Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org, lee@kernel.org
Subject: Re: [PATCH v4 2/3] leds: rgb: lp5860: Consolidate common probe setup in lp5860_device_init()
Date: Fri, 04 Dec 2026 00:48:24 +0000 [thread overview]
Message-ID: <sashiko-outbox-248847@kernel.org> (raw)
In-Reply-To: <20261203-add-i2c-support-for-lp5860-v4-2-dd84962336b1@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] leds: lp5860: redundant undocumented spi_setup() call in
lp5860_probe()
--
commit 28b32b8370a90029a12f16f94635e9e60d510abd
Author: Peter LaDow <pladow@gmail.com>
leds: rgb: lp5860: Consolidate common probe setup in lp5860_device_init()
This commit moves child-node validation, struct lp5860 allocation, mutex
initialization, and driver data setup from the SPI probe function into
lp5860_device_init() in preparation for I2C support.
> diff --git a/drivers/leds/rgb/leds-lp5860-spi.c b/drivers/leds/rgb/leds-lp5860-spi.c
> index 6bf6a625c28af..94b645556c32d 100644
> --- a/drivers/leds/rgb/leds-lp5860-spi.c
> +++ b/drivers/leds/rgb/leds-lp5860-spi.c
[ ... ]
> @@ -36,40 +34,19 @@ static const struct regmap_config lp5860_regmap_config = {
> static int lp5860_probe(struct spi_device *spi)
> {
> struct device *dev = &spi->dev;
> - struct lp5860 *lp5860;
> - unsigned int multi_leds;
> + struct regmap *regmap;
> int ret;
>
[ ... ]
> - ret = devm_mutex_init(dev, &lp5860->lock);
> + ret = spi_setup(spi);
> if (ret)
> - return ret;
> + return dev_err_probe(dev, ret, "Failed to setup SPI.\n");
[Severity: Low]
Is this spi_setup() call needed in lp5860_probe()?
The SPI core already calls __spi_setup() in __spi_add_device() before
binding the driver, and lp5860_probe() does not modify spi->mode,
spi->bits_per_word, or spi->max_speed_hz. Calling spi_setup() again
just repeats controller setup on every probe.
The commit message also does not mention or justify this change. Unless
specific SPI parameters need to be configured here, can this call be
dropped?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261203-add-i2c-support-for-lp5860-v4-0-dd84962336b1@gmail.com?part=2
next prev parent reply other threads:[~2026-12-04 0:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 0:34 [PATCH v4 0/3] leds: rgb: lp5860: Add I2C support Peter LaDow via B4 Relay
2026-12-04 0:34 ` [PATCH v4 1/3] dt-bindings: leds: ti,lp5860: Document I2C interface Peter LaDow via B4 Relay
2026-12-04 0:34 ` [PATCH v4 2/3] leds: rgb: lp5860: Consolidate common probe setup in lp5860_device_init() Peter LaDow via B4 Relay
2026-12-04 0:48 ` sashiko-bot [this message]
2026-12-04 0:34 ` [PATCH v4 3/3] leds: rgb: lp5860: Add I2C interface support Peter LaDow via B4 Relay
2026-12-04 0:46 ` sashiko-bot
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-248847@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lee@kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pladow@gmail.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