regulator: axp20x: Fix poly-phase bit offset for AXP803 DCDC5/6
authorChen-Yu Tsai <wens@csie.org>
Fri, 29 Sep 2017 03:25:08 +0000 (11:25 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 4 Oct 2017 10:48:21 +0000 (11:48 +0100)
The bit offset used to check if DCDC5 and DCDC6 are tied together in
poly-phase output is wrong. It was checking against a reserved bit,
which is always false.

In reality, neither the reference design layout nor actually produced
boards tie these two buck regulators together. But we should still
fix it, just in case.

Fixes: 1dbe0ccb0631 ("regulator: axp20x-regulator: add support for AXP803")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Tested-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/axp20x-regulator.c

index f18b36dd57dd44a2f1d94302f6e1492ea6e54f88..376a99b7cf5da150794cbb3b2f1c72078985166c 100644 (file)
@@ -590,7 +590,7 @@ static bool axp20x_is_polyphase_slave(struct axp20x_dev *axp20x, int id)
                case AXP803_DCDC3:
                        return !!(reg & BIT(6));
                case AXP803_DCDC6:
-                       return !!(reg & BIT(7));
+                       return !!(reg & BIT(5));
                }
                break;