Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jun Yan" <jerrysteve1101@gmail.com>
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v5 4/5] leds: is31fl32xx: Add powerdown pin to exit hardware shutdown mode
Date: Fri, 08 May 2026 21:15:49 +0000	[thread overview]
Message-ID: <20260508211550.35159C2BCB0@smtp.kernel.org> (raw)
In-Reply-To: <20260508131139.1523597-5-jerrysteve1101@gmail.com>

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] Missing stabilization delay after exiting hardware shutdown.
- [Medium] Device is not placed back into hardware shutdown on driver removal.
- [Low] Incorrect header included for the descriptor-based GPIO API.
--

commit 0d566feaa3d3c1a7340af532307bd3b794d71799
Author: Jun Yan <jerrysteve1101@gmail.com>

leds: is31fl32xx: Add powerdown pin to exit hardware shutdown mode

This commit adds support for the SDB shutdown pin on the IS31FL32XX series
LED controllers. It requests the "powerdown" GPIO during probe and drives it
low to exit hardware shutdown mode so the chip can be initialized.

> diff --git a/drivers/leds/leds-is31fl32xx.c b/drivers/leds/leds-is31fl32xx.c
> index fe07acbb103a8..57d779e07a624 100644
> --- a/drivers/leds/leds-is31fl32xx.c
> +++ b/drivers/leds/leds-is31fl32xx.c
> @@ -10,6 +10,7 @@
>   */
>  
>  #include <linux/device.h>
> +#include <linux/gpio.h>

This isn't a bug, but since this patch uses the modern descriptor-based GPIO
API (devm_gpiod_get_optional and GPIOD_OUT_LOW), should this include
<linux/gpio/consumer.h> instead of the legacy <linux/gpio.h>?

[ ... ]

> @@ -421,6 +423,11 @@ static int is31fl32xx_parse_dt(struct device *dev,
>  	const struct is31fl32xx_chipdef *cdef = priv->cdef;
>  	int ret = 0;
>  
> +	priv->powerdown_gpio = devm_gpiod_get_optional(dev, "powerdown", GPIOD_OUT_LOW);
> +	if (IS_ERR(priv->powerdown_gpio))
> +		return dev_err_probe(dev, PTR_ERR(priv->powerdown_gpio),
> +				"Failed to get powerdown gpio\n");
> +
>  	if ((cdef->output_frequency_setting_reg != IS31FL32XX_REG_NONE) &&
>  	    of_property_read_bool(dev_of_node(dev), "issi,22khz-pwm")) {
>  
>  		ret = is31fl32xx_write(priv, cdef->output_frequency_setting_reg,

Does the hardware require a stabilization delay after the powerdown pin is
driven low?

Hardware LED controllers typically require some time, often around 400us to
1ms, for their internal oscillator to stabilize before the I2C interface
becomes responsive.

If we initiate I2C communications immediately after asserting the GPIO, could
the initial I2C transaction fail with a NACK and cause the probe to abort on
physical hardware?

Also, a general question about the lifecycle of the powerdown pin:

The commit message notes this feature is used to exit hardware shutdown mode
for power saving. Does the device need to be placed back into hardware shutdown
during driver removal?

While the devres framework automatically frees the GPIO descriptor upon driver
unbind, it only releases the reference and does not alter the physical state
of the pin. Would it make sense to explicitly assert the shutdown state in the
remove function to ensure the device actually powers down when the driver is
unloaded?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260508131139.1523597-1-jerrysteve1101@gmail.com?part=4

  reply	other threads:[~2026-05-08 21:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-08 13:11 [PATCH v5 0/5] leds: Add powerdown gpio for is31fl32xx Jun Yan
2026-05-08 13:11 ` [PATCH v5 1/5] dt-bindings: leds: is31fl32xx: convert the binding to yaml Jun Yan
2026-05-08 20:49   ` sashiko-bot
2026-05-08 13:11 ` [PATCH v5 2/5] dt-bindings: leds: leds-is31fl32xx: add support for is31fl3236a Jun Yan
2026-05-08 13:11 ` [PATCH v5 3/5] dt-bindings: leds: leds-is31fl32xx: Add powerdown-gpios property Jun Yan
2026-05-08 13:11 ` [PATCH v5 4/5] leds: is31fl32xx: Add powerdown pin to exit hardware shutdown mode Jun Yan
2026-05-08 21:15   ` sashiko-bot [this message]
2026-05-08 13:11 ` [PATCH v5 5/5] leds: is31f132xx: Fix missing brightness_steps for is31f13236 Jun Yan
2026-05-08 21:28   ` 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=20260508211550.35159C2BCB0@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jerrysteve1101@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko@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