lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 26 Sep 2018 10:09:20 +0200
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Baolin Wang <baolin.wang@...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

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.

But the hardware is as it is, and probably for some good reasons,
like cost.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ