All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee@kernel.org>
To: Jack Chen <zenghuchen@google.com>
Cc: Pavel Machek <pavel@ucw.cz>, Mark Brown <broonie@kernel.org>,
	Vadim Pasternak <vadimp@nvidia.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org
Subject: Re: [PATCH] leds: lm3601x: reset led controller during init
Date: Thu, 1 Aug 2024 14:15:11 +0100	[thread overview]
Message-ID: <20240801131511.GA1019230@google.com> (raw)
In-Reply-To: <20240729204054.2269031-1-zenghuchen@google.com>

Nit: Subject line descriptions start with an uppercase char in LED.

> LED controller should be reset during initialization to avoid abnormal
> behaviors. For example, when power to SoC is recycled but power to LED
> controller is not, LED controller should not presume to be in original
> state.
> 
> Signed-off-by: Jack Chen <zenghuchen@google.com>
> ---
>  drivers/leds/flash/leds-lm3601x.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/leds/flash/leds-lm3601x.c b/drivers/leds/flash/leds-lm3601x.c
> index 7e93c447fec5..978256310540 100644
> --- a/drivers/leds/flash/leds-lm3601x.c
> +++ b/drivers/leds/flash/leds-lm3601x.c
> @@ -434,6 +434,10 @@ static int lm3601x_probe(struct i2c_client *client)
>  		return ret;
>  	}
>  
> +	ret = regmap_write(led->regmap, LM3601X_DEV_ID_REG, LM3601X_SW_RESET);

So this controller is reset via the ID register?

> +	if (ret)
> +		dev_warn(&client->dev, "led controller is failed to reset\n");

"LED controller failed to reset"

Or

"Failed to reset the LED controller"

>  	mutex_init(&led->lock);
>  
>  	return lm3601x_register_leds(led, fwnode);
> -- 
> 2.46.0.rc1.232.g9752f9e123-goog
> 
> 

-- 
Lee Jones [李琼斯]

  reply	other threads:[~2024-08-01 13:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-29 20:40 [PATCH] leds: lm3601x: reset led controller during init Jack Chen
2024-08-01 13:15 ` Lee Jones [this message]
2024-08-01 15:27   ` Jack Chen

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=20240801131511.GA1019230@google.com \
    --to=lee@kernel.org \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rdunlap@infradead.org \
    --cc=vadimp@nvidia.com \
    --cc=zenghuchen@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.