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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aUpcvT1IKyfxr7xb@hu-kotarake-hyd.qualcomm.com>
Date: Tue, 23 Dec 2025 14:41:25 +0530
From: Rakesh Kota <rakesh.kota@....qualcomm.com>
To: Sebastian Reichel <sebastian.reichel@...labora.com>
Cc: Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
        Conor Dooley <conor+dt@...nel.org>, linux-pm@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        kamal.wadhwa@....qualcomm.com, fenglin.wu@....qualcomm.com
Subject: Re: [PATCH 2/2] power: supply: core: Add SiLION battery technology

On Sun, Dec 21, 2025 at 09:57:01PM +0900, Sebastian Reichel wrote:
> Hi,
> 
> On Mon, Nov 24, 2025 at 04:42:41PM +0530, Rakesh Kota wrote:
> > Add support for lithium-ion-silicon-anode (SiLION) battery technology
> > to enable proper identification of devices using this newer battery
> > chemistry. Without this change, such batteries would report as
> > unknown technology.
> > 
> > Introduce POWER_SUPPLY_TECHNOLOGY_SiLION and update technology
> > mappings across core, sysfs, and test interfaces.
> > 
> > Signed-off-by: Rakesh Kota <rakesh.kota@....qualcomm.com>
> > ---
> 
> The change itself looks good to me, but it must be submitted with a
> user (e.g. an update to the qcom_battmgr) as a follow-up patch.
>

Actually, we do not have any changes in the qcom_battmgr driver or in
the device tree related to this battery chemistry technology text.

The battery chemistry is obtained from the charger firmware, which runs
on the remote processor. The charger FW shares the
battmgr->info.technology value with us, and based on this value the
power supply framework derives and prints the corresponding battery
chemistry string. There is no local hard-coding or DT-based battery
chemistry mapping.

Best regards,
Rakesh

> Greetings,
> 
> -- Sebastian
> 
> >  Documentation/ABI/testing/sysfs-class-power | 2 +-
> >  drivers/power/supply/power_supply_core.c    | 2 ++
> >  drivers/power/supply/power_supply_sysfs.c   | 1 +
> >  drivers/power/supply/test_power.c           | 3 ++-
> >  include/linux/power_supply.h                | 1 +
> >  5 files changed, 7 insertions(+), 2 deletions(-)
> > 
> > diff --git a/Documentation/ABI/testing/sysfs-class-power b/Documentation/ABI/testing/sysfs-class-power
> > index 4b21d5d2325136be65126d4d1d6e64608280fe44..1f42e6f138ea8ae0fe8c232c38d0ff6fb20180e7 100644
> > --- a/Documentation/ABI/testing/sysfs-class-power
> > +++ b/Documentation/ABI/testing/sysfs-class-power
> > @@ -525,7 +525,7 @@ Description:
> >  
> >  		Valid values:
> >  			      "Unknown", "NiMH", "Li-ion", "Li-poly", "LiFe",
> > -			      "NiCd", "LiMn"
> > +			      "NiCd", "LiMn", "Si-Li-ion"
> >  
> >  
> >  What:		/sys/class/power_supply/<supply_name>/voltage_avg,
> > diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c
> > index 9a28381e2607d650fa9b719b683af375bb118fad..385ab8aa7e69f3f804e7ac0ee3782446f18e2c3f 100644
> > --- a/drivers/power/supply/power_supply_core.c
> > +++ b/drivers/power/supply/power_supply_core.c
> > @@ -677,6 +677,8 @@ int power_supply_get_battery_info(struct power_supply *psy,
> >  			info->technology = POWER_SUPPLY_TECHNOLOGY_LiFe;
> >  		else if (!strcmp("lithium-ion-manganese-oxide", value))
> >  			info->technology = POWER_SUPPLY_TECHNOLOGY_LiMn;
> > +		else if (!strcmp("lithium-ion-silicon-anode", value))
> > +			info->technology = POWER_SUPPLY_TECHNOLOGY_SiLION;
> >  		else
> >  			dev_warn(&psy->dev, "%s unknown battery type\n", value);
> >  	}
> > diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supply/power_supply_sysfs.c
> > index 198405f7126f96a57a549cd1ecb9b71089b9c3d0..f2a5ec519b2ef60fb5ede101ca461d899218e186 100644
> > --- a/drivers/power/supply/power_supply_sysfs.c
> > +++ b/drivers/power/supply/power_supply_sysfs.c
> > @@ -122,6 +122,7 @@ static const char * const POWER_SUPPLY_TECHNOLOGY_TEXT[] = {
> >  	[POWER_SUPPLY_TECHNOLOGY_LiFe]		= "LiFe",
> >  	[POWER_SUPPLY_TECHNOLOGY_NiCd]		= "NiCd",
> >  	[POWER_SUPPLY_TECHNOLOGY_LiMn]		= "LiMn",
> > +	[POWER_SUPPLY_TECHNOLOGY_SiLION]	= "Si-Li-ion",
> >  };
> >  
> >  static const char * const POWER_SUPPLY_CAPACITY_LEVEL_TEXT[] = {
> > diff --git a/drivers/power/supply/test_power.c b/drivers/power/supply/test_power.c
> > index 2c0e9ad820c0db23165758303a16bddac1a1634b..64bd4a1147ca06566a909513a80760ad707a8605 100644
> > --- a/drivers/power/supply/test_power.c
> > +++ b/drivers/power/supply/test_power.c
> > @@ -437,6 +437,7 @@ static struct battery_property_map map_technology[] = {
> >  	{ POWER_SUPPLY_TECHNOLOGY_LiFe, "LiFe" },
> >  	{ POWER_SUPPLY_TECHNOLOGY_NiCd, "NiCd" },
> >  	{ POWER_SUPPLY_TECHNOLOGY_LiMn, "LiMn" },
> > +	{ POWER_SUPPLY_TECHNOLOGY_SiLION, "SiLION" },
> >  	{ -1,				NULL   },
> >  };
> >  
> > @@ -733,7 +734,7 @@ MODULE_PARM_DESC(battery_present,
> >  
> >  module_param(battery_technology, battery_technology, 0644);
> >  MODULE_PARM_DESC(battery_technology,
> > -	"battery technology <NiMH|LION|LIPO|LiFe|NiCd|LiMn>");
> > +	"battery technology <NiMH|LION|LIPO|LiFe|NiCd|LiMn|SiLION>");
> >  
> >  module_param(battery_health, battery_health, 0644);
> >  MODULE_PARM_DESC(battery_health,
> > diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
> > index 360ffdf272dab86241f1aac4650d1a91a088a84b..04996037219d5a22d2b2a7f136e5d3565a4507ca 100644
> > --- a/include/linux/power_supply.h
> > +++ b/include/linux/power_supply.h
> > @@ -83,6 +83,7 @@ enum {
> >  	POWER_SUPPLY_TECHNOLOGY_LiFe,
> >  	POWER_SUPPLY_TECHNOLOGY_NiCd,
> >  	POWER_SUPPLY_TECHNOLOGY_LiMn,
> > +	POWER_SUPPLY_TECHNOLOGY_SiLION,
> >  };
> >  
> >  enum {
> > 
> > -- 
> > 2.34.1
> > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ