[Letux-kernel] generic-adc-battery

H. Nikolaus Schaller hns at goldelico.com
Sat Feb 6 19:27:36 CET 2016

Am 06.02.2016 um 19:08 schrieb Andreas Kemnade <andreas at kemnade.info>:

> Hi,
>>> * if you do suspend measurements, the system wakes up when you ask the
>>> battery driver next time, i.e. is again in a 400mA state.
>> I should add that this driver should not even be intended to be used for suspend
>> current measurements... This needs a real fuel gauge.
> Yes, the point was that I think that it is not good to provide charge_now because
> the only use for that is doing things like measure-suspend which require precise data.
> If there is no charge_now, then things like measure-suspend can say "go away with
> that battery driver".
> Userspace can still display some battery state graphics using the "capacity"
> sysfs file.
> I have seen other drivers not providing charge_now, so we are not doing something
> non-standard. 

Ah, ok. I slightly misunderstood.

This would eliminate the need for a "full-capacity" entry in DT. Except that user space
might need to do its own calculations and a configuration file providing a table to map
battery models to full capacity. Each user space that wants to do that must do it again...

But I would make it simply optional. There amy be use cases where someone
needs it. And others where not. So why leave out something very simple. Probably
nobody will question that it exists.


More information about the Letux-kernel mailing list