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] [day] [month] [year] [list]
Message-ID: <20230914191717.u7jcxkfgrvpcb6hp@mercury.elektranox.org>
Date:   Thu, 14 Sep 2023 21:17:17 +0200
From:   Sebastian Reichel <sebastian.reichel@...labora.com>
To:     Konrad Dybcio <konrad.dybcio@...aro.org>
Cc:     Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Konrad Dybcio <konradybcio@...nel.org>,
        Marijn Suijten <marijn.suijten@...ainline.org>,
        Rob Herring <robh@...nel.org>, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org
Subject: Re: [PATCH RESEND v2 3/3] power: supply: Introduce MM8013 fuel gauge
 driver

Hi,

On Thu, Sep 14, 2023 at 08:46:21PM +0200, Konrad Dybcio wrote:
> On 13.09.2023 17:45, Sebastian Reichel wrote:
> > On Wed, Aug 23, 2023 at 04:36:15PM +0200, Konrad Dybcio wrote:
> >> Add a driver for the Mitsumi MM8013 fuel gauge. The driver is a vastly
> >> cleaned up and improved version of the one that shipped in some obscure
> >> Lenovo downstream kernel [1], with some register definitions borrowed from
> >> ChromeOS EC platform code [2].
> >>
> >> [1] https://github.com/adazem009/kernel_lenovo_bengal/commit/b6b346427a871715709bd22aae449b9383f3b66b
> >> [2] https://chromium.googlesource.com/chromiumos/platform/ec/+/master/driver/battery/mm8013.h
> >> Signed-off-by: Konrad Dybcio <konrad.dybcio@...aro.org>
> >> ---
> [...]

[...]

> >> +	switch (psp) {
> >> +	case POWER_SUPPLY_PROP_CAPACITY:
> > 
> > this is in %, while the next two are in uAh. So the fuel gauge does
> > not provide the current capacity in uAh
> > (POWER_SUPPLY_PROP_CHARGE_NOW)?
> Yes. Doesn't seem like raw values are supported.

Ok. (It's quite unusual for a chip to provide design and full
capacity separatly, but not providing the current capacity.)

[...]

> > With the next submission please include a dump of the uevent
> > in sysfs in the cover letter or below the fold, so that its
> > easy to validty check if the reported values look sensible.
> State of what-will-be-sent in v(n+1), with additional fixups:
> 
> POWER_SUPPLY_NAME=mm8013
> POWER_SUPPLY_TYPE=Battery
> POWER_SUPPLY_CAPACITY=100
> POWER_SUPPLY_CHARGE_FULL=7124
> POWER_SUPPLY_CHARGE_FULL_DESIGN=7500

The unit for the above two are uAh. So that would be 7.5 mAh. With
4.4V I expect you have something bigger than a coin cell, so that's
probably wrong :)

> POWER_SUPPLY_CURRENT_NOW=-122000
> POWER_SUPPLY_CYCLE_COUNT=27
> POWER_SUPPLY_HEALTH=Good
> POWER_SUPPLY_PRESENT=1
> POWER_SUPPLY_STATUS=Full
> POWER_SUPPLY_TEMP=324
> POWER_SUPPLY_VOLTAGE_NOW=4407000

Otherwise looks sensible.

Greetings,

-- Sebastian

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ