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]
Message-ID: <v4apnrdr2ydc3jpuiqfqk4ttof45zj37wpm5vr3u4w3drtfbl7@wk7khzxnfg3q>
Date: Fri, 13 Dec 2024 23:01:37 +0100
From: Sebastian Reichel <sre@...nel.org>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: Kim Seer Paller <kimseer.paller@...log.com>, linux-pm@...r.kernel.org, 
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, Rob Herring <robh@...nel.org>, 
	Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, 
	Mike Looijmans <mike.looijmans@...ic.nl>
Subject: Re: [PATCH v6 2/2] power/supply: Add support for ltc4162-f/s and
 ltc4015

Hi,

On Fri, Dec 13, 2024 at 07:31:45PM +0100, Christophe JAILLET wrote:
> Le 13/12/2024 à 03:37, Kim Seer Paller a écrit :
> > LTC4162-L 35V/3.2A Multi-Cell Lithium-Ion Step-Down Battery Charger
> > LTC4162-F 35V/3.2A Multi-Cell LiFePO4 Step-Down Battery Charger
> > LTC4162-S 35V/3.2A Lead-Acid Step-Down Battery Charger
> > LTC4015 35V/3.2A Multichemistry Buck Battery Charger Controller
> 
> ...
> 
> > +static int ltc4015_get_vcharge(struct ltc4162l_info *info,
> > +			       unsigned int reg,
> > +			       union power_supply_propval *val)
> >   {
> > -	u8 cell_count = ltc4162l_get_cell_count(info);
> > +	unsigned int regval, chem_type;
> > +	int ret;
> > +	u32 voltage;
> > +
> > +	ret = regmap_read(info->regmap, reg, &regval);
> > +	if (ret)
> > +		return ret;
> > -	if (!cell_count)
> > -		return -EBUSY; /* Not available yet, try again later */
> > +	regval &= BIT(6) - 1; /* Only the lower 5 bits */
> 
> Nitpick, should there be a v7:
> 	Would using GENMASK(5, 0) be clearer and self-explanatory?

I merged the driver, but getting a follow-up patch with this change
would be nice :)

-- Sebastian

> 
> > +
> > +	/*
> > +	 * charge voltage setting can be computed from:
> > +	 * cell_count × (vcharge_setting × a + b)
> > +	 * where vcharge_setting ranges from 0 to c (d).
> ...
> 
> CJ
> 

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