Skip to content

Commit f63248f

Browse files
Fabrice Gasnierbroonie
authored andcommitted
regulator: stm32-vrefbuf: fix check on ready flag
stm32_vrefbuf_enable() wrongly checks VRR bit: 0 stands for not ready, 1 for ready. It currently checks the opposite. This makes enable routine to exit immediately without waiting for ready flag. Fixes: 0cdbf48 ("regulator: Add support for stm32-vrefbuf") Signed-off-by: Fabrice Gasnier <[email protected]> Signed-off-by: Mark Brown <[email protected]> Cc: [email protected]
1 parent 4e79f3f commit f63248f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/regulator/stm32-vrefbuf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ static int stm32_vrefbuf_enable(struct regulator_dev *rdev)
5151
* arbitrary timeout.
5252
*/
5353
ret = readl_poll_timeout(priv->base + STM32_VREFBUF_CSR, val,
54-
!(val & STM32_VRR), 650, 10000);
54+
val & STM32_VRR, 650, 10000);
5555
if (ret) {
5656
dev_err(&rdev->dev, "stm32 vrefbuf timed out!\n");
5757
val = readl_relaxed(priv->base + STM32_VREFBUF_CSR);

0 commit comments

Comments
 (0)