lkml.org 
[lkml]   [2017]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectlibbattery 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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2017-09-08 13:33    [W:0.065 / U:0.212 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site