Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f586707 authored by Danny Huang's avatar Danny Huang Committed by Liam Girdwood
Browse files

regulator: tps6586x: Add missing bit mask generation



Change-Id: I76eaceb31b56264f6978af15db1e6fc7e2e01b5a
Signed-off-by: default avatarDanny Huang <dahuang@nvidia.com>
Signed-off-by: default avatarOlof Johansson <olofj@chromium.org>
Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
  (Split into separate patches)
Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent 6313e3c2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -298,14 +298,14 @@ static inline int tps6586x_regulator_preinit(struct device *parent,
	if (ret)
		return ret;

	if (!(val2 & ri->enable_bit[1]))
	if (!(val2 & (1 << ri->enable_bit[1])))
		return 0;

	/*
	 * The regulator is on, but it's enabled with the bit we don't
	 * want to use, so we switch the enable bits
	 */
	if (!(val1 & ri->enable_bit[0])) {
	if (!(val1 & (1 << ri->enable_bit[0]))) {
		ret = tps6586x_set_bits(parent, ri->enable_reg[0],
					1 << ri->enable_bit[0]);
		if (ret)