summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-10-09 21:38:07 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2020-10-09 21:38:07 +0300
commit277e570ae193ddd39a7d16f08e3647f2f110c6a3 (patch)
treed114414b77e895fc1528994de236bbf78da579c5 /drivers
parentd813a8cb8d90225a6c0051b5b050c8dd03cc435c (diff)
parente3f2396b7570751a7ddba996812fb608134fd63c (diff)
downloadlinux-277e570ae193ddd39a7d16f08e3647f2f110c6a3.tar.xz
Merge tag 'for-v5.9-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply
Pull power supply fix from Sebastian Reichel: "Just a single change to revert enablement of packet error checking for battery data on Chromebooks, since some of their embedded controllers do not handle it correctly" * tag 'for-v5.9-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: power: supply: sbs-battery: chromebook workaround for PEC
Diffstat (limited to 'drivers')
-rw-r--r--drivers/power/supply/sbs-battery.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/power/supply/sbs-battery.c b/drivers/power/supply/sbs-battery.c
index 49c3508a6b79..7439753fac87 100644
--- a/drivers/power/supply/sbs-battery.c
+++ b/drivers/power/supply/sbs-battery.c
@@ -280,6 +280,12 @@ static int sbs_update_presence(struct sbs_info *chip, bool is_present)
else
client->flags &= ~I2C_CLIENT_PEC;
+ if (of_device_is_compatible(client->dev.parent->of_node, "google,cros-ec-i2c-tunnel")
+ && client->flags & I2C_CLIENT_PEC) {
+ dev_info(&client->dev, "Disabling PEC because of broken Cros-EC implementation\n");
+ client->flags &= ~I2C_CLIENT_PEC;
+ }
+
dev_dbg(&client->dev, "PEC: %s\n", (client->flags & I2C_CLIENT_PEC) ?
"enabled" : "disabled");