mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Olaf Titz <olaf@bigred.inka.de>
To: linux-kernel@vger.kernel.org
Subject: Re: [RFC] shutdown machine when li-ion battery goes below 3V
Date: Tue, 25 Oct 2016 21:18:46 +0200	[thread overview]
Message-ID: <E1bz7FE-0007t1-Tp@bigred.inka.de> (raw)
In-Reply-To: <20161024212250.GA31336@amd>

> +	res = bq27xxx_battery_voltage(di, &val);
> +	if (res)
> +		return res;
> +
> +	mV = val.intval / 1000;

Reading that code I stumbled over the comment in
bq27xxx_battery_voltage saying that it returns millivolts. The code
here, the code in bq27xxx_battery_voltage and power_supply.h all
indicate that it in fact returns microvolts. Please double-check and
fix, as it stands now the code looks inconsistent (but not knowing that
device at all I don't feel fit to submit a fix).

regards, Olaf

      parent reply	other threads:[~2016-10-25 19:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-24 21:22 Pavel Machek
2016-10-24 21:29 ` Tony Lindgren
2016-10-24 21:41   ` Pavel Machek
2016-10-24 21:48     ` Pali Rohár
2016-10-25 10:24       ` Pavel Machek
2016-10-25 10:53         ` Pali Rohár
2016-10-25 10:56           ` Pavel Machek
2016-10-25 10:57             ` Pali Rohár
2016-10-25 11:27   ` Pavel Machek
2016-10-25 11:54     ` Pali Rohár
2016-10-25 19:18 ` Olaf Titz [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=E1bz7FE-0007t1-Tp@bigred.inka.de \
    --to=olaf@bigred.inka.de \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®