devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: Rakesh Kota <rakesh.kota@oss.qualcomm.com>
Cc: Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-pm@vger.kernel.org,  devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, kamal.wadhwa@oss.qualcomm.com,
	 fenglin.wu@oss.qualcomm.com
Subject: Re: [PATCH 2/2] power: supply: core: Add SiLION battery technology
Date: Sun, 21 Dec 2025 21:57:01 +0900	[thread overview]
Message-ID: <aUft_bUIhiMJF_2A@venus> (raw)
In-Reply-To: <20251124-add_silion_battery-v1-2-3c86b70d2543@oss.qualcomm.com>

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@oss.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.

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
> 

  reply	other threads:[~2025-12-22  1:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-24 11:12 [PATCH 0/2] battery: Add SiLION battery technology Rakesh Kota
2025-11-24 11:12 ` [PATCH 1/2] dt-bindings: battery: Add SiLION battery bindings technology Rakesh Kota
2025-11-24 11:37   ` Krzysztof Kozlowski
2025-11-25 14:59     ` Rakesh Kota
2025-11-26  8:14       ` Krzysztof Kozlowski
2025-11-26 13:06         ` Rakesh Kota
2025-11-24 11:12 ` [PATCH 2/2] power: supply: core: Add SiLION battery technology Rakesh Kota
2025-12-21 12:57   ` Sebastian Reichel [this message]
2025-12-23  9:11     ` Rakesh Kota

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=aUft_bUIhiMJF_2A@venus \
    --to=sebastian.reichel@collabora.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=fenglin.wu@oss.qualcomm.com \
    --cc=kamal.wadhwa@oss.qualcomm.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rakesh.kota@oss.qualcomm.com \
    --cc=robh@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).