]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: max8997/8966: fix charger cv voltage set bug
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Mon, 8 May 2017 05:45:44 +0000 (05:45 +0000)
committerMark Brown <broonie@kernel.org>
Sun, 14 May 2017 09:39:31 +0000 (18:39 +0900)
commitb64442e28de280695cd725f028f48f6b8f1806cd
tree615ace6fc9147aee877fdc43a4cefeeef14939b7
parent6a0fa58cdd92da9a8e6fa4e621cabd91974091b3
regulator: max8997/8966: fix charger cv voltage set bug

When min charger-CV is <= 4.0V and max charger-CV is >= 4.0V,
we can use 4.00V as CV (register value = 0x1).`

The original code had a typo that wrote ">=" (max_uV >= 4000000),
which should've been "<", which is not necessary anyway
as mentioned by Dan Carpenter.

Reported-By: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/max8997-regulator.c