aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Philipp Klemm <[email protected]>2021-01-17 22:47:45 +0100
committerSebastian Reichel <[email protected]>2021-04-05 10:21:12 +0200
commit8a5a0cc13aa927eac7a9eb3ca82dfc1f82cfc28d (patch)
treec09f1eaa05ace5f8336f4215b4e48b9de5b35c4a
parent3af26e2ad514dfbd2405e8f1b407ed2db6b87bc1 (diff)
power: supply: cpcap-charger: fix small mistake in current to register conversion
Signed-off-by: Carl Philipp Klemm <[email protected]> Acked-by: Tony Lindgren <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
-rw-r--r--drivers/power/supply/cpcap-charger.c2
1 files changed, 1 insertions, 1 deletions
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;