public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Anton Vorontsov <anton.vorontsov@linaro.org>
To: Daniel Drake <dsd@laptop.org>
Cc: dwmw2@infradead.org, linux-kernel@vger.kernel.org,
	pgf@laptop.org, richard@laptop.org
Subject: Re: [PATCH 1/2] olpc-battery: Add VOLTAGE_MAX_DESIGN property
Date: Mon, 16 Jul 2012 01:40:11 -0700	[thread overview]
Message-ID: <20120716084011.GB26238@lizard> (raw)
In-Reply-To: <20120715214325.3DEC09D401E@zog.reactivated.net>

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

      reply	other threads:[~2012-07-16  8:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-15 21:43 [PATCH 1/2] olpc-battery: Add VOLTAGE_MAX_DESIGN property Daniel Drake
2012-07-16  8:40 ` Anton Vorontsov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120716084011.GB26238@lizard \
    --to=anton.vorontsov@linaro.org \
    --cc=dsd@laptop.org \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pgf@laptop.org \
    --cc=richard@laptop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox