iio: gyro: bmg160: Add rudimentary regulator support
authorStephan Gerhold <stephan@gerhold.net>
Fri, 11 Dec 2020 18:38:15 +0000 (19:38 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Fri, 22 Jan 2021 08:52:02 +0000 (08:52 +0000)
commitce69361ab74681b095d72376ad173dea3f4d9c29
treeea3d17e45063d4d41458bed597bd1ca28b8efe50
parentfe28b2aa52a92401d58ef6fc7283127030c2947b
iio: gyro: bmg160: Add rudimentary regulator support

BMG160 needs VDD and VDDIO regulators that might need to be explicitly
enabled. Add some rudimentary support to obtain and enable these
regulators during probe() and disable them using a devm action.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20201211183815.51269-2-stephan@gerhold.net
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/gyro/bmg160_core.c