From: Anton Vorontsov <cbouatmailru@gmail.com>
To: Paul Parsons <lost.distance@yahoo.com>
Cc: linux-kernel@vger.kernel.org, dwmw2@infradead.org,
Dmitry Artamonow <mad_soft@inbox.ru>,
Philipp Zabel <philipp.zabel@gmail.com>
Subject: Re: [PATCH] ds2760_battery: Fix indexing of the 4 active full EEPROM registers
Date: Fri, 20 May 2011 19:48:10 +0400 [thread overview]
Message-ID: <20110520154810.GC18099@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <E1QEN0d-0007iM-LV@outmx04.plus.net>
On Mon, Apr 25, 2011 at 02:43:30PM +0000, Paul Parsons wrote:
> Fix indexing of the 4 active full EEPROM registers. The indexing was out by 1, accessing the EEPROM registers at 0x23 to 0x26 instead of 0x22 to 0x25.
>
> Signed-off-by: Paul Parsons <lost.distance@yahoo.com>
Applied, thank you!
> ---
> --- clean-2.6.39-rc4/drivers/power/ds2760_battery.c 2011-03-15 01:20:32.000000000 +0000
> +++ linux-2.6.39-rc4/drivers/power/ds2760_battery.c 2011-04-25 13:06:29.344976841 +0100
> @@ -186,7 +190,7 @@ static int ds2760_battery_read_status(st
>
> scale[0] = di->full_active_uAh;
> for (i = 1; i < 5; i++)
> - scale[i] = scale[i - 1] + di->raw[DS2760_ACTIVE_FULL + 2 + i];
> + scale[i] = scale[i - 1] + di->raw[DS2760_ACTIVE_FULL + 1 + i];
>
> di->full_active_uAh = battery_interpolate(scale, di->temp_C / 10);
> di->full_active_uAh *= 1000; /* convert to µAh */
--
Anton Vorontsov
Email: cbouatmailru@gmail.com
prev parent reply other threads:[~2011-05-20 15:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-25 14:43 [PATCH] ds2760_battery: Fix indexing of the 4 active full EEPROM registers Paul Parsons
2011-05-20 15:48 ` 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=20110520154810.GC18099@oksana.dev.rtsoft.ru \
--to=cbouatmailru@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lost.distance@yahoo.com \
--cc=mad_soft@inbox.ru \
--cc=philipp.zabel@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.