Messages in this thread | | | Date | Mon, 16 Jul 2012 01:40:11 -0700 | From | Anton Vorontsov <> | Subject | Re: [PATCH 1/2] olpc-battery: Add VOLTAGE_MAX_DESIGN property |
| |
On Sun, Jul 15, 2012 at 10:43:25PM +0100, Daniel Drake wrote: > From: Richard A. Smith <richard@laptop.org> > > upowerd wants to compute the energy in the battery by looking at this > property. If it's not present then it falls back on using the reported > voltage of the battery at time upowerd loads. That's close but also > means that every time you boot you get a slightly different energy > capacity. > > Adding the VOLTAGE_MAX_DESIGN property allows upowerd to compute the > same energy every time. > > Signed-off-by: Richard A. Smith <richard@laptop.org> > Signed-off-by: Daniel Drake <dsd@laptop.org> > ---
Both patches applied, thank you!
[...] > +static int olpc_bat_get_voltage_max_design(union power_supply_propval *val) > +{ > + uint8_t ec_byte; > + union power_supply_propval tech; > + int ret, mfr;
ret and mfr should have been on separate lines (yes, I understand that this comes from olpc_bat_get_charge_full_design(), but the function is the only abuser in the file, so it would be better to fix it, not spread it further :-)
-- Anton Vorontsov Email: cbouatmailru@gmail.com
| |