Re: [RFC] shutdown machine when li-ion battery goes below 3V
From: Olaf Titz
Date: Tue Oct 25 2016 - 15:34:11 EST
> + res = bq27xxx_battery_voltage(di, &val);
> + if (res)
> + return res;
> +
> + mV = val.intval / 1000;
Reading that code I stumbled over the comment in
bq27xxx_battery_voltage saying that it returns millivolts. The code
here, the code in bq27xxx_battery_voltage and power_supply.h all
indicate that it in fact returns microvolts. Please double-check and
fix, as it stands now the code looks inconsistent (but not knowing that
device at all I don't feel fit to submit a fix).
regards, Olaf