Browse files

max17042: Fix fuel alert wakelocks

The fuel alert triggers when the SOC goes below a certain threshold,
which causes a device wakelock.

However, when the SOC starts rising, the wakelock was only destroyed
when the fuel was EXACTLY the threshold - so if that threshold were skipped
the fuel alert wakelock would stick.
  • Loading branch information...
1 parent 4da6c12 commit fc9eb85807302583259e27013ed184a43107bb67 @Entropy512 committed Oct 19, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 drivers/power/max17042-fuelgauge.c
@@ -504,7 +504,7 @@ static void max17042_work(struct work_struct *work)
"fuel alert already activated (raw:%d)\n",
- } else if (chip->raw_soc == chip->fuel_alert_soc) {
+ } else if (chip->raw_soc >= chip->fuel_alert_soc) {
if(chip->is_fuel_alerted) {
chip->is_fuel_alerted = false;

0 comments on commit fc9eb85

Please sign in to comment.