summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBoris Shtrasman <borissh1983@gmail.com>2026-06-24 16:57:18 +0300
committerSebastian Reichel <sebastian.reichel@collabora.com>2026-07-21 22:28:11 +0200
commitf97d9166048ddea147b5673330f9900bf08c725d (patch)
tree1d6818e43384c1bc86b34f1e7fd07d6cdffe747a /drivers
parente4426ddf7844096b6ced5de716401dcf1eb1e08b (diff)
power: supply: sbs-battery: Add PbAc, NiZn, RAM, and ZnAr support
Add support for PbAc, NiZn, RAM, and ZnAr chemistries as defined in the Smart Battery Data Specification v1.1 (Section 5.1.30 DeviceChemistry). Currently, the sbs-battery driver only handles LION, LiP, NiCd and NiMH. The Smart Battery specification defines 8 possible values: - Lead Acid (PbAc) - Lithium Ion (LION) - Nickel Cadmium (NiCd) - Nickel Metal Hydride (NiMH) - Nickel Zinc (NiZn) - Rechargeable Alkaline-Manganese (RAM) - Zinc Air (ZnAr) - Lithium Polymer (LiP) Link: https://sbs-forum.org/specs/sbdat110.pdf Signed-off-by: Boris Shtrasman <borissh1983@gmail.com> Link: https://patch.msgid.link/20260624135718.286771-3-borissh1983@gmail.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/power/supply/sbs-battery.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/power/supply/sbs-battery.c b/drivers/power/supply/sbs-battery.c
index 017ec06be766..17b0fe296902 100644
--- a/drivers/power/supply/sbs-battery.c
+++ b/drivers/power/supply/sbs-battery.c
@@ -860,6 +860,14 @@ static int sbs_get_chemistry(struct sbs_info *chip,
chip->technology = POWER_SUPPLY_TECHNOLOGY_NiCd;
else if (!strncasecmp(chemistry, "NiMH", 4))
chip->technology = POWER_SUPPLY_TECHNOLOGY_NiMH;
+ else if (!strncasecmp(chemistry, "PbAc", 4))
+ chip->technology = POWER_SUPPLY_TECHNOLOGY_PbAc;
+ else if (!strncasecmp(chemistry, "NiZn", 4))
+ chip->technology = POWER_SUPPLY_TECHNOLOGY_NiZn;
+ else if (!strncasecmp(chemistry, "RAM", 3))
+ chip->technology = POWER_SUPPLY_TECHNOLOGY_RAM;
+ else if (!strncasecmp(chemistry, "ZnAr", 4))
+ chip->technology = POWER_SUPPLY_TECHNOLOGY_ZnAr;
else
chip->technology = POWER_SUPPLY_TECHNOLOGY_UNKNOWN;