From: "Mark A. Greer" <mgreer@animalcreek.com>
To: Anton Vorontsov <anton@enomsg.org>
Cc: jonghwa3.lee@samsung.com, linux-pm@vger.kernel.org,
dwmw2@infradead.org, myungjoo.ham@samsung.com,
cw00.choi@samsung.com,
Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Subject: Re: [PATCH] power_supply: Fix documentation for TEMP_*ALERT* properties
Date: Mon, 28 Oct 2013 10:20:08 -0700 [thread overview]
Message-ID: <20131028172008.GA29544@animalcreek.com> (raw)
In-Reply-To: <20131028052743.GA31070@teo>
On Sun, Oct 27, 2013 at 10:27:43PM -0700, Anton Vorontsov wrote:
> All temperatures should be in tenth degrees Celsius.
> bq24190_charger.c probably should be fixed.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Reported-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
> Cc: Mark A. Greer <mgreer@animalcreek.com>
> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
> ---
>
> On Mon, Oct 28, 2013 at 11:00:52AM +0900, jonghwa3.lee@samsung.com wrote:
> > > * 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.
> >
> > Honestly, I missed the above paragraph you showed rather I read following one.
> >
> > TEMP - temperature of the power supply.
> > TEMP_ALERT_MIN - minimum battery temperature alert value in milli centigrade.
> > TEMP_ALERT_MAX - maximum battery temperature alert value in milli centigrade.
> > TEMP_AMBIENT - ambient temperature.
> > TEMP_AMBIENT_ALERT_MIN - minimum ambient temperature alert value in milli
> > centigrade.
> > TEMP_AMBIENT_ALERT_MAX - maximum ambient temperature alert value in milli
> > centigrade.
> >
> > So, we use different unit for properties related temperature, right?
> > current temperature is in tenth of centigrade and threshold temperatures and
> > ambient temperature are in milli centigrade. Wouldn't it have to be in same unit?
>
> :( They should. Thanks for spotting.
>
> The patch down below should fix the issue...
>
> Documentation/power/power_supply_class.txt | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/power/power_supply_class.txt b/Documentation/power/power_supply_class.txt
> index 3f10b39..89a8816 100644
> --- a/Documentation/power/power_supply_class.txt
> +++ b/Documentation/power/power_supply_class.txt
> @@ -135,11 +135,11 @@ CAPACITY_LEVEL - capacity level. This corresponds to
> POWER_SUPPLY_CAPACITY_LEVEL_*.
>
> TEMP - temperature of the power supply.
> -TEMP_ALERT_MIN - minimum battery temperature alert value in milli centigrade.
> -TEMP_ALERT_MAX - maximum battery temperature alert value in milli centigrade.
> +TEMP_ALERT_MIN - minimum battery temperature alert.
> +TEMP_ALERT_MAX - maximum battery temperature alert.
> TEMP_AMBIENT - ambient temperature.
> -TEMP_AMBIENT_ALERT_MIN - minimum ambient temperature alert value in milli centigrade.
> -TEMP_AMBIENT_ALERT_MAX - maximum ambient temperature alert value in milli centigrade.
> +TEMP_AMBIENT_ALERT_MIN - minimum ambient temperature alert.
> +TEMP_AMBIENT_ALERT_MAX - maximum ambient temperature alert.
>
> TIME_TO_EMPTY - seconds left for battery to be considered empty (i.e.
> while battery powers a load)
> --
> 1.8.3.1
I missed the beginning of this thread so I may be missing something but
the bq24190_charger driver already uses tenth of degrees Celcius for
POWER_SUPPLY_PROP_TEMP_ALERT_MAX. IIUC, that's correct so there's is
nothing to fix in the bq24190_charger.c driver, correct?
Mark
--
next prev parent reply other threads:[~2013-10-28 17:26 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
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 [this message]
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=20131028172008.GA29544@animalcreek.com \
--to=mgreer@animalcreek.com \
--cc=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 \
--cc=ramakrishna.pallala@intel.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