From: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
To: David Lechner <david@lechnology.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] power: supply: lego_ev3_battery: fix Vce offset
Date: Mon, 23 Jul 2018 00:02:35 +0200 [thread overview]
Message-ID: <20180722220235.3cjpvsufswcqu53g@earth.universe> (raw)
In-Reply-To: <20180720201944.20503-3-david@lechnology.com>
[-- Attachment #1: Type: text/plain, Size: 1185 bytes --]
Hi,
On Fri, Jul 20, 2018 at 03:19:44PM -0500, David Lechner wrote:
> This fixes the value that accounts for the Vce of a transistor in the
> LEGO MINDSTORMS EV3 power supply driver. The old value (200mV) was the
> max value from the data sheet. After testing, the actual value has been
> found to be 50mV. By using 50mV we get a more accurate voltage
> indication.
>
> Signed-off-by: David Lechner <david@lechnology.com>
> ---
Thanks, queued to power-supply's for-next branch.
-- Sebastian
> drivers/power/supply/lego_ev3_battery.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/power/supply/lego_ev3_battery.c b/drivers/power/supply/lego_ev3_battery.c
> index 6e3b3e384172..1ae3710909b7 100644
> --- a/drivers/power/supply/lego_ev3_battery.c
> +++ b/drivers/power/supply/lego_ev3_battery.c
> @@ -52,7 +52,7 @@ static int lego_ev3_battery_get_property(struct power_supply *psy,
> return ret;
>
> val->intval *= 2000;
> - val->intval += 200000;
> + val->intval += 50000;
>
> /* plus adjust for shunt resistor drop */
> ret = iio_read_channel_processed(batt->iio_i, &val2);
> --
> 2.17.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2018-07-22 22:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-20 20:19 [PATCH 0/2] power: supply: lego_ev3_battery improvements David Lechner
2018-07-20 20:19 ` [PATCH 1/2] power: supply: lego_ev3_battery: Don't ignore iio_read_channel_processed() return value David Lechner
2018-07-22 22:02 ` Sebastian Reichel
2018-07-20 20:19 ` [PATCH 2/2] power: supply: lego_ev3_battery: fix Vce offset David Lechner
2018-07-22 22:02 ` Sebastian Reichel [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=20180722220235.3cjpvsufswcqu53g@earth.universe \
--to=sebastian.reichel@collabora.co.uk \
--cc=david@lechnology.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).