Re: [RFC PATCH v3 3/9] power: supply: Support DT originated temperature-capacity tables
From: Linus Walleij <hidden>
Date: 2021-11-30 01:34:44
Also in:
linux-devicetree, lkml
Hi Matti, not so much time so trying to answer the central question here! On Sun, Nov 28, 2021 at 9:51 AM Vaittinen, Matti [off-list ref] wrote:
I am pretty sure the current power-supply framework allows us to expose the current full_cap to userlans - so building your Tesla example with the star should be doable - if the drivers can somehow get the information about the absolute capacity drop.
To do this we would need to export a capacity at current temperature and capacity at nominal temperature (which is usually 25 deg C) so you can scale to something. This isn't in sysfs today but we could probably add it (and then the world of UI:s battery icons need to change in response).
quoted
Then the question is: is the method used by Rohm universal and well-known and something many chargers will do exactly this way, so it should be in the core, or is it a particularity that should be in your driver?I am not sure this is the correct question. I'd rephrase it to: Would it be beneficial for drivers to come if the core did support this functionality - or is the feature unnecessary, or are there better alternatives. If core does not provide the support - then it is a high mountain for one to climb if he wants to use such improvement.
I think we need this.
I think that the agreement we can do is that the OCV+temperature => SOC tables do not provide quite same information as the suggested temperature => capacity-drop tables would. Whether there are better alternatives - or if this is generally useful remains to be discussed - and this is something where I _do_ appreciate your (and everyone else's) input!
temperature + OCV => SOC isn't enough I think. We probably need something to tell us what the total usable capacity will be under different temperatures. I suspect an interpolated table is best though, this is going to be quite nonlinear in practice. Yours, Linus Walleij