Linux LED subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ahmad Byagowi" <ahmadexp@gmail.com>
Cc: linux-leds@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org,
	lee@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH net-next v5 2/7] leds: is32fl3207: Add controller driver
Date: Sat, 15 Aug 2026 23:11:51 +0000	[thread overview]
Message-ID: <20260815231151.949C41F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <200b35cd5847c318f4330dd162147b648c402601.1786747084.git.ahmadexp@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] `is32fl3207_clear_retained_scaling` fails to latch the zeroed scaling registers, leading to a brief LED flash during hardware initialization.
--

--- Patch [2]: [PATCH net-next v5 2/7] leds: is32fl3207: Add controller driver ---
commit 63a2ff2e96d1f984d184b4b7a9733188419e971d
Author: Ahmad Byagowi <ahmadexp@gmail.com>

leds: is32fl3207: Add controller driver

Add an I2C driver for the Lumissil IS32FL3207 18-channel LED controller.
Individual and multicolor LEDs are exposed through the LED class, with
support for brightness and channel scaling.

> diff --git a/drivers/leds/rgb/leds-is32fl3207.c b/drivers/leds/rgb/leds-is32fl3207.c
> new file mode 100644
> index 0000000000000..6a46f97ba50a5
> --- /dev/null
> +++ b/drivers/leds/rgb/leds-is32fl3207.c
[ ... ]
> +static int is32fl3207_clear_retained_scaling(struct is32fl3207 *chip)
> +{
> +	u8 scaling[IS32FL3207_NUM_CHANNELS] = { };
> +	int ret;
> +
> +	ret = regmap_write(chip->regmap, IS32FL3207_REG_CONTROL, 0);
> +	if (ret)
> +		return ret;
> +
> +	return regmap_bulk_write(chip->regmap,
> +				 IS32FL3207_REG_SCALING(0), scaling,
> +				 sizeof(scaling));
> +}

[Severity: Medium]
Will this fail to latch the zeroed scaling registers, leading to a brief LED
flash during hardware initialization?

The zeroing of the scaling registers is performed in software shutdown without
entering normal operation or issuing a PWM_UPDATE, leaving the active hardware
registers at their old values.

> +
> +static int is32fl3207_hw_init(struct is32fl3207 *chip)
> +{
> +	u8 scaling[IS32FL3207_NUM_CHANNELS] = { };
> +	u8 pwm[2 * IS32FL3207_NUM_CHANNELS] = { };
> +	int disable_ret;
> +	int ret;
> +
> +	/* Software reset requires normal operation (SSD = 1). */
> +	ret = regmap_write(chip->regmap, IS32FL3207_REG_CONTROL,
> +			   IS32FL3207_CONTROL_ENABLE);

[Severity: Medium]
When normal operation is enabled here to issue the software reset, will the
unlatched active registers drive the LEDs using their retained pre-boot values
and cause a flash?

The controller requires normal operation and a write to the PWM_UPDATE
register to latch new values into the active output stages. Because the
zeroed scaling values remain unlatched in shadow registers, this write to
enable normal operation causes the active registers to hold their pre-reboot
retained values, briefly illuminating the LEDs until the reset is processed.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1786746757.git.ahmadexp@gmail.com?part=2

  reply	other threads:[~2026-08-15 23:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-14 23:10 [PATCH net-next v5 0/7] ptp: ocp: Add R4006 and V9 I2C peripheral support Ahmad Byagowi
2026-08-14 23:10 ` [PATCH net-next v5 1/7] dt-bindings: leds: Add IS32FL3207 controller Ahmad Byagowi
2026-08-15 23:11   ` sashiko-bot
2026-08-14 23:10 ` [PATCH net-next v5 2/7] leds: is32fl3207: Add controller driver Ahmad Byagowi
2026-08-15 23:11   ` sashiko-bot [this message]
2026-08-14 23:10 ` [PATCH net-next v5 3/7] i2c: mux: Propagate software nodes to channel adapters Ahmad Byagowi
2026-08-15 23:11   ` sashiko-bot
2026-08-14 23:10 ` [PATCH net-next v5 4/7] ptp: ocp: Track EEPROM fields independently Ahmad Byagowi
2026-08-15 23:11   ` sashiko-bot
2026-08-14 23:10 ` [PATCH net-next v5 5/7] ptp: ocp: Add profile-driven I2C topology support Ahmad Byagowi
2026-08-15 23:11   ` sashiko-bot
2026-08-14 23:10 ` [PATCH net-next v5 6/7] ptp: ocp: Add R4006 I2C peripheral topology Ahmad Byagowi
2026-08-15 23:11   ` sashiko-bot
2026-08-14 23:10 ` [PATCH net-next v5 7/7] ptp: ocp: Add Time Card V9 " Ahmad Byagowi
2026-08-15 23:11   ` 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=20260815231151.949C41F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=ahmadexp@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --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