Skip to content

Commit

Permalink
power: supply: cpcap-charger: fix small mistake in current to registe…
Browse files Browse the repository at this point in the history
…r conversion

Signed-off-by: Carl Philipp Klemm <[email protected]>
Acked-by: Tony Lindgren <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
  • Loading branch information
IMbackK authored and sre committed Apr 5, 2021
1 parent 3af26e2 commit 8a5a0cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/power/supply/cpcap-charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8a5a0cc

Please sign in to comment.