From: Anton Vorontsov <anton@enomsg.org>
To: Jonghwa Lee <jonghwa3.lee@samsung.com>
Cc: linux-pm@vger.kernel.org, dwmw2@infradead.org,
myungjoo.ham@samsung.com, cw00.choi@samsung.com
Subject: Re: [PATCH] battery: max17042: Fix temperature unit to milli centigrade.
Date: Fri, 25 Oct 2013 16:17:20 -0700 [thread overview]
Message-ID: <20131025231720.GB9015@teo> (raw)
In-Reply-To: <1382676798-27835-1-git-send-email-jonghwa3.lee@samsung.com>
On Fri, Oct 25, 2013 at 01:53:18PM +0900, Jonghwa Lee wrote:
> Standard temp node represents temperature of power supply class
> in milli centigrade. So fix max17042 fuel gauge driver to follow
> the standard. (deci-centigrade --> milli-centigrade)
Maybe I am confused, but the doc says:
* All voltages, currents, charges, energies, time and temperatures in uV,
* µA, µAh, µWh, seconds and tenths of degree Celsius unless otherwise
* stated
So, the current code seems to be correct.
Thanks,
Anton
> Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
> ---
> drivers/power/max17042_battery.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/power/max17042_battery.c b/drivers/power/max17042_battery.c
> index d664ef5..892ecfc 100644
> --- a/drivers/power/max17042_battery.c
> +++ b/drivers/power/max17042_battery.c
> @@ -220,9 +220,9 @@ static int max17042_get_property(struct power_supply *psy,
> val->intval = (0x7fff & ~val->intval) + 1;
> val->intval *= -1;
> }
> - /* The value is converted into deci-centigrade scale */
> + /* The value is converted into milli-centigrade scale */
> /* Units of LSB = 1 / 256 degree Celsius */
> - val->intval = val->intval * 10 / 256;
> + val->intval = val->intval * 1000 / 256;
> break;
> case POWER_SUPPLY_PROP_CURRENT_NOW:
> if (chip->pdata->enable_current_sense) {
> --
> 1.7.9.5
next prev parent reply other threads:[~2013-10-25 23:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-25 4:53 [PATCH] battery: max17042: Fix temperature unit to milli centigrade Jonghwa Lee
2013-10-25 23:17 ` Anton Vorontsov [this message]
2013-10-28 2:00 ` jonghwa3.lee
2013-10-28 5:27 ` [PATCH] power_supply: Fix documentation for TEMP_*ALERT* properties Anton Vorontsov
2013-10-28 6:22 ` jonghwa3.lee
2013-10-28 6:43 ` Anton Vorontsov
2013-10-28 17:20 ` Mark A. Greer
2013-10-29 3:13 ` Anton Vorontsov
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=20131025231720.GB9015@teo \
--to=anton@enomsg.org \
--cc=cw00.choi@samsung.com \
--cc=dwmw2@infradead.org \
--cc=jonghwa3.lee@samsung.com \
--cc=linux-pm@vger.kernel.org \
--cc=myungjoo.ham@samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox