[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171019170649.GG4394@atomide.com>
Date: Thu, 19 Oct 2017 10:06:49 -0700
From: Tony Lindgren <tony@...mide.com>
To: "H. Nikolaus Schaller" <hns@...delico.com>
Cc: Ivaylo Dimitrov <ivo.g.dimitrov.75@...il.com>,
sakari.ailus@...ux.intel.com,
Marek Belisko <marek.belisko@...n-nandra.com>,
khilman@...nel.org, Marek Belisko <marek.belisko@...il.com>,
linux-pm@...r.kernel.org, Aaro Koskinen <aaro.koskinen@....fi>,
kernel list <linux-kernel@...r.kernel.org>,
Sebastian Reichel <sre@...nel.org>, martijn@...xit.nl,
robh+dt@...nel.org, abcloriens@...il.com,
Pavel Machek <pavel@....cz>,
Pali Rohár <pali.rohar@...il.com>,
Sebastian Reichel <sebastian.reichel@...labora.co.uk>,
clayton@...ftyguy.net, linux-omap <linux-omap@...r.kernel.org>,
patrikbachan@...il.com,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
serge@...lyn.com
Subject: Re: libbattery was Re: [RFC PATCH 5/5] power: generic-adc-battery:
Add capacity handling
* H. Nikolaus Schaller <hns@...delico.com> [171019 09:57]:
> Hi Tony,
>
> > Am 19.10.2017 um 18:24 schrieb Tony Lindgren <tony@...mide.com>:
> >
> > * H. Nikolaus Schaller <hns@...delico.com> [171018 08:49]:
> >>
> >>> Am 18.10.2017 um 15:22 schrieb Tony Lindgren <tony@...mide.com>:
> >>>
> >>> * H. Nikolaus Schaller <hns@...delico.com> [171018 05:49]:
> >>>>> Am 18.10.2017 um 14:28 schrieb Pavel Machek <pavel@....cz>:
> >>>>>
> >>>>> So I started something, it is at.
> >>>>>
> >>>>> https://github.com/pavelmachek/libbattery
> >>>>>
> >>>>> My battery on n900 is currently uncalibrated (and charging), still it
> >>>>> gets some kind of estimation:
> >>>>>
> >>>>> Battery -1 %
> >>>>> Seconds -1
> >>>>> State 1
> >>>>> Voltage 3.88 V
> >>>>> Battery 63 %
> >>>>>
> >>>>> Of course, there's a lot more work to be done.
> >>>>
> >>>> Nice start but not a solution to our problem.
> >>>>
> >>>> Our problem is that people simply expect that for example https://packages.debian.org/wheezy/xfce/xfce4-battery-plugin
> >>>> displays the battery percentage.
> >>>
> >>> I think we could make things compatible with various battery apps by
> >>> having libbattery write back the capacity percentage and time remaining
> >>> to the kernel driver via sysfs or a dev entry. Then the kernel interface
> >>> can just display the data to whatever apps.
> >>
> >> Hm. That would be quite difficult to understand and maintain code.
> >
> > How so? The libbattery can do it all, then the kernel drivers needing
> > that will just display the most recent values to maintain compability
> > with battery apps.
>
> Well, it looks as if you are thinking about a much more complex solution
> than I am...
>
> The proposal we are discussing as
>
> [RFC PATCH 5/5] power: generic-adc-battery: Add capacity handling
>
> just reads the current voltage, charging current and uses a (nonlinear)
> mapping to 0% .. 100%.
Right, I was discussing Pavel's libbattery link posted above. No
comments on the current patch series. Let's move the libbattery stuff
to a new thread to avoid confusion.
Regards,
Tony
Powered by blists - more mailing lists