mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Val Packett <val@packett.cool>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: Sebastian Reichel <sre@kernel.org>,
	Abel Vesa <abelvesa@kernel.org>,
	Sebastian Reichel <sebastian.reichel@collabora.com>,
	linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] power: supply: qcom_battmgr: Recognize "LiP" as lithium-polymer
Date: Tue, 20 Jan 2026 20:14:12 -0300	[thread overview]
Message-ID: <74de8f03-dae1-4bf9-a2a1-973952fee2e1@packett.cool> (raw)
In-Reply-To: <bih6lxs4u7q2kfe4kmid35cpmnqmvjltvzv4wrowah6x7v3tth@kptyk7bnmnhv>


On 1/19/26 3:38 AM, Dmitry Baryshkov wrote:
> On Sat, Jan 17, 2026 at 06:09:24PM -0300, Val Packett wrote:
>> On the Dell Latitude 7455, the firmware uses "LiP" with a lowercase 'i'
>> for the battery chemistry type, but only all-uppercase "LIP" was being
>> recognized. Add the CamelCase variant to the check to fix the "Unknown
>> battery technology" warning.
>>
>> Fixes: 202ac22b8e2e ("power: supply: qcom_battmgr: Add lithium-polymer entry")
>> Signed-off-by: Val Packett <val@packett.cool>
>> ---
>>   drivers/power/supply/qcom_battmgr.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/power/supply/qcom_battmgr.c b/drivers/power/supply/qcom_battmgr.c
>> index c8028606bba0..80e701c66434 100644
>> --- a/drivers/power/supply/qcom_battmgr.c
>> +++ b/drivers/power/supply/qcom_battmgr.c
>> @@ -1240,7 +1240,8 @@ static unsigned int qcom_battmgr_sc8280xp_parse_technology(const char *chemistry
>>   	if ((!strncmp(chemistry, "LIO", BATTMGR_CHEMISTRY_LEN)) ||
>>   	    (!strncmp(chemistry, "OOI", BATTMGR_CHEMISTRY_LEN)))
>>   		return POWER_SUPPLY_TECHNOLOGY_LION;
>> -	if (!strncmp(chemistry, "LIP", BATTMGR_CHEMISTRY_LEN))
>> +	if (!strncmp(chemistry, "LIP", BATTMGR_CHEMISTRY_LEN) ||
>> +	    (!strncmp(chemistry, "LiP", BATTMGR_CHEMISTRY_LEN)))
> Why do you have extra brackets around the second strncmp?

Copy-pasted from the line above (the "OOI" one) :) Didn't see that the 
first one in this expression doesn't have them.

Feel free to edit this when applying

~val


  reply	other threads:[~2026-01-20 23:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-17 21:09 Val Packett
2026-01-19  6:38 ` Dmitry Baryshkov
2026-01-20 23:14   ` Val Packett [this message]
2026-01-20 23:35     ` Dmitry Baryshkov

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=74de8f03-dae1-4bf9-a2a1-973952fee2e1@packett.cool \
    --to=val@packett.cool \
    --cc=abelvesa@kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=sebastian.reichel@collabora.com \
    --cc=sre@kernel.org \
    /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

all inboxes | Powered by JetHome®