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 ACE152773E4; Sat, 12 Sep 2026 19:11:44 +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=1789240305; cv=none; b=M/G4jt+S9wA5O8MwnlMz+4jTqE25po1fVVJ3z3IRBnZhedCaN7hyt18N8oqLF2dpuH/+BWM06z8WPrb+/L8IHPcn4RxZ79KhKQFkew4l25oJOQxvja0rKXXdHRLQ9MQzvNNY/DbW2r0M3vaz1v7OLVGBZM3Ft0BbM195FNnTwtM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789240305; c=relaxed/simple; bh=vO5riNt7QNtvf8Oq9uIS+NbU4RKfF7G/sl0YhNGLqps=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tbN+gzMN30Wc4zJBP73MRMqTYw2CXvgJDsFlSCv5ruHtWtf8vEUBB7qmXK0coAgGhcplWzUnOvu8dHmHjTgX/hb9JPVkAvFaqxapYxL8WVqMrsUdzT84JEjy0gAD2GNuc1KumzjCoUzqszNYw8Ul0Kz8aUqhXEeTsB3z7MvsRXI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Hemuq1GN; 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="Hemuq1GN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B19DF1F000FF; Sat, 12 Sep 2026 19:11:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789240304; bh=F3CE96hlF05cJtqtp0hKFveNZxirDo47IFqUZFvv4G4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Hemuq1GNnCMLKsiiQIeBC+AOzgOTNXxTlRi7vMSic/mxVoQEtpaDa6RraKZa3ASo2 RkTXnugqVgyLrjlC3rh3HvudbJ/srcGS5rvAqi2GtRf+LTQbRpZlPnXoc8dn8aeWj8 czlEsJI2MOn1b/7t8sQptnFGi1SGenq2W8VyMoD0= 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.15 814/935] power: supply: bq27xxx: bq27z561: fix invalid AverageEnergy address Date: Sat, 12 Sep 2026 09:04:04 +0200 Message-ID: <20260912065545.505747210@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065526.833703348@linuxfoundation.org> References: <20260912065526.833703348@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.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Henrik Grimler [ Upstream commit 2da28b059e0ddcd2e1956eeae383246207965573 ] bq27z561 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: 6f24ff97e323 ("power: supply: bq27xxx_battery: Add the BQ27Z561 Battery monitor") Signed-off-by: Henrik Grimler Link: https://patch.msgid.link/20260811-bq27z746-v1-5-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 00c013b0a77b7..d4c694045209f 100644 --- a/drivers/power/supply/bq27xxx_battery.c +++ b/drivers/power/supply/bq27xxx_battery.c @@ -489,7 +489,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