power: supply: cpcap-charger: fix small mistake in current to register conversion
Signed-off-by: Carl Philipp Klemm <philipp@uvos.xyz> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
parent
3af26e2ad5
commit
8a5a0cc13a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue