a7d9ace4eb
There are a few issues found around the battery not being present. If the battery isn't present, then a few undesirable things happen. The first was excessive reporting of failed properties. This was fixed by instead returning ENODATA for all properties other than PRESENT if the battery isn't present. That way the callers can identify the difference between a failure and the battery not being there. The next issue was in the suspend logic. It was found that if the battery wasn't present, then it would return a failure, preventing the system from going into suspend. If there is no battery present, the io is expected to fail, so in that case, we shouldn't return the failure and just acknowledge that it was expected. I also found that when a gpio was used, i didn't maintain the internal is_present state properly. I added a set of that to fix that. Lastly, the code to see io's fail and figure out that the battery isn't present when not using a gpio had a problem. In that code, it looked for the read to fail and if it did, then handled it. The problem is that in function to get the property, it first writes a value and that write can fail, causing the code to never reach the logic after the read. Fix is to move the logic till after the write. Signed-off-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com> |
||
---|---|---|
.. | ||
apm_power.c | ||
bq20z75.c | ||
bq27x00_battery.c | ||
collie_battery.c | ||
da9030_battery.c | ||
ds2760_battery.c | ||
ds2782_battery.c | ||
gpio-charger.c | ||
intel_mid_battery.c | ||
isp1704_charger.c | ||
jz4740-battery.c | ||
Kconfig | ||
Makefile | ||
max8925_power.c | ||
max17040_battery.c | ||
max17042_battery.c | ||
olpc_battery.c | ||
pcf50633-charger.c | ||
pda_power.c | ||
pmu_battery.c | ||
power_supply.h | ||
power_supply_core.c | ||
power_supply_leds.c | ||
power_supply_sysfs.c | ||
s3c_adc_battery.c | ||
test_power.c | ||
tosa_battery.c | ||
twl4030_charger.c | ||
wm97xx_battery.c | ||
wm831x_backup.c | ||
wm831x_power.c | ||
wm8350_power.c | ||
z2_battery.c |