Skip to content

Commit 277e570

Browse files
committed
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
2 parents d813a8c + e3f2396 commit 277e570

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/power/supply/sbs-battery.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,12 @@ static int sbs_update_presence(struct sbs_info *chip, bool is_present)
280280
else
281281
client->flags &= ~I2C_CLIENT_PEC;
282282

283+
if (of_device_is_compatible(client->dev.parent->of_node, "google,cros-ec-i2c-tunnel")
284+
&& client->flags & I2C_CLIENT_PEC) {
285+
dev_info(&client->dev, "Disabling PEC because of broken Cros-EC implementation\n");
286+
client->flags &= ~I2C_CLIENT_PEC;
287+
}
288+
283289
dev_dbg(&client->dev, "PEC: %s\n", (client->flags & I2C_CLIENT_PEC) ?
284290
"enabled" : "disabled");
285291

0 commit comments

Comments
 (0)