Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

bq27x00-battery time to full/empty reporting fixes. Instead of return…

…ing -ENODATA, properties will mow be given a value of -1 when time data isnt available.. Messages like: power_supply bq27500-0: driver failed to report `time_to_full_now' property will no longer be reported.

Signed-off-by: Matt Isaacs <izzy@buglabs.net>
  • Loading branch information...
commit 907e7a98c53d9423932ecdd176373dee375bd83f 1 parent bade24e
Matt Isaacs authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 drivers/power/bq27x00_battery.c
View
6 drivers/power/bq27x00_battery.c
@@ -233,9 +233,9 @@ static int bq27x00_battery_time(struct bq27x00_device_info *di, int reg,
}
if (tval == 65535)
- return -ENODATA;
-
- val->intval = tval * 60;
+ val->intval = -1;
+ else
+ val->intval = tval * 60;
return 0;
}
Please sign in to comment.
Something went wrong with that request. Please try again.