summaryrefslogtreecommitdiff
path: root/drivers/iio/imu/bmi160/bmi160.h
diff options
context:
space:
mode:
authorJonathan Albrieux <jonathan.albrieux@gmail.com>2020-05-25 19:46:03 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-06-14 13:49:45 +0300
commit5dea3fb066f015facfc97b0b5cdfd7bb26523785 (patch)
treed8fb7fb72f53767f1b30bc6020d8faa689fd6204 /drivers/iio/imu/bmi160/bmi160.h
parentfb7749661a7f0b3a172f92860d34ef9a739ff63b (diff)
downloadlinux-5dea3fb066f015facfc97b0b5cdfd7bb26523785.tar.xz
iio: imu: bmi160: added regulator support
Add vdd-supply and vddio-supply support. While working on an msm8916 device and having explicit declarations for regulators, without setting these regulators to regulators-always-on it happened those lines weren't ready because they could have been controlled by other components, causing failure in module's probe. This patch aim is to solve this situation by adding regulators control during bmi160_chip_init() and bmi160_chip_uninit(), assuring power to this component. Signed-off-by: Jonathan Albrieux <jonathan.albrieux@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/imu/bmi160/bmi160.h')
-rw-r--r--drivers/iio/imu/bmi160/bmi160.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iio/imu/bmi160/bmi160.h b/drivers/iio/imu/bmi160/bmi160.h
index 621f5309d735..923c3b274fde 100644
--- a/drivers/iio/imu/bmi160/bmi160.h
+++ b/drivers/iio/imu/bmi160/bmi160.h
@@ -3,10 +3,12 @@
#define BMI160_H_
#include <linux/iio/iio.h>
+#include <linux/regulator/consumer.h>
struct bmi160_data {
struct regmap *regmap;
struct iio_trigger *trig;
+ struct regulator_bulk_data supplies[2];
};
extern const struct regmap_config bmi160_regmap_config;