From: Baolin Wang <baolin.wang@linaro.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Sebastian Reichel <sre@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Linux PM list <linux-pm@vger.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
yuanjiang.yu@unisoc.com, Mark Brown <broonie@kernel.org>,
Craig Tatlor <ctatlor97@gmail.com>
Subject: Re: [PATCH v2 4/4] power: supply: Add Spreadtrum SC27XX fuel gauge unit driver
Date: Wed, 26 Sep 2018 16:33:36 +0800 [thread overview]
Message-ID: <CAMz4kuLy0inoJFav=hTmpLStMP6Tv4wHy-QQOx91z-omikXYWQ@mail.gmail.com> (raw)
In-Reply-To: <CACRpkdYxV1OBrr6e29OTzE5QCTgt+-2yJGEuYtNM_Mw=41PSyg@mail.gmail.com>
Hi Linus,
On 26 September 2018 at 16:09, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Wed, Sep 26, 2018 at 5:00 AM Baolin Wang <baolin.wang@linaro.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@unisoc.com>
>> Signed-off-by: Baolin Wang <baolin.wang@linaro.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@linaro.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
next prev parent reply other threads:[~2018-09-26 8:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-26 2:59 [PATCH v2 1/4] power: supply: core: Introduce one property to present the battery internal resistance Baolin Wang
2018-09-26 2:59 ` [PATCH v2 2/4] power: supply: core: Introduce properties to present the battery OCV table Baolin Wang
2018-09-26 8:02 ` Linus Walleij
2018-09-26 13:51 ` Sebastian Reichel
2018-09-27 1:10 ` Baolin Wang
2018-09-27 6:40 ` Sebastian Reichel
2018-09-26 2:59 ` [PATCH v2 3/4] dt-bindings: power: Add Spreadtrum SC27XX fuel gauge unit documentation Baolin Wang
2018-09-26 8:04 ` Linus Walleij
2018-09-26 14:14 ` Sebastian Reichel
2018-09-26 2:59 ` [PATCH v2 4/4] power: supply: Add Spreadtrum SC27XX fuel gauge unit driver Baolin Wang
2018-09-26 8:09 ` Linus Walleij
2018-09-26 8:33 ` Baolin Wang [this message]
2018-09-26 15:30 ` Sebastian Reichel
2018-09-27 5:17 ` Baolin Wang
2018-09-26 8:00 ` [PATCH v2 1/4] power: supply: core: Introduce one property to present the battery internal resistance Linus Walleij
2018-09-26 8:30 ` Baolin Wang
2018-09-26 12:45 ` Sebastian Reichel
2018-09-27 1:06 ` Baolin Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMz4kuLy0inoJFav=hTmpLStMP6Tv4wHy-QQOx91z-omikXYWQ@mail.gmail.com' \
--to=baolin.wang@linaro.org \
--cc=broonie@kernel.org \
--cc=ctatlor97@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=sre@kernel.org \
--cc=yuanjiang.yu@unisoc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).