[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210510102021.944007993@linuxfoundation.org>
Date: Mon, 10 May 2021 12:20:03 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Carl Philipp Klemm <philipp@...s.xyz>,
Tony Lindgren <tony@...mide.com>,
Sebastian Reichel <sebastian.reichel@...labora.com>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.12 214/384] power: supply: cpcap-charger: fix small mistake in current to register conversion
From: Carl Philipp Klemm <philipp@...s.xyz>
[ Upstream commit 8a5a0cc13aa927eac7a9eb3ca82dfc1f82cfc28d ]
Signed-off-by: Carl Philipp Klemm <philipp@...s.xyz>
Acked-by: Tony Lindgren <tony@...mide.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@...labora.com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/power/supply/cpcap-charger.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/supply/cpcap-charger.c b/drivers/power/supply/cpcap-charger.c
index 641dcad1133f..3f06eb826ac2 100644
--- a/drivers/power/supply/cpcap-charger.c
+++ b/drivers/power/supply/cpcap-charger.c
@@ -318,7 +318,7 @@ static int cpcap_charger_current_to_regval(int microamp)
return CPCAP_REG_CRM_ICHRG(0x0);
if (miliamp < 177)
return CPCAP_REG_CRM_ICHRG(0x1);
- if (miliamp > 1596)
+ if (miliamp >= 1596)
return CPCAP_REG_CRM_ICHRG(0xe);
res = microamp / 88666;
--
2.30.2
Powered by blists - more mailing lists