From d08a978984ecd6ffefb73123ae8c6bee691b4e83 Mon Sep 17 00:00:00 2001 From: Zain Wang Date: Fri, 18 Mar 2016 21:17:09 +0800 Subject: [PATCH] regulator: mp8865: add regulator driver for MP8865 Change-Id: I5fa8423e5d1e301a008dcdfd60f93c442f6211a8 Signed-off-by: Zain Wang --- drivers/regulator/Kconfig | 7 +++++++ drivers/regulator/Makefile | 1 + drivers/regulator/mp8865-regulator.c | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index 5617c56fbe9b..77dd87905e57 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -685,6 +685,13 @@ config REGULATOR_MP8859 Say M here if you want to include support for the regulator as a module. The module will be named "mp8859". +config REGULATOR_MP8865 + tristate "MPS MP8865 Power Regulator" + depends on I2C + select REGMAP_I2C + help + This driver supports MP8865 voltage regulator chip. + config REGULATOR_MP886X tristate "MPS MP8869 regulator driver" depends on I2C && (OF || COMPILE_TEST) diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile index aeed0b6079b2..030312339c26 100644 --- a/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile @@ -85,6 +85,7 @@ obj-$(CONFIG_REGULATOR_MC13XXX_CORE) += mc13xxx-regulator-core.o obj-$(CONFIG_REGULATOR_MCP16502) += mcp16502.o obj-$(CONFIG_REGULATOR_MP5416) += mp5416.o obj-$(CONFIG_REGULATOR_MP8859) += mp8859.o +obj-$(CONFIG_REGULATOR_MP8865) += mp8865-regulator.o obj-$(CONFIG_REGULATOR_MP886X) += mp886x.o obj-$(CONFIG_REGULATOR_MPQ7920) += mpq7920.o obj-$(CONFIG_REGULATOR_MT6311) += mt6311-regulator.o diff --git a/drivers/regulator/mp8865-regulator.c b/drivers/regulator/mp8865-regulator.c index 416333221d13..607e3a8f2df4 100644 --- a/drivers/regulator/mp8865-regulator.c +++ b/drivers/regulator/mp8865-regulator.c @@ -52,7 +52,7 @@ struct mp8865_platform_data { struct device_node *of_node; }; -static const struct regulator_linear_range mp8865_voltage_ranges[] = { +static const struct linear_range mp8865_voltage_ranges[] = { REGULATOR_LINEAR_RANGE(600000, VOL_MIN_IDX, VOL_MAX_IDX, 10000), };