Commit 8a5a0cc1 authored by Carl Philipp Klemm's avatar Carl Philipp Klemm Committed by Sebastian Reichel

power: supply: cpcap-charger: fix small mistake in current to register conversion

Signed-off-by: default avatarCarl Philipp Klemm <philipp@uvos.xyz>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 3af26e2a
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment