From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: Patrick Fischer <admin@tsv-stahl-riesa.de>
Cc: Aaron Kling <webgeek1234@gmail.com>,
Svyatoslav Ryhel <clamor95@gmail.com>,
linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] power: supply: bq24190: Fix NTC status decoding for BQ24193
Date: Sun, 6 Dec 2026 03:24:15 +0100 [thread overview]
Message-ID: <axTG5Q871rmwO30G@venus> (raw)
In-Reply-To: <669e55df-e86c-45ac-a898-f28fec8b3e41@tsv-stahl-riesa.de>
[-- Attachment #1: Type: text/plain, Size: 1801 bytes --]
Hi,
On Mon, Nov 09, 2026 at 08:09:44AM +0100, Patrick Fischer wrote:
> Hi Sebastian,
>
> On Mon, Nov 09, 2026 at 01:08:13AM +0100, Sebastian Reichel wrote:
> > Looks like bq24190_charger_get_ntc_status can just be updated to
> > handle a single temperature sensor as warm/cool and dual-sensor as
> > overheat/cold?
>
> Thanks for looking at this. If I understand you correctly, codes 1-4
> (one sensor out of range) would become warm/cool and codes 5/6 (both
> sensors) cold/overheat, for all chips.
>
> I don't think that is right for the BQ24190, BQ24192 and BQ24192I. Their
> datasheet (SLUSAW5B) says for both TS pins "Charge suspends when either
> TS pin is out of range", so a single hot or cold sensor stops charging
> there. Reporting that as Warm or Cool would understate it.
Ok, I will just take it as is then. Sorry for the delay.
Greetings,
-- Sebastian
> The BQ24193 is different in that its TS1 and TS2 must be connected
> together and its codes are a JEITA profile (SLUSBG7A): 010 is Warm and
> 011 is Cool, and charging continues in both states.
>
> That is why I used the per-chip .get_ntc_status hook, like the BQ24296.
> I can make it smaller, though, by handling only the two JEITA states and
> falling back to the existing function for everything else:
>
> static int bq24193_charger_get_ntc_status(u8 value)
> {
> switch (value >> BQ24190_REG_F_NTC_FAULT_SHIFT & 0x7) {
> case 0x2: /* Warm */
> return POWER_SUPPLY_HEALTH_WARM;
> case 0x3: /* Cool */
> return POWER_SUPPLY_HEALTH_COOL;
> default:
> return bq24190_charger_get_ntc_status(value);
> }
> }
>
> Would that work for you, or did you have something else in mind? I'll
> send a v2 once I know which way you prefer.
>
> Greetings,
>
> Patrick
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-12-06 2:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 6:25 [PATCH] power: supply: bq24190: Fix NTC status decoding for BQ24193 Patrick Fischer via B4 Relay
2026-11-09 0:08 ` Sebastian Reichel
2026-11-09 7:09 ` Patrick Fischer
2026-12-06 2:24 ` Sebastian Reichel [this message]
2026-12-06 2:24 ` Sebastian Reichel
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=axTG5Q871rmwO30G@venus \
--to=sebastian.reichel@collabora.com \
--cc=admin@tsv-stahl-riesa.de \
--cc=clamor95@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=webgeek1234@gmail.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