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

Commit b1037c1a authored by Linus Walleij's avatar Linus Walleij Committed by Jonathan Cameron
Browse files

iio: magn: ak8975: allow a delay after enabling regulators



The datasheet actually specifies that we need to wait atleast
500us after powering on the device before trying to set mode.

Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 9e6c16d9
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -399,6 +399,12 @@ static int ak8975_power_on(const struct ak8975_data *data)
			 "Failed to enable specified Vid supply\n");
		return ret;
	}
	/*
	 * According to the datasheet the power supply rise time i 200us
	 * and the minimum wait time before mode setting is 100us, in
	 * total 300 us. Add some margin and say minimum 500us here.
	 */
	usleep_range(500, 1000);
	return 0;
}