[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170908113231.GJ18365@amd>
Date: Fri, 8 Sep 2017 13:32:31 +0200
From: Pavel Machek <pavel@....cz>
To: Sebastian Reichel <sebastian.reichel@...labora.co.uk>
Cc: Marek Belisko <marek.belisko@...n-nandra.com>, robh+dt@...nel.org,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
hns@...delico.com, Marek Belisko <marek.belisko@...il.com>
Subject: libbattery was Re: [RFC PATCH 5/5] power: generic-adc-battery: Add
capacity handling
Hi!
> > + case POWER_SUPPLY_PROP_CAPACITY:
> > + {
> > + int ret, curr, voltage;
> > +
> > + ret = read_channel(adc_bat, POWER_SUPPLY_PROP_CURRENT_NOW, &curr);
> > + ret |= read_channel(adc_bat, POWER_SUPPLY_PROP_VOLTAGE_NOW, &voltage);
> > + if (ret < 0)
> > + goto err;
> > +
> > + val->intval = fuel_level_LiIon(voltage, curr, 10);
> > + }
> > + break;
> > default:
> > return -EINVAL;
> > }
>
> Without patch description: See Last Question in
>
> Documentation/power/power_supply_class.txt
...should be done in libbattery, yet to be written. :-).
Do you have specific guidance what you'd like to see in libbattery?
I was thinking about creating lib_pocket_hardware -- that would hide
battery details, plus other phone-related stuff such as LEDs,
backlights, temperatures, ...
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)
Powered by blists - more mailing lists