All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4/5] power: supply: cpcap-charger: fix small mistake in current to register conversion
@ 2021-01-17 21:47 Carl Philipp Klemm
  2021-04-04  7:23 ` Tony Lindgren
  0 siblings, 1 reply; 3+ messages in thread
From: Carl Philipp Klemm @ 2021-01-17 21:47 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: linux-pm, linux-omap, Arthur Demchenkov, Tony Lindgren,
	Merlijn Wajer, Pavel Machek

Signed-off-by: Carl Philipp Klemm <philipp@uvos.xyz>
---
 drivers/power/supply/cpcap-charger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/supply/cpcap-charger.c b/drivers/power/supply/cpcap-charger.c
index 152090faf5b2..be7d1da7a5a5 100644
--- a/drivers/power/supply/cpcap-charger.c
+++ b/drivers/power/supply/cpcap-charger.c
@@ -300,7 +300,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;
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-05  8:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-17 21:47 [PATCH 4/5] power: supply: cpcap-charger: fix small mistake in current to register conversion Carl Philipp Klemm
2021-04-04  7:23 ` Tony Lindgren
2021-04-05  8:22   ` Sebastian Reichel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.