regulator: ti-abb: Fix timeout in ti_abb_wait_txdone/ti_abb_clear_all_txdone
authorAxel Lin <axel.lin@ingics.com>
Sun, 29 Sep 2019 09:58:48 +0000 (17:58 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 1 Oct 2019 11:21:02 +0000 (12:21 +0100)
commitf64db548799e0330897c3203680c2ee795ade518
tree1b20bb2c89788d91d4a3c2bc105e7e7b7783c46e
parenta72865f057820ea9f57597915da4b651d65eb92f
regulator: ti-abb: Fix timeout in ti_abb_wait_txdone/ti_abb_clear_all_txdone

ti_abb_wait_txdone() may return -ETIMEDOUT when ti_abb_check_txdone()
returns true in the latest iteration of the while loop because the timeout
value is abb->settling_time + 1. Similarly, ti_abb_clear_all_txdone() may
return -ETIMEDOUT when ti_abb_check_txdone() returns false in the latest
iteration of the while loop. Fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20190929095848.21960-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/ti-abb-regulator.c