[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <4E240771-5F35-44BB-B1BA-7D24FE93F08E@goldelico.com>
Date: Tue, 17 Mar 2015 15:12:58 +0100
From: "Dr. H. Nikolaus Schaller" <hns@...delico.com>
To: Pavel Machek <pavel@....cz>
Cc: Belisko Marek <marek.belisko@...il.com>, mark.rutland@....com,
Sebastian Reichel <sre@...nel.org>,
Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
David Woodhouse <dwmw2@...radead.org>,
Tony Lindgren <tony@...mide.com>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
Linux PM mailing list <linux-pm@...r.kernel.org>,
GTA04 owners <gta04-owner@...delico.com>
Subject: Re: [PATCH v3 3/6] Documentation: DT: Document twl4030-madc-battery bindings
Hi Pavel,
Am 17.03.2015 um 14:59 schrieb Pavel Machek <pavel@....cz>:
> Hi!
>
>>>>>>> to introduce coefficients for temperature and discharge rate?
>>>>>> What do you mean? Nothing like that is used in current driver why do
>>>>>> we need to add it?
>>>>>
>>>>> Well, conversion between Li-ion's voltage and state of charge at 0
>>>>> current is well known:
>>>>
>>>> We can’t measure at 0 current since the OMAP is driven from battery
>>>> and charger and may also draw some mA…
>>>
>>> Yes, but you know how many mA you are taking just now. So if you knew
>>> the internal resistance, you could compute the voltage at 0
>>> current. (And it should also work during charging, as long as you know
>>> how much current is going in.)
>>
>> As far as I understand the twl4030 charger and MADC it is not possible to
>> separate these values. It is only reporting the inflow from charger to
>> battery + system. So you don’t know how many mA are supplying the system
>> and how many mA are left over for charging.
>>
>> You can only assume how much the system is drawing while running (something
>> between 50 and 600 mA but this depends on system activities, power state
>> of peripherald and e.g. backlight being switched on).
>>
>> I think your basic assumption that we know any time how many mA the system
>> is taking is not given.
>
> So.. you won't be able to get exact value while charging, but you
> get one while discharging, which is what really matters…?
Is it the same during charging?
And, as we already discussed it depends on the situation.
In addition, GSM power consumption runs in bursts and I don’t know if the sample
rate of the MADC is good enough to track that correctly.
>
>>> Yes, and that coefficient should be internal battery resistance ;-).
>>
>> But where do you know this value from to write it into a DT file?
>> Usually you can’t measure it easily and for some batteries you don’t have
>> a data sheet.
>>
>> Contrary, the calibration curves can easily be measured on the device
>> (assuming that the charge level decreases/increases linearly over time
>> between Full and Empty).
>
> If you can copy it from the data sheet, that's the easiest option. If
> not, you should be able to easily compute it from the charge/discharge
> curves or from measured voltage at different loads.
Well, this again assumes that you can generate/control different loads
easily (e.g. turn on/off this and that peripheral) to check the voltage
drop. Sounds good in theory, but I don’t want to do it in practice to
derive this parameter.
And, don’t forget that the MADC signals are nosiy and don’t have the
best precision. So it is likely that you get wrong values.
As said, I think it is not worth the effort around the imperfect twl4030/MADC
charging system.
If someone wants precise data, that is what fuel gauge chips are good for.
And we already have drivers for them.
BR,
Nikolaus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists