[PATCH] power: supply: bq25890: fix the -10 C NTC lookup entry

raoxu posted 1 patch 1 day, 14 hours ago
drivers/power/supply/bq25890_charger.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] power: supply: bq25890: fix the -10 C NTC lookup entry
Posted by raoxu 1 day, 14 hours ago
From: Xu Rao <raoxu@uniontech.com>

The TSPCT lookup table is monotonically decreasing except for ADC code
121, where the sequence reads -9.0 C, -1.0 C, -12.0 C.  This makes the
reported battery temperature jump upward by eight degrees for one code
and then downward by eleven degrees for the next code.

The entry is a missing zero: use -10.0 C so the sequence remains
monotonic between -9.0 C and -12.0 C.

Fixes: 9652c02428f3 ("power: bq25890: add POWER_SUPPLY_PROP_TEMP")
Cc: stable@vger.kernel.org
Signed-off-by: Xu Rao <raoxu@uniontech.com>
---
 drivers/power/supply/bq25890_charger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/supply/bq25890_charger.c b/drivers/power/supply/bq25890_charger.c
index c1c12a447178..180bc137a863 100644
--- a/drivers/power/supply/bq25890_charger.c
+++ b/drivers/power/supply/bq25890_charger.c
@@ -320,7 +320,7 @@ static const u32 bq25890_tspct_tbl[] = {
 	145, 140, 130, 120, 115, 110, 100, 90,
 	80, 70, 60, 50, 40, 30, 20, 10,
 	0, -10, -20, -30, -40, -60, -70, -80,
-	-90, -10, -120, -140, -150, -170, -190, -210,
+	-90, -100, -120, -140, -150, -170, -190, -210,
 };

 #define BQ25890_TSPCT_TBL_SIZE		ARRAY_SIZE(bq25890_tspct_tbl)
--
2.50.1
Re: [PATCH] power: supply: bq25890: fix the -10 C NTC lookup entry
Posted by Sebastian Reichel 1 day, 6 hours ago
On Thu, 23 Jul 2026 14:54:44 +0800, raoxu wrote:
> The TSPCT lookup table is monotonically decreasing except for ADC code
> 121, where the sequence reads -9.0 C, -1.0 C, -12.0 C.  This makes the
> reported battery temperature jump upward by eight degrees for one code
> and then downward by eleven degrees for the next code.
> 
> The entry is a missing zero: use -10.0 C so the sequence remains
> monotonic between -9.0 C and -12.0 C.
> 
> [...]

Applied, thanks!

[1/1] power: supply: bq25890: fix the -10 C NTC lookup entry
      commit: 160a783aa65b74782bc17cb874af1a6d3f5fba3c

Best regards,
-- 
Sebastian Reichel <sebastian.reichel@collabora.com>