help
Say yes here to enable debugging support.
- - config REGULATOR_DUMMY
- - bool "Provide a dummy regulator if regulator lookups fail"
- - help
- - If this option is enabled then when a regulator lookup fails
- - and the board has not specified that it has provided full
- - constraints the regulator core will provide an always
- - enabled dummy regulator, allowing consumer drivers to continue.
- -
- - A warning will be generated when this substitution is done.
- -
config REGULATOR_FIXED_VOLTAGE
tristate "Fixed voltage regulator support"
help
help
This driver supports 88PM8607 voltage regulator chips.
+++++++++config REGULATOR_ACT8865
+++++++++ tristate "Active-semi act8865 voltage regulator"
+++++++++ depends on I2C
+++++++++ select REGMAP_I2C
+++++++++ help
+++++++++ This driver controls a active-semi act8865 voltage output
+++++++++ regulator via I2C bus.
+++++++++
config REGULATOR_AD5398
tristate "Analog Devices AD5398/AD5821 regulators"
depends on I2C
This driver provides support for the voltage regulators on the
AS3711 PMIC
+ + config REGULATOR_AS3722
+ + tristate "AMS AS3722 PMIC Regulators"
+ + depends on MFD_AS3722
+ + help
+ + This driver provides support for the voltage regulators on the
+ + AS3722 PMIC. This will enable support for all the software
+ + controllable DCDC/LDO regulators.
+ +
config REGULATOR_DA903X
tristate "Dialog Semiconductor DA9030/DA9034 regulators"
depends on PMIC_DA903X
help
This driver supports LP8788 voltage regulator chip.
+++++ ++++config REGULATOR_MAX14577
+++++ ++++ tristate "Maxim 14577 regulator"
+++++ ++++ depends on MFD_MAX14577
+++++ ++++ help
+++++ ++++ This driver controls a Maxim 14577 regulator via I2C bus.
+++++ ++++ The regulators include safeout LDO and current regulator 'CHARGER'.
+++++ ++++
config REGULATOR_MAX1586
tristate "Maxim 1586/1587 voltage regulator"
depends on I2C
on PCF50633
config REGULATOR_PFUZE100
--------- tristate "Support regulators on Freescale PFUZE100 PMIC"
+++++++++ tristate "Freescale PFUZE100 regulator driver"
depends on I2C
select REGMAP_I2C
help
on TI SoCs may be unstable without enabling this as it provides
device specific optimized bias to allow/optimize functionality.
+ + config REGULATOR_STW481X_VMMC
+ + bool "ST Microelectronics STW481X VMMC regulator"
+ + depends on MFD_STW481X
+ + default y if MFD_STW481X
+ + help
+ + This driver supports the internal VMMC regulator in the STw481x
+ + PMIC chips.
+ +
config REGULATOR_TPS51632
tristate "TI TPS51632 Power Regulator"
depends on I2C
#
- - obj-$(CONFIG_REGULATOR) += core.o dummy.o fixed-helper.o helpers.o
+ + obj-$(CONFIG_REGULATOR) += core.o dummy.o fixed-helper.o helpers.o devres.o
obj-$(CONFIG_OF) += of_regulator.o
obj-$(CONFIG_REGULATOR_FIXED_VOLTAGE) += fixed.o
obj-$(CONFIG_REGULATOR_VIRTUAL_CONSUMER) += virtual.o
obj-$(CONFIG_REGULATOR_AAT2870) += aat2870-regulator.o
obj-$(CONFIG_REGULATOR_AB3100) += ab3100.o
obj-$(CONFIG_REGULATOR_AB8500) += ab8500-ext.o ab8500.o
+++++++++obj-$(CONFIG_REGULATOR_ACT8865) += act8865-regulator.o
obj-$(CONFIG_REGULATOR_AD5398) += ad5398.o
obj-$(CONFIG_REGULATOR_ANATOP) += anatop-regulator.o
obj-$(CONFIG_REGULATOR_ARIZONA) += arizona-micsupp.o arizona-ldo1.o
obj-$(CONFIG_REGULATOR_AS3711) += as3711-regulator.o
+ + obj-$(CONFIG_REGULATOR_AS3722) += as3722-regulator.o
obj-$(CONFIG_REGULATOR_DA903X) += da903x.o
obj-$(CONFIG_REGULATOR_DA9052) += da9052-regulator.o
obj-$(CONFIG_REGULATOR_DA9055) += da9055-regulator.o
obj-$(CONFIG_REGULATOR_LP8788) += lp8788-buck.o
obj-$(CONFIG_REGULATOR_LP8788) += lp8788-ldo.o
obj-$(CONFIG_REGULATOR_LP8755) += lp8755.o
+++++ ++++obj-$(CONFIG_REGULATOR_MAX14577) += max14577.o
obj-$(CONFIG_REGULATOR_MAX1586) += max1586.o
obj-$(CONFIG_REGULATOR_MAX8649) += max8649.o
obj-$(CONFIG_REGULATOR_MAX8660) += max8660.o
obj-$(CONFIG_REGULATOR_RC5T583) += rc5t583-regulator.o
obj-$(CONFIG_REGULATOR_S2MPS11) += s2mps11.o
obj-$(CONFIG_REGULATOR_S5M8767) += s5m8767.o
+ + obj-$(CONFIG_REGULATOR_STW481X_VMMC) += stw481x-vmmc.o
obj-$(CONFIG_REGULATOR_TI_ABB) += ti-abb-regulator.o
obj-$(CONFIG_REGULATOR_TPS6105X) += tps6105x-regulator.o
obj-$(CONFIG_REGULATOR_TPS62360) += tps62360-regulator.o
struct property *prop;
const char *regtype;
int proplen, gpio, i;
+ ++++++ int ret;
config = devm_kzalloc(dev,
sizeof(struct gpio_regulator_config),
}
config->nr_states = i;
- ------ of_property_read_string(np, "regulator-type", ®type);
- ------
- ------ if (!strncmp("voltage", regtype, 7))
- ------ config->type = REGULATOR_VOLTAGE;
- ------ else if (!strncmp("current", regtype, 7))
- ------ config->type = REGULATOR_CURRENT;
++ +++++++ config->type = REGULATOR_VOLTAGE;
+ ++++++ ret = of_property_read_string(np, "regulator-type", ®type);
- - if (ret < 0) {
- - dev_err(dev, "Missing 'regulator-type' property\n");
- - return ERR_PTR(-EINVAL);
++ +++++++ if (ret >= 0) {
++ +++++++ if (!strncmp("voltage", regtype, 7))
++ +++++++ config->type = REGULATOR_VOLTAGE;
++ +++++++ else if (!strncmp("current", regtype, 7))
++ +++++++ config->type = REGULATOR_CURRENT;
++ +++++++ else
++ +++++++ dev_warn(dev, "Unknown regulator-type '%s'\n",
++ +++++++ regtype);
+ ++++++ }
- - if (!strncmp("voltage", regtype, 7))
- - config->type = REGULATOR_VOLTAGE;
- - else if (!strncmp("current", regtype, 7))
- - config->type = REGULATOR_CURRENT;
- -
return config;
}
dev_err(&pdev->dev, "No regulator type set\n");
ret = -EINVAL;
goto err_memgpio;
- - break;
}
drvdata->nr_gpios = config->nr_gpios;
MC13892_SW_DEFINE(SW4, SWITCHERS3, SWITCHERS3, mc13892_sw),
MC13892_FIXED_DEFINE(SWBST, SWITCHERS5, mc13892_swbst),
MC13892_FIXED_DEFINE(VIOHI, REGULATORMODE0, mc13892_viohi),
------- -- MC13892_DEFINE_REGU(VPLL, REGULATORMODE0, REGULATORSETTING0, \
+++++++ ++ MC13892_DEFINE_REGU(VPLL, REGULATORMODE0, REGULATORSETTING0,
mc13892_vpll),
------- -- MC13892_DEFINE_REGU(VDIG, REGULATORMODE0, REGULATORSETTING0, \
+++++++ ++ MC13892_DEFINE_REGU(VDIG, REGULATORMODE0, REGULATORSETTING0,
mc13892_vdig),
------- -- MC13892_DEFINE_REGU(VSD, REGULATORMODE1, REGULATORSETTING1, \
+++++++ ++ MC13892_DEFINE_REGU(VSD, REGULATORMODE1, REGULATORSETTING1,
mc13892_vsd),
------- -- MC13892_DEFINE_REGU(VUSB2, REGULATORMODE0, REGULATORSETTING0, \
+++++++ ++ MC13892_DEFINE_REGU(VUSB2, REGULATORMODE0, REGULATORSETTING0,
mc13892_vusb2),
------- -- MC13892_DEFINE_REGU(VVIDEO, REGULATORMODE1, REGULATORSETTING1, \
+++++++ ++ MC13892_DEFINE_REGU(VVIDEO, REGULATORMODE1, REGULATORSETTING1,
mc13892_vvideo),
------- -- MC13892_DEFINE_REGU(VAUDIO, REGULATORMODE1, REGULATORSETTING1, \
+++++++ ++ MC13892_DEFINE_REGU(VAUDIO, REGULATORMODE1, REGULATORSETTING1,
mc13892_vaudio),
------- -- MC13892_DEFINE_REGU(VCAM, REGULATORMODE1, REGULATORSETTING0, \
+++++++ ++ MC13892_DEFINE_REGU(VCAM, REGULATORMODE1, REGULATORSETTING0,
mc13892_vcam),
------- -- MC13892_DEFINE_REGU(VGEN1, REGULATORMODE0, REGULATORSETTING0, \
+++++++ ++ MC13892_DEFINE_REGU(VGEN1, REGULATORMODE0, REGULATORSETTING0,
mc13892_vgen1),
------- -- MC13892_DEFINE_REGU(VGEN2, REGULATORMODE0, REGULATORSETTING0, \
+++++++ ++ MC13892_DEFINE_REGU(VGEN2, REGULATORMODE0, REGULATORSETTING0,
mc13892_vgen2),
------- -- MC13892_DEFINE_REGU(VGEN3, REGULATORMODE1, REGULATORSETTING0, \
+++++++ ++ MC13892_DEFINE_REGU(VGEN3, REGULATORMODE1, REGULATORSETTING0,
mc13892_vgen3),
MC13892_FIXED_DEFINE(VUSB, USB1, mc13892_vusb),
MC13892_GPO_DEFINE(GPO1, POWERMISC, mc13892_gpo),
}
mc13xxx_lock(priv->mc13xxx);
------- -- ret = mc13xxx_reg_rmw(priv->mc13xxx, mc13892_regulators[id].vsel_reg, mask,
------- -- reg_value);
+++++++ ++ ret = mc13xxx_reg_rmw(priv->mc13xxx, mc13892_regulators[id].vsel_reg,
+++++++ ++ mask, reg_value);
mc13xxx_unlock(priv->mc13xxx);
return ret;
config.driver_data = priv;
config.of_node = node;
- - priv->regulators[i] = regulator_register(desc, &config);
+ + priv->regulators[i] = devm_regulator_register(&pdev->dev, desc,
+ + &config);
if (IS_ERR(priv->regulators[i])) {
dev_err(&pdev->dev, "failed to register regulator %s\n",
mc13892_regulators[i].desc.name);
- - ret = PTR_ERR(priv->regulators[i]);
- - goto err;
+ + return PTR_ERR(priv->regulators[i]);
}
}
return 0;
- - err:
- - while (--i >= 0)
- - regulator_unregister(priv->regulators[i]);
- - return ret;
err_unlock:
mc13xxx_unlock(mc13892);
return ret;
}
- - static int mc13892_regulator_remove(struct platform_device *pdev)
- - {
- - struct mc13xxx_regulator_priv *priv = platform_get_drvdata(pdev);
- - int i;
- -
- - for (i = 0; i < priv->num_regulators; i++)
- - regulator_unregister(priv->regulators[i]);
- -
- - return 0;
- - }
- -
static struct platform_driver mc13892_regulator_driver = {
.driver = {
.name = "mc13892-regulator",
.owner = THIS_MODULE,
},
- - .remove = mc13892_regulator_remove,
.probe = mc13892_regulator_probe,
};
#define PFUZE100_DEVICEID 0x0
#define PFUZE100_REVID 0x3
-------- #define PFUZE100_FABID 0x3
++++++++ #define PFUZE100_FABID 0x4
#define PFUZE100_SW1ABVOL 0x20
#define PFUZE100_SW1CVOL 0x2e
if (ret)
return ret;
-------- if (value & 0x0f) {
++++++++ switch (value & 0x0f) {
- /* Freescale misprogrammed 1-3% of parts prior to week 8 of 2013 as ID=8 */
- case 0x8:
- dev_info(pfuze_chip->dev, "Assuming misprogrammed ID=0x8");
- case 0x0:
- break;
- default:
- dev_warn(pfuze_chip->dev, "Illegal ID: %x\n", value);
- return -ENODEV;
+++++++++ /*
+++++++++ * Freescale misprogrammed 1-3% of parts prior to week 8 of 2013
+++++++++ * as ID=8
+++++++++ */
+++++++++ case 0x8:
+++++++++ dev_info(pfuze_chip->dev, "Assuming misprogrammed ID=0x8");
+++++++++ case 0x0:
+++++++++ break;
+++++++++ default:
+ dev_warn(pfuze_chip->dev, "Illegal ID: %x\n", value);
+ return -ENODEV;
}
ret = regmap_read(pfuze_chip->regmap, PFUZE100_REVID, &value);
if (ret)
return ret;
dev_info(pfuze_chip->dev,
--------- "Full lay: %x, Metal lay: %x\n",
+++++++++ "Full layer: %x, Metal layer: %x\n",
(value & 0xf0) >> 4, value & 0x0f);
ret = regmap_read(pfuze_chip->regmap, PFUZE100_FABID, &value);
config.driver_data = pfuze_chip;
config.of_node = match_of_node(i);
--------- pfuze_chip->regulators[i] = regulator_register(desc, &config);
+++++++++ pfuze_chip->regulators[i] =
+++++++++ devm_regulator_register(&client->dev, desc, &config);
if (IS_ERR(pfuze_chip->regulators[i])) {
dev_err(&client->dev, "register regulator%s failed\n",
pfuze100_regulators[i].desc.name);
--------- ret = PTR_ERR(pfuze_chip->regulators[i]);
--------- while (--i >= 0)
--------- regulator_unregister(pfuze_chip->regulators[i]);
--------- return ret;
+++++++++ return PTR_ERR(pfuze_chip->regulators[i]);
}
}
return 0;
}
--------- static int pfuze100_regulator_remove(struct i2c_client *client)
--------- {
--------- int i;
--------- struct pfuze_chip *pfuze_chip = i2c_get_clientdata(client);
---------
--------- for (i = 0; i < PFUZE100_MAX_REGULATOR; i++)
--------- regulator_unregister(pfuze_chip->regulators[i]);
---------
--------- return 0;
--------- }
---------
static struct i2c_driver pfuze_driver = {
.id_table = pfuze_device_id,
.driver = {
.of_match_table = pfuze_dt_ids,
},
.probe = pfuze100_regulator_probe,
--------- .remove = pfuze100_regulator_remove,
};
module_i2c_driver(pfuze_driver);