lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240801131511.GA1019230@google.com>
Date: Thu, 1 Aug 2024 14:15:11 +0100
From: Lee Jones <lee@...nel.org>
To: Jack Chen <zenghuchen@...gle.com>
Cc: Pavel Machek <pavel@....cz>, Mark Brown <broonie@...nel.org>,
	Vadim Pasternak <vadimp@...dia.com>,
	Randy Dunlap <rdunlap@...radead.org>, linux-kernel@...r.kernel.org,
	linux-leds@...r.kernel.org
Subject: Re: [PATCH] leds: lm3601x: reset led controller during init

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@...gle.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 [李琼斯]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ