iio: magn: ak8975: add Vid regulator
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 29 Jun 2016 12:08:34 +0000 (14:08 +0200)
committerJonathan Cameron <jic23@kernel.org>
Thu, 30 Jun 2016 19:39:51 +0000 (20:39 +0100)
commitb21d3f3452ec3a060c8f576a97adfdd4329b3157
treeb049c5869c3ee67158a0a360d0b149c22d7c1cec
parent90e96fdd012925871a1a21b5eaeab4b027682d6a
iio: magn: ak8975: add Vid regulator

The AK8975 has two power sources: Vdd (analog voltage supply)
and Vid (digital voltage supply). Optionally also obtain the Vid
supply regulator and enable it.

If an error occurs when enabling one of the regulators: bail out.

Cc: Gregor Boirie <gregor.boirie@parrot.com>
Cc: Richard Leitner <dev@g0hl1n.net>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/magnetometer/ak8975.c