[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMz4kuLy0inoJFav=hTmpLStMP6Tv4wHy-QQOx91z-omikXYWQ@mail.gmail.com>
Date: Wed, 26 Sep 2018 16:33:36 +0800
From: Baolin Wang <baolin.wang@...aro.org>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Sebastian Reichel <sre@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Linux PM list <linux-pm@...r.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
yuanjiang.yu@...soc.com, Mark Brown <broonie@...nel.org>,
Craig Tatlor <ctatlor97@...il.com>
Subject: Re: [PATCH v2 4/4] power: supply: Add Spreadtrum SC27XX fuel gauge
unit driver
Hi Linus,
On 26 September 2018 at 16:09, Linus Walleij <linus.walleij@...aro.org> wrote:
> On Wed, Sep 26, 2018 at 5:00 AM Baolin Wang <baolin.wang@...aro.org> wrote:
>
>> This patch adds the Spreadtrum SC27XX serial PMICs fuel gauge support,
>> which is used to calculate the battery capacity.
>>
>> Original-by: Yuanjiang Yu <yuanjiang.yu@...soc.com>
>> Signed-off-by: Baolin Wang <baolin.wang@...aro.org>
>> ---
>> Changes from v1:
>> - Use battery standard properties to get internal resistance and ocv table.
>> - Change devm_gpiod_get_optional() to devm_gpiod_get().
>> - Add power_supply_changed() when detecting battery present change.
>> - Return micro volts for sc27xx_fgu_get_vbat_ocv().
>
> Acked-by: Linus Walleij <linus.walleij@...aro.org>
>
> I see that you need to have the internal resistance as parameter to
> this equation so it needs to come in. (I guess as factor/typical
> internal resistance as suggested.)
>
> IIUC this reliance on an uncertain internal resistance is the reason
> why fuel gauges / coloumb counters are seen as crude ways to
> estimate battery capacity, and their accuracy and reliability worsen
> over the lifetime of the battery, and this is why safety-critical devices
> include ways to measure the internal resistance as well.
Yes. Thanks for your reviewing.
>
> But the hardware is as it is, and probably for some good reasons,
> like cost.
>
> Yours,
> Linus Walleij
--
Baolin Wang
Best Regards
Powered by blists - more mailing lists