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

* Re: 5.0-rc1 Open circuit voltage tables -- 3afb50d7125bc
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2019-03-11 10:23 UTC (permalink / raw)
  To: kernel list, baolin.wang, linus.walleij, sebastian.reichel; +Cc: sre

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

On Mon 2019-01-07 20:05:55, Pavel Machek wrote:
> 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.

Ping? That code is just bad. Does someone care?
									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

* Re: 5.0-rc1 Open circuit voltage tables -- 3afb50d7125bc
  2019-03-11 10:23 ` Pavel Machek
@ 2019-03-11 11:11   ` Baolin Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Baolin Wang @ 2019-03-11 11:11 UTC (permalink / raw)
  To: Pavel Machek
  Cc: kernel list, Linus Walleij, Sebastian Reichel, Sebastian Reichel

Hi Pavel,

On Mon, 11 Mar 2019 at 18:23, Pavel Machek <pavel@ucw.cz> wrote:
>
> On Mon 2019-01-07 20:05:55, Pavel Machek wrote:
> > 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).

As we know, experiments had proved that the OCV had a steady
relationship with the state of charge for a given chemical
characteristic. So many companies' charging method will use OCV table
to look up the initial capacity of the battery according to the
current OCV value. That's why we introduce the OCV table.

> >
> > 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.

This requirement is from Qualcomm. Since they have multiple OCV tables
in different temperatures.

>
> Ping? That code is just bad. Does someone care?

Sorry, I missed your previous email.
--
Baolin Wang
Best Regards

^ 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