From: sashiko-bot@kernel.org
To: "Jan Carlo Roleda" <jancarlo.roleda@analog.com>
Cc: linux-leds@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org,
lee@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v8 2/2] leds: ltc3208: Add driver for LTC3208 Multidisplay LED Driver
Date: Wed, 29 Jul 2026 23:22:49 +0000 [thread overview]
Message-ID: <20260729232249.A5CEF1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260730-upstream-ltc3208-v8-2-6bdcc35e65d7@analog.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Regcache desynchronization leads to inability to turn off LEDs left on by bootloader
--
--- Patch [2]: [PATCH v8 2/2] leds: ltc3208: Add driver for LTC3208 Multidisplay LED Driver ---
commit 438e39dda8c60e73fe40abad6d35331fd8bb4b80
Author: Jan Carlo Roleda <jancarlo.roleda@analog.com>
leds: ltc3208: Add driver for LTC3208 Multidisplay LED Driver
This commit adds support for the Analog Devices LTC3208 Multidisplay LED
driver. It supports 7 distinct LED channels and uses I2C for configuration,
utilizing regmap for register access and caching.
> diff --git a/drivers/leds/leds-ltc3208.c b/drivers/leds/leds-ltc3208.c
> new file mode 100644
> --- /dev/null
> +++ b/drivers/leds/leds-ltc3208.c
[ ... ]
> +static int ltc3208_probe(struct i2c_client *client)
> +{
[ ... ]
> + regmap = devm_regmap_init_i2c(client, <c3208_regmap_cfg);
> + if (IS_ERR(regmap))
> + return dev_err_probe(&client->dev, PTR_ERR(regmap), "Failed to initialize regmap.");
[Severity: Medium]
Does this code need to synchronize the register cache with the hardware
during initialization, for instance by calling regcache_sync() or explicitly
clearing the LED DAC registers?
If the bootloader or firmware leaves any LEDs physically turned on,
the regmap cache is still initialized with a default value of 0 for the
LED DAC registers (via ltc3208_reg_defaults), but the hardware itself
is not reset to 0.
If userspace later tries to turn off the LED by setting a brightness of 0,
will regmap_field_write() see that the requested value matches the
cached value (0) and optimize away the I2C transaction? This would leave
the LED physically on while the kernel and sysfs report it as off,
requiring the user to first set a non-zero brightness to force a hardware
update before they can successfully turn it off.
> +
> + disable_camhl_pin = device_property_read_bool(&client->dev, "adi,disable-camhl-pin");
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260730-upstream-ltc3208-v8-0-6bdcc35e65d7@analog.com?part=2
prev parent reply other threads:[~2026-07-29 23:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 23:14 [PATCH v8 0/2] Add support for LTC3208 multi-display driver Jan Carlo Roleda
2026-07-29 23:14 ` [PATCH v8 1/2] dt-bindings: leds: Document LTC3208 Multidisplay LED Driver Jan Carlo Roleda
2026-07-29 23:20 ` sashiko-bot
2026-07-29 23:14 ` [PATCH v8 2/2] leds: ltc3208: Add driver for " Jan Carlo Roleda
2026-07-29 23:22 ` 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=20260729232249.A5CEF1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jancarlo.roleda@analog.com \
--cc=lee@kernel.org \
--cc=linux-leds@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