blob: 742c5d3e82c3a1e4d20b0853d6fc2df78367d08b [file] [log] [blame]
From 6daacfdb9fe504f6a60099ce230bbdbd1208792f Mon Sep 17 00:00:00 2001
From: Michael Nosthoff <>
Date: Fri, 16 Aug 2019 09:37:42 +0200
Subject: [PATCH] power: supply: sbs-battery: use correct flags field
commit 99956a9e08251a1234434b492875b1eaff502a12 upstream.
the type flag is stored in the chip->flags field not in the
client->flags field. This currently leads to never using the ti
specific health function as client->flags doesn't use that bit.
So it's always falling back to the general one.
Fixes: 76b16f4cdfb8 ("power: supply: sbs-battery: don't assume MANUFACTURER_DATA formats")
Cc: <>
Signed-off-by: Michael Nosthoff <>
Reviewed-by: Brian Norris <>
Reviewed-by: Enric Balletbo i Serra <>
Signed-off-by: Sebastian Reichel <>
Signed-off-by: Paul Gortmaker <>
diff --git a/drivers/power/supply/sbs-battery.c b/drivers/power/supply/sbs-battery.c
index 048d205d7074..2e86cc1e0e35 100644
--- a/drivers/power/supply/sbs-battery.c
+++ b/drivers/power/supply/sbs-battery.c
@@ -620,7 +620,7 @@ static int sbs_get_property(struct power_supply *psy,
switch (psp) {
- if (client->flags & SBS_FLAGS_TI_BQ20Z75)
+ if (chip->flags & SBS_FLAGS_TI_BQ20Z75)
ret = sbs_get_ti_battery_presence_and_health(client,
psp, val);