Linux LED subsystem development
 help / color / mirror / Atom feed
From: Lee Jones <lee@kernel.org>
To: Jun Yan <jerrysteve1101@gmail.com>
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-leds@vger.kernel.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, luccafachinetti@gmail.com,
	pzalewski@thegoodpenguin.co.uk, daniel@zonque.org
Subject: Re: [PATCH v7 4/6] leds: is31fl32xx: Add powerdown pin for hardware shutdown mode
Date: Wed, 27 May 2026 16:17:43 +0100	[thread overview]
Message-ID: <20260527151743.GA712405@google.com> (raw)
In-Reply-To: <20260520135659.1430008-5-jerrysteve1101@gmail.com>

On Wed, 20 May 2026, Jun Yan wrote:

> The IS31FL32XX series features an SDB shutdown pin.
> Driving it low (active low) places the chip into hardware shutdown

Nit: No need to wrap for a new sentence.

> mode for power saving, while all register contents are preserved
> and registers are not reset.
> 
> Deassert/assert the pin accordingly during probe() and remove()
> to manage hardware shutdown mode.
> 
> Signed-off-by: Jun Yan <jerrysteve1101@gmail.com>
> ---
>  drivers/leds/leds-is31fl32xx.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/leds/leds-is31fl32xx.c b/drivers/leds/leds-is31fl32xx.c
> index fe07acbb103a..5b9ed5a1818f 100644
> --- a/drivers/leds/leds-is31fl32xx.c
> +++ b/drivers/leds/leds-is31fl32xx.c
> @@ -10,6 +10,7 @@
>   */
>  
>  #include <linux/device.h>
> +#include <linux/gpio/consumer.h>
>  #include <linux/i2c.h>
>  #include <linux/kernel.h>
>  #include <linux/leds.h>
> @@ -60,6 +61,7 @@ struct is31fl32xx_led_data {
>  struct is31fl32xx_priv {
>  	const struct is31fl32xx_chipdef *cdef;
>  	struct i2c_client *client;
> +	struct gpio_desc *powerdown_gpio;
>  	unsigned int num_leds;
>  	struct is31fl32xx_led_data leds[];
>  };
> @@ -421,6 +423,14 @@ static int is31fl32xx_parse_dt(struct device *dev,
>  	const struct is31fl32xx_chipdef *cdef = priv->cdef;
>  	int ret = 0;
>  
> +	/* Driving this GPIO line low takes the chip out of shutdown,
> +	 * as it is flagged as GPIO_ACTIVE_LOW in provider (such as the device tree).
> +	 */

Please use properly formatted multi-line comments.

> +	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");

Nit: GPIO

> +
>  	if ((cdef->output_frequency_setting_reg != IS31FL32XX_REG_NONE) &&
>  	    of_property_read_bool(dev_of_node(dev), "issi,22khz-pwm")) {
>  
> @@ -609,6 +619,9 @@ static void is31fl32xx_remove(struct i2c_client *client)
>  	if (ret)
>  		dev_err(&client->dev, "Failed to reset registers on removal (%pe)\n",
>  			ERR_PTR(ret));
> +
> +	if (priv->powerdown_gpio)
> +		gpiod_set_value(priv->powerdown_gpio, 1);
>  }
>  
>  /*
> -- 
> 2.54.0
> 
> 

-- 
Lee Jones

  reply	other threads:[~2026-05-27 15:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-20 13:56 [PATCH v7 0/6] leds: Add powerdown gpio for is31fl32xx Jun Yan
2026-05-20 13:56 ` [PATCH v7 1/6] dt-bindings: leds: issi,is31fl32xx: convert the binding to yaml Jun Yan
2026-05-21  7:46   ` Krzysztof Kozlowski
2026-05-20 13:56 ` [PATCH v7 2/6] dt-bindings: leds: issi,is31fl32xx: add support for is31fl3236a Jun Yan
2026-05-20 13:56 ` [PATCH v7 3/6] dt-bindings: leds: issi,is31fl32xx: Add powerdown-gpios property Jun Yan
2026-05-20 13:56 ` [PATCH v7 4/6] leds: is31fl32xx: Add powerdown pin for hardware shutdown mode Jun Yan
2026-05-27 15:17   ` Lee Jones [this message]
2026-05-20 13:56 ` [PATCH v7 5/6] leds: is31fl32xx: Fix missing brightness_steps for is31fl3236 Jun Yan
2026-05-20 13:56 ` [PATCH v7 6/6] leds: is31fl32xx: Move pwm frequency setting to init_regs() Jun Yan
2026-05-27 15:19   ` Lee Jones

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=20260527151743.GA712405@google.com \
    --to=lee@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=daniel@zonque.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jerrysteve1101@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=luccafachinetti@gmail.com \
    --cc=pzalewski@thegoodpenguin.co.uk \
    --cc=robh@kernel.org \
    /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