public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 5.0-rc1 Open circuit voltage tables -- 3afb50d7125bc
@ 2019-01-07 19:05 Pavel Machek
  2019-03-11 10:23 ` Pavel Machek
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2019-01-07 19:05 UTC (permalink / raw)
  To: kernel list, baolin.wang, linus.walleij, sebastian.reichel

[-- Attachment #1: Type: text/plain, Size: 733 bytes --]

Hi!

Can we do something with that code?

First -- tables should not be necceessary. Formula for li-ion open
circuit voltage is well-known, and does not really depend on the
device -- only on the chemistry of battery.

state of charge = f( voltage, current, internal resistance )

(And yes, internal resistance depends on temperature and health of the
battery).

Second, even if we need tables, why is it doing multiple allocations?

info->ocv_temp[index]        = -EINVAL;

That's just wrong. Ocv_temp is temperature in celsius. Temperatures go
below zero.

								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-03-11 11:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-07 19:05 5.0-rc1 Open circuit voltage tables -- 3afb50d7125bc Pavel Machek
2019-03-11 10:23 ` Pavel Machek
2019-03-11 11:11   ` Baolin Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox