From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=165.173.180.11 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796523870; b=r0Uht21blApdj5szGdnoTA//7eTaT4E+CHiTwmFXHHt2mhSrenbiOndjeeIs4htdXZFN LcxR7/++/LeHdwuWRgqBF/+9gMsBHrBooRJuLrrfuzMol6O7WnuCdhZSkxzqnBdZNohdV BOq+RiaFTdKvrOHisPCebvmIYAf3pDTbbmvt5VlhC9odcVz0GntvVgpnC8nKx0LZ+IA2b KaWB8CJO26UxlTcAr4EwIjq07hUqUBJRX3eNfKz1qlHKRq/fCrrAqfQbsMmaaJTgrokFP 5tpqL/fZ/9k8AH6I9x7jMjabGxHhPgdsgbFZ5NHTKQ6ORmoA/JMQL6YhIsXlwglWYPw== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796523870; h=DMARC-Filter:DKIM-Signature:Received:Received:Date:From:To:Cc: Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To:X-Zoho-Virus-Status:X-Zoho-AV-Stamp: X-ZohoMailClient; bh=7dVVaKWoKtyu1XJwq7OkvgdWifOOnt6zrdP8RU/wJ5Y=; b=26SIs4q5Xc/h0q4c/Zyq8Z/I9LIQPdim0lzS/6PydHSxK6VzlWnC8NYgVCYBYUc7KKCH 42+VQLPU1tn7u/yWnLhNMUG1SGa6mh+oGl+hGqK26A0jwfH6bAsNsupBEI1ecKtVg7iEv dk95HIVBOHq7Pv0wGzou09HWjXO+Pt1oZ/dqhdpQcp97B13AJzUdA8FBrPT23LxNbow/R OQCcKcsPkv6WSie2hB6CZRH31GJwkU/IA5fhrtF4noI8pl9INTEYydhUDJ/x9U08lN880 Zic84eqVK3z209AhdSrrwmon63Zn94jARSitQDebOF7P884WFJxmkjw8nG1KOLNyDMA== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=zohomail header.b="ccYYb/+x"; arc=pass header.oldest-pass=0 smtp.remote-ip=165.173.180.11 Received: from sender6-op-o11.zoho.com (sender6-op-o11.zoho.com [165.173.180.11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04623606A321; Sun, 6 Dec 2026 02:24:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 04623606A321 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=zohomail header.b=ccYYb/+x ARC-Seal: i=1; a=rsa-sha256; t=1796523861; cv=none; d=zohomail.com; s=zohoarc; b=egsyG2+smIJAOfvQbhXTr7nxRrYc0kixNDEjQiEC5JjlnC0bWcxll8lGW7HKnYPQdVy+8IldSY6l21m/lROhRG89+CxmkiAl8LzTzzqI1q6jXrwZI76dCWbr4qekpQc/14SVAwuJF3zHC3fljxNTVNp4GYpsglpac9lGHE30Xk8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1796523861; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=7dVVaKWoKtyu1XJwq7OkvgdWifOOnt6zrdP8RU/wJ5Y=; b=Jh+EqqbVW+2jxd0CsS22aHw0XGELqNSlSTieh0RNlHok3tuntCRjpIjb4XOkEfBHHOaL3FvOtY4owAlNpLMnPn/GuqvSdZEp4CjWXgaHFxPm6LyEBEfzsaa1mLuwqBomabNAUROYvgKjCOgxubBGfoZS5TVYB1cQxJKLaJttnNc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=sebastian.reichel@collabora.com; dmarc=pass header.from= DKIM-Signature: a=rsa-sha256; b=ccYYb/+xjVRPLeUFL3/JKU2eF7Ta4ZwNwi8KHEdWsCQmjM1mgt6kkKJWPzt2yVO/Gs7MUyg0LJM3F4q9VMBUWfHxbqo2vH2EjBhpQOgIm8SA+E2EQt6HELlZbZ8CDGzxCTVLEQ7nO5OfPbxlts9fSd/xB5wLD5/HcIOoxvj4exE=; c=relaxed/relaxed; s=zohomail; d=collabora.com; v=1; bh=7dVVaKWoKtyu1XJwq7OkvgdWifOOnt6zrdP8RU/wJ5Y=; h=Content-Description:Content-ID:Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Resent-Sender:Resent-Cc:Resent-Date:Resent-To:Reply-To:Resent-Message-ID:Resent-From:Sender:Subject:To:Date:From:Message-Id:Reply-To:Subject:To:Cc; Received: by smtp.zohomail.com with SMTPS id 1796523858232829.1968569680096; Sat, 5 Dec 2026 18:24:18 -0800 (PST) Received: by venus (Postfix, from userid 1000) id 7C51C18205E; Sun, 06 Dec 2026 03:24:15 +0100 (CET) Date: Sun, 6 Dec 2026 03:24:15 +0100 From: Sebastian Reichel To: Patrick Fischer Cc: Aaron Kling , Svyatoslav Ryhel , 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 Message-ID: References: <20261026-upstream-bq24190-ntc-v1-1-fdc12d795a99@tsv-stahl-riesa.de> <669e55df-e86c-45ac-a898-f28fec8b3e41@tsv-stahl-riesa.de> X-Mailing-List: linux-tegra@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2whlwhkrnzokodnn" Content-Disposition: inline In-Reply-To: <669e55df-e86c-45ac-a898-f28fec8b3e41@tsv-stahl-riesa.de> X-Zoho-Virus-Status: 1 X-Zoho-AV-Stamp: zmail-av-0.2.28.1.5.5/296.511.11 X-ZohoMailClient: External --2whlwhkrnzokodnn Content-Type: text/plain; protected-headers=v1; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH] power: supply: bq24190: Fix NTC status decoding for BQ24193 MIME-Version: 1.0 Hi, On Mon, Nov 09, 2026 at 08:09:44AM +0100, Patrick Fischer wrote: > Hi Sebastian, >=20 > 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? >=20 > 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. >=20 > 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. >=20 > 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: >=20 > 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); > } > } >=20 > 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. >=20 > Greetings, >=20 > Patrick >=20 --2whlwhkrnzokodnn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmsUx0IACgkQ2O7X88g7 +prHZhAAgfYm9btzBtTgudKTgAT2acFAYpBorLP8MOKk77Ryv28seLXJ0II9TAg0 +G42e4Z1DhY9EoKqQNYhUMVMK5aGOzKakKIP3HZ2xinm43qmrEd2SICxis1ETpCB dtWP8NKzC7RaiG/UTV1nIlmTdOO7dfY6LxI0Ieoklpbdr8jim6wSmKkBByszRqVy BovB6p2CYPhl+lq+gThpMAr9CLlaumN0QKX8KiCrii7He7siCePJ22wACnmom9vn 6gDg9TC4Z/yZUCT2BaaG4JX7BnR7jKO5OgGHshPXspp4lPsPs/nSBd7PXh2U3WyT TRFDhiSVGfDY4jbHXBd1F0lgZm6jKAlbXS489eg3iRG4QOi9OG3oDog5AdwCzXYf 3An/zLMMgodyyJDIpyMygowtPp/9hywE7TPDY+pKJLG3lEya72bHr96OpYRKrCuK V1+tinFpi6xq82NFEAEyVGqxizXdIwltL7eMk1XC+Ez4WVRQhacXke9ePQUdkKb/ R+UMupED47W3QMoRt3wIq6mKC7cdbISBeaRqyS+fcfIMcyW9Nss69ZDVPAFF0Kf/ bGmsnRWb3uv7f5NtM8ozYVok5ILB4HxsKHWSTmB8wsYBbcX5kBOpJ7YOqnuVRMCa Owritqo/6Mt3lYOTx4qPT085GbR1zf1/QEM7b4cXSLGPwyXI0sQ= =iap5 -----END PGP SIGNATURE----- --2whlwhkrnzokodnn--