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]
Date:   Fri, 14 May 2021 16:16:31 +0300
From:   Dmitry Osipenko <digetx@...il.com>
To:     Sebastian Reichel <sebastian.reichel@...labora.com>
Cc:     Antoni Aloy Torrens <aaloytorrens@...il.com>,
        Nikola Milosavljević <mnidza@...look.com>,
        linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 2/2] power: supply: sbs-battery: Fall back to Li-ion
 battery type for bq20z75

13.05.2021 18:31, Sebastian Reichel пишет:
> Hi,
> 
> On Tue, May 11, 2021 at 01:08:27AM +0300, Dmitry Osipenko wrote:
>> The older bq20z75 controller doesn't support reporting the battery type
>> and the type is Li-ion in this case.
>>
>> Tested-by: Antoni Aloy Torrens <aaloytorrens@...il.com> # TF101
>> Tested-by: Nikola Milosavljević <mnidza@...look.com> # TF101
>> Signed-off-by: Dmitry Osipenko <digetx@...il.com>
>> ---
> 
> If it does not support reporting the battery type you should get an
> error from sbs_get_battery_string_property. Obviously a string has
> been returned, or you would not end up that far in the code. What
> string do you see?

There is no visible error. Where the error condition should be set?

The returned string is:

sbs-battery 5-000b: Unknown chemistry: OAI0

> Considering BQ20Z65 and BQ20Z75 also support Li-Po I don't think
> it's a good idea to fall back to Li-Ion. Kernel should never lie
> about this, since I know some people use userspace based charging
> setup and the charge limits are different for Li-Ion and Li-Po. When
> reaching this place we do not know 100%, that it is a Li-ion, so
> returning UNKNOWN is the safe option.
> 
> If you know, that your device (TF101) only supports Li-Ion
> batteries, we can add a device specific override. But is this worth
> the added maintenance burden? What is your plan for using this
> information?

There is no plan of using that information. Previously battery type was
reported properly by userspace, then it regressed. There are other older
device-trees in upstream which should have seen the same regression,
apparently nobody noticed or cared about it. Yours variant of solution
will take more effort, in this case it should be better to leave the
regression as-is for now.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ