andreas at kemnade.info
Sat Feb 6 10:42:10 CET 2016
On Fri, 5 Feb 2016 23:02:13 +0100
Belisko Marek <marek at goldelico.com> wrote:
> I did look about converting generic-adc-battery to DT and reuse it
> also for our twl4030_madc driver. What I understand is that this
> driver accept in platform_data -> which must be converted to DT,
> battery name, type and other parameters. Some properties which we have
> in twl4030_madc are missing in generic like temperature, chargenow but
> instead there are other which aren't used in twl4030_madc (min_design,
> max_design ..). I did check usage and found that it's used only 2
> times for LIPO batteries. Basically conversion is doable but I'm not
> sure how community will respond to our enhancements (conversion to DT
> should be OK). So question is if we should invest time to this rework?
> Formula was valid only for LioN batteries, not sure if something else
> exists for LIPO batteries type. Suggestions? Thanks.
Do you mean this by formula:
charging-calibration-data = <4200 100 4100 75 4000 55 3900 25 3800 5 3700 2 3600 1 3300 0>;
discharging-calibration-data = <4200 100 4100 95 4000 70 3800 50 3700 10 3600 5 3300 0>;
I do not find this kind of formula useful because it gives only good
values if you are charging with high currents. So it is only good for
limited usecases. If you charge only with low currents because the device
itself draws a lot of current, voltage behaves like somewhere between
charging and discharging. E.g. for 3.8V you would have something between
5% and 50%.
I doubt if converting something to give the same broken, useless values
to somewhere else is worth any work.
I am not convinced that such a formula belongs into the kernel. Maybe it does,
Userspace does not know that these values are only guesswork.
To have good values there has either to be a formula which considers both
voltage and current or look at power only at well defined conditions.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 473 bytes
Desc: OpenPGP digital signature
More information about the Letux-kernel