lkml.org 
[lkml]   [2012]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2012-07-16 11:21    [W:0.038 / U:2.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site