public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: jonghwa3.lee@samsung.com
To: Anton Vorontsov <anton@enomsg.org>
Cc: "Mark A. Greer" <mgreer@animalcreek.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 15:22:53 +0900	[thread overview]
Message-ID: <526E02BD.5080107@samsung.com> (raw)
In-Reply-To: <20131028052743.GA31070@teo>

On 2013년 10월 28일 14:27, Anton Vorontsov wrote:

> All temperatures should be in tenth degrees Celsius.
> 


Let me tell you one thing that thermal framework uses milli centigrade for
temperature. And also we have some relation with thermal framework already in
power suppply core. So, what do think of using milli centigrade in power supply
class either?

Thanks,
Jonghwa

> 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)



  reply	other threads:[~2013-10-28  6:22 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 [this message]
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=526E02BD.5080107@samsung.com \
    --to=jonghwa3.lee@samsung.com \
    --cc=anton@enomsg.org \
    --cc=cw00.choi@samsung.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mgreer@animalcreek.com \
    --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