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] [day] [month] [year] [list]
Date:   Fri, 3 Feb 2023 13:33:35 +0100
From:   Sebastian Reichel <sebastian.reichel@...labora.com>
To:     Hermes Zhang <chenhuiz@...s.com>
Cc:     kernel@...s.com, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] power: supply: bq256xx: Init ichg/vbat value with
 chip default value

Hi,

On Tue, Jan 10, 2023 at 10:47:46AM +0800, Hermes Zhang wrote:
> Init the ichg/vbat reg with chip default value instead of the max value
> used now. The max value set in driver will result an unsafe case (e.g.
> battery is over charging when in a hot environment) if no user space
> update the value later.
> 
> Signed-off-by: Hermes Zhang <chenhuiz@...s.com>
> ---

Thanks, queued.

-- Sebastian

> 
> Notes:
>     V2
> 
>  drivers/power/supply/bq256xx_charger.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/power/supply/bq256xx_charger.c b/drivers/power/supply/bq256xx_charger.c
> index 01ad84fd147c..6b5435bf2ed4 100644
> --- a/drivers/power/supply/bq256xx_charger.c
> +++ b/drivers/power/supply/bq256xx_charger.c
> @@ -1563,7 +1563,7 @@ static int bq256xx_hw_init(struct bq256xx_device *bq)
>  		return ret;
>  
>  	ret = bq->chip_info->bq256xx_set_ichg(bq,
> -				bat_info->constant_charge_current_max_ua);
> +				bq->chip_info->bq256xx_def_ichg);
>  	if (ret)
>  		return ret;
>  
> @@ -1573,7 +1573,7 @@ static int bq256xx_hw_init(struct bq256xx_device *bq)
>  		return ret;
>  
>  	ret = bq->chip_info->bq256xx_set_vbatreg(bq,
> -				bat_info->constant_charge_voltage_max_uv);
> +				bq->chip_info->bq256xx_def_vbatreg);
>  	if (ret)
>  		return ret;
>  
> -- 
> 2.30.2
> 

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ