aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com>2018-07-30 07:50:08 -0400
committerMark Brown <broonie@kernel.org>2018-07-30 09:24:20 -0400
commit410e8b4f5ca34e026ffc460a86e2354febe06fac (patch)
treeeb174e815d8840dda1b5ddc3e8333987c030f8d9
parent4f919ca2bf6da826ba1a4316e1b8e9c94e5dbeb2 (diff)
regulator: bd71837: adobt MFD changes to regulator driver
MFD part for bd71837 was changed during the review. Clean regulator part to match changed MFD: - renamed header file => fix include - remove unused platdata as also type definition was removed - Kconfig option for MFD part was changed => fix depends on clause - Rename Kconfig option for regulators As Kconfig option for regulators gets now used (when dependency to MFD is satisfied) change it so that it won't require new change when support for bd71847 is added. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/regulator/Kconfig4
-rw-r--r--drivers/regulator/Makefile2
-rw-r--r--drivers/regulator/bd71837-regulator.c7
3 files changed, 4 insertions, 9 deletions
diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index 8233dc7f0a68..347351e79b1e 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -180,9 +180,9 @@ config REGULATOR_BCM590XX
180 BCM590xx PMUs. This will enable support for the software 180 BCM590xx PMUs. This will enable support for the software
181 controllable LDO/Switching regulators. 181 controllable LDO/Switching regulators.
182 182
183config REGULATOR_BD71837 183config REGULATOR_BD718XX
184 tristate "ROHM BD71837 Power Regulator" 184 tristate "ROHM BD71837 Power Regulator"
185 depends on MFD_BD71837 185 depends on MFD_ROHM_BD718XX
186 help 186 help
187 This driver supports voltage regulators on ROHM BD71837 PMIC. 187 This driver supports voltage regulators on ROHM BD71837 PMIC.
188 This will enable support for the software controllable buck 188 This will enable support for the software controllable buck
diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile
index b7839f41591e..18bfed61e7fe 100644
--- a/drivers/regulator/Makefile
+++ b/drivers/regulator/Makefile
@@ -27,7 +27,7 @@ obj-$(CONFIG_REGULATOR_AS3711) += as3711-regulator.o
27obj-$(CONFIG_REGULATOR_AS3722) += as3722-regulator.o 27obj-$(CONFIG_REGULATOR_AS3722) += as3722-regulator.o
28obj-$(CONFIG_REGULATOR_AXP20X) += axp20x-regulator.o 28obj-$(CONFIG_REGULATOR_AXP20X) += axp20x-regulator.o
29obj-$(CONFIG_REGULATOR_BCM590XX) += bcm590xx-regulator.o 29obj-$(CONFIG_REGULATOR_BCM590XX) += bcm590xx-regulator.o
30obj-$(CONFIG_REGULATOR_BD71837) += bd71837-regulator.o 30obj-$(CONFIG_REGULATOR_BD718XX) += bd71837-regulator.o
31obj-$(CONFIG_REGULATOR_BD9571MWV) += bd9571mwv-regulator.o 31obj-$(CONFIG_REGULATOR_BD9571MWV) += bd9571mwv-regulator.o
32obj-$(CONFIG_REGULATOR_DA903X) += da903x.o 32obj-$(CONFIG_REGULATOR_DA903X) += da903x.o
33obj-$(CONFIG_REGULATOR_DA9052) += da9052-regulator.o 33obj-$(CONFIG_REGULATOR_DA9052) += da9052-regulator.o
diff --git a/drivers/regulator/bd71837-regulator.c b/drivers/regulator/bd71837-regulator.c
index 3a487255482c..0f8ac8dec3e1 100644
--- a/drivers/regulator/bd71837-regulator.c
+++ b/drivers/regulator/bd71837-regulator.c
@@ -7,7 +7,7 @@
7#include <linux/gpio.h> 7#include <linux/gpio.h>
8#include <linux/interrupt.h> 8#include <linux/interrupt.h>
9#include <linux/kernel.h> 9#include <linux/kernel.h>
10#include <linux/mfd/bd71837.h> 10#include <linux/mfd/rohm-bd718x7.h>
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/platform_device.h> 12#include <linux/platform_device.h>
13#include <linux/regulator/driver.h> 13#include <linux/regulator/driver.h>
@@ -490,7 +490,6 @@ struct reg_init {
490static int bd71837_probe(struct platform_device *pdev) 490static int bd71837_probe(struct platform_device *pdev)
491{ 491{
492 struct bd71837_pmic *pmic; 492 struct bd71837_pmic *pmic;
493 struct bd71837_board *pdata;
494 struct regulator_config config = { 0 }; 493 struct regulator_config config = { 0 };
495 struct reg_init pmic_regulator_inits[] = { 494 struct reg_init pmic_regulator_inits[] = {
496 { 495 {
@@ -558,7 +557,6 @@ static int bd71837_probe(struct platform_device *pdev)
558 goto err; 557 goto err;
559 } 558 }
560 platform_set_drvdata(pdev, pmic); 559 platform_set_drvdata(pdev, pmic);
561 pdata = dev_get_platdata(pmic->mfd->dev);
562 560
563 /* Register LOCK release */ 561 /* Register LOCK release */
564 err = regmap_update_bits(pmic->mfd->regmap, BD71837_REG_REGLOCK, 562 err = regmap_update_bits(pmic->mfd->regmap, BD71837_REG_REGLOCK,
@@ -578,9 +576,6 @@ static int bd71837_probe(struct platform_device *pdev)
578 576
579 desc = &pmic->descs[i]; 577 desc = &pmic->descs[i];
580 578
581 if (pdata)
582 config.init_data = pdata->init_data[i];
583
584 config.dev = pdev->dev.parent; 579 config.dev = pdev->dev.parent;
585 config.driver_data = pmic; 580 config.driver_data = pmic;
586 config.regmap = pmic->mfd->regmap; 581 config.regmap = pmic->mfd->regmap;