From: Dmitry Osipenko <digetx@gmail.com>
To: Sebastian Reichel <sebastian.reichel@collabora.com>
Cc: "Antoni Aloy Torrens" <aaloytorrens@gmail.com>,
"Nikola Milosavljević" <mnidza@outlook.com>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 2/2] power: supply: sbs-battery: Fall back to Li-ion battery type for bq20z75
Date: Fri, 14 May 2021 16:16:31 +0300 [thread overview]
Message-ID: <aebfc4c1-1b4e-c34f-62d9-e8c53e825834@gmail.com> (raw)
In-Reply-To: <20210513153136.76rr3ngjhuqy7b7q@earth.universe>
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@gmail.com> # TF101
>> Tested-by: Nikola Milosavljević <mnidza@outlook.com> # TF101
>> Signed-off-by: Dmitry Osipenko <digetx@gmail.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.
next prev parent reply other threads:[~2021-05-14 13:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-10 22:08 [PATCH v1 1/2] power: supply: sbs-battery: Silence warning about unknown chemistry Dmitry Osipenko
2021-05-10 22:08 ` [PATCH v1 2/2] power: supply: sbs-battery: Fall back to Li-ion battery type for bq20z75 Dmitry Osipenko
2021-05-13 15:31 ` Sebastian Reichel
2021-05-14 13:16 ` Dmitry Osipenko [this message]
2021-05-13 15:11 ` [PATCH v1 1/2] power: supply: sbs-battery: Silence warning about unknown chemistry Sebastian Reichel
2021-05-14 13:13 ` Dmitry Osipenko
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=aebfc4c1-1b4e-c34f-62d9-e8c53e825834@gmail.com \
--to=digetx@gmail.com \
--cc=aaloytorrens@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mnidza@outlook.com \
--cc=sebastian.reichel@collabora.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).