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

Attachment: signature.asc
Description: Digital signature

Reply via email to