lkml.org 
[lkml]   [2020]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv1] power: supply: document current direction
On Thu, 27 Aug 2020 16:02:48 +0200
Sebastian Reichel <sebastian.reichel@collabora.com> wrote:

> Currently the sign for CURRENT_NOW and CURRENT_AVG is a bit
> of a mess. There are basically 3 different ways battery fuel
> gauges report the current:
>
> 1. uses negative values for discharging and positive values
> for charging
> 2. uses positive values for discharging and negative values
> for discharging (opposit of 1)
> 3. only uses positive values
>
> As a result userspace currently cannot use the sign at all in
> a generic way. Let's solve the issue by documenting a canonical
> way for reporting the data and ensure new drivers follow this
> way. Then existing drivers can be fixed on a case-by-case basis.
>
> The 'negative value = battery discharging' has been choosen,
> since there are only very few drivers doing it the other way
> around.
>
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> ---

would be nice if this comes in, so that is it clearly specified.

Regards,
Andreas

\
 
 \ /
  Last update: 2020-10-02 18:23    [W:0.043 / U:0.716 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site