From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 145973A2576; Sat, 12 Sep 2026 20:03:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789243400; cv=none; b=rV209PHGGMALfmsUQmRtNiwmWhUddSH2gfu3ayjJMnagJMiPCiG1DvG2hU0/tGXJR0OKaH9elTJRYukSIyZG9IK/jT4H5qY81rwgMEHpX+xKaZlWfig1moE/CzxAs89O4wJGbBvXJUahA2EFBBXwHp4qHoz1y8FaCGZsPnAwLsk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789243400; c=relaxed/simple; bh=9Q+Pgq2QO34hTyiXWmsv0jKuaAeVSliuYpzCiNz491Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SdIs2NHQyHAZ1uMSz5tA7OXhg4bAz/fTQPnDodgM56MXDF5wDU/aBHlz1+usNIT5Y3I9YZvTMVjVnW+aPOjCqjLuFBbxNJpsgk429N4rTVhz+WpLH/r/2NHTNWhZDsBjIawrg5jPOM8hJ7XTOCRTLSZANr7uLVcSuX5mCHFCDzM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=EOvS2lYu; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="EOvS2lYu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D22A1F000FF; Sat, 12 Sep 2026 20:03:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789243399; bh=87oKgtIsEcoKz9vtPEOY4n5cSl8mJhnuvf04lNv/AJw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=EOvS2lYuo/E8sixj0ETTTL0u/vAy1WUFdd7gOw0UrXepd7rhol5mgbWypniZhlhai ZcliJ0ojGQf+82MqC9PwDY2Oqbq0QDQyD+NJgHTaymD5aBB3/a9x9TIBM8VfaoI2e9 h1JORvBb0tbiiArHxVcMnVyqh+ASrfxWXNMtgqT8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Henrik Grimler , Sebastian Reichel , Sasha Levin Subject: [PATCH 5.10 699/798] power: supply: bq27xxx: bq28z610: fix invalid AverageEnergy address Date: Sat, 12 Sep 2026 09:05:27 +0200 Message-ID: <20260912065533.116423382@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065516.948645775@linuxfoundation.org> References: <20260912065516.948645775@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Henrik Grimler [ Upstream commit e9387e9ab5121f330d313afb90430c02200f9782 ] bq28z610 currently uses the AveragePower reg, 0x22, for reading both AveragePower and AvailableEnergy. The technical reference manual does not mention AvailableEnergy, and it does not make sense to read a cumulative, always positive, property like AvailableEnergy from a rate property like AveragePower. Set REG_AE as invalid to fix it. Fixes: 707d678a5c7c ("power: supply: bq27xxx_battery: Add the BQ28z610 Battery monitor") Signed-off-by: Henrik Grimler Link: https://patch.msgid.link/20260811-bq27z746-v1-4-3a4fa38205cc@axis.com Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin --- drivers/power/supply/bq27xxx_battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c index fac8cbf92eb7b..fe4ea314c5bba 100644 --- a/drivers/power/supply/bq27xxx_battery.c +++ b/drivers/power/supply/bq27xxx_battery.c @@ -509,7 +509,7 @@ static u8 [BQ27XXX_REG_RC] = 0x10, [BQ27XXX_REG_FCC] = 0x12, [BQ27XXX_REG_CYCT] = 0x2a, - [BQ27XXX_REG_AE] = 0x22, + [BQ27XXX_REG_AE] = INVALID_REG_ADDR, [BQ27XXX_REG_SOC] = 0x2c, [BQ27XXX_REG_DCAP] = 0x3c, [BQ27XXX_REG_AP] = 0x22, -- 2.53.0