mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
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:
committed by
Sebastian Reichel
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;
|
||||
|
||||
Reference in New Issue
Block a user