Commit 81e29b7d authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'regulator-v3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator updates from Mark Brown:
 "This time around most of the changes are a lot of new drivers along
  with the standard set of fixes and cleanups (thanks again largely to
  Axel Lin).  We do have one nice new feature in the core which factors
  out the disappointingly tricky code around DT parsing, only a couple
  of drivers have been converted so far:

   - Factor out the code for parsing the standard bindings for a set of
     regulators out of DT, making the probe part of a lot of drivers
     simplier.
   - New drivers for Dialog DA9213, HiSilicon HI6420, Intersil
     ISL9305/H, Ricoh RN5T618, Rockchip RK808, Skyworks SKY81452,
     Silergy SYR82x, and Qualcomm RPM"

* tag 'regulator-v3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (71 commits)
  regulator: da9211: Fix a bug in update of mask bit
  regulator: pwm-regulator: add devicetree bindings for pwm regulator
  regulator: pwm-regulator: get voltage and duty table from dts
  regulator: qcom_rpm: Fix FORCE_MODE_IS_2_BITS macro
  regulator: qcom_rpm: Don't explicitly initialise the first field of config
  regulator: ltc3589: fix broken voltage transitions
  regulator: qcom-rpm: Regulator driver for the Qualcomm RPM
  regulator: axp20x: Use parent device as regulator configuration device
  regulator: fan53555: Fix null pointer dereference
  regulator: fan53555: Fixup report wrong vendor message
  regulator: fan53555: fix wrong cast in probe
  regulator: fan53555: add support for Silergy SYR82x regulators
  regulator: fan53555: add devicetree support
  regulator: add devicetree bindings for Fairchild FAN53555 regulators
  regulator: rk808: Add function for ramp delay for buck1/buck2
  regulator: fan53555: use set_ramp_delay to set the ramp up slew rate
  regulator: fan53555: enable vin supply
  regulator: rk808: Fix missing of_node_put
  regulator: rk808: Remove unused variables
  regulator: of: Add stub OF match function for !OF case
  ...
parents c831dd73 ad21edcd
* Dialog Semiconductor DA9211/DA9213 Voltage Regulator
Required properties:
- compatible: "dlg,da9211" or "dlg,da9213".
- reg: I2C slave address, usually 0x68.
- interrupts: the interrupt outputs of the controller
- regulators: A node that houses a sub-node for each regulator within the
device. Each sub-node is identified using the node's name, with valid
values listed below. The content of each sub-node is defined by the
standard binding for regulators; see regulator.txt.
BUCKA and BUCKB.
Optional properties:
- Any optional property defined in regulator.txt
Example 1) DA9211
pmic: da9211@68 {
compatible = "dlg,da9211";
reg = <0x68>;
interrupts = <3 27>;
regulators {
BUCKA {
regulator-name = "VBUCKA";
regulator-min-microvolt = < 300000>;
regulator-max-microvolt = <1570000>;
regulator-min-microamp = <2000000>;
regulator-max-microamp = <5000000>;
};
BUCKB {
regulator-name = "VBUCKB";
regulator-min-microvolt = < 300000>;
regulator-max-microvolt = <1570000>;
regulator-min-microamp = <2000000>;
regulator-max-microamp = <5000000>;
};
};
};
Example 2) DA92113
pmic: da9213@68 {
compatible = "dlg,da9213";
reg = <0x68>;
interrupts = <3 27>;
regulators {
BUCKA {
regulator-name = "VBUCKA";
regulator-min-microvolt = < 300000>;
regulator-max-microvolt = <1570000>;
regulator-min-microamp = <3000000>;
regulator-max-microamp = <6000000>;
};
BUCKB {
regulator-name = "VBUCKB";
regulator-min-microvolt = < 300000>;
regulator-max-microvolt = <1570000>;
regulator-min-microamp = <3000000>;
regulator-max-microamp = <6000000>;
};
};
};
Binding for Fairchild FAN53555 regulators
Required properties:
- compatible: one of "fcs,fan53555", "silergy,syr827", "silergy,syr828"
- reg: I2C address
Optional properties:
- fcs,suspend-voltage-selector: declare which of the two available
voltage selector registers should be used for the suspend
voltage. The other one is used for the runtime voltage setting
Possible values are either <0> or <1>
- vin-supply: regulator supplying the vin pin
Example:
regulator@40 {
compatible = "fcs,fan53555";
regulator-name = "fan53555";
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1800000>;
vin-supply = <&parent_reg>;
fcs,suspend-voltage-selector = <1>;
};
Intersil ISL9305/ISL9305H voltage regulator
Required properties:
- compatible: "isl,isl9305" or "isl,isl9305h"
- reg: I2C slave address, usually 0x68.
- regulators: A node that houses a sub-node for each regulator within the
device. Each sub-node is identified using the node's name, with valid
values being "dcd1", "dcd2", "ldo1" and "ldo2". The content of each sub-node
is defined by the standard binding for regulators; see regulator.txt.
- VINDCD1-supply: A phandle to a regulator node supplying VINDCD1.
VINDCD2-supply: A phandle to a regulator node supplying VINDCD2.
VINLDO1-supply: A phandle to a regulator node supplying VINLDO1.
VINLDO2-supply: A phandle to a regulator node supplying VINLDO2.
Optional properties:
- Per-regulator optional properties are defined in regulator.txt
Example
pmic: isl9305@68 {
compatible = "isl,isl9305";
reg = <0x68>;
VINDCD1-supply = <&system_power>;
VINDCD2-supply = <&system_power>;
VINLDO1-supply = <&system_power>;
VINLDO2-supply = <&system_power>;
regulators {
dcd1 {
regulator-name = "VDD_DSP";
regulator-always-on;
};
};
};
Maxim MAX1586 voltage regulator
Required properties:
- compatible: must be "maxim,max1586"
- reg: I2C slave address, usually 0x14
- v3-gain: integer specifying the V3 gain as per datasheet
(1 + R24/R25 + R24/185.5kOhm)
- any required generic properties defined in regulator.txt
Example:
i2c_master {
max1586@14 {
compatible = "maxim,max1586";
reg = <0x14>;
v3-gain = <1000000>;
regulators {
vcc_core: v3 {
regulator-name = "vcc_core";
regulator-compatible = "Output_V3";
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1705000>;
regulator-always-on;
};
};
};
};
Binding for Maxim MAX77802 regulators
This is a part of device tree bindings of MAX77802 multi-function device.
More information can be found in bindings/mfd/max77802.txt file.
The MAX77802 PMIC has 10 high-efficiency Buck and 32 Low-dropout (LDO)
regulators that can be controlled over I2C.
Following properties should be present in main device node of the MFD chip.
Optional node:
- regulators : The regulators of max77802 have to be instantiated
under subnode named "regulators" using the following format.
regulator-name {
standard regulator constraints....
};
refer Documentation/devicetree/bindings/regulator/regulator.txt
The regulator node name should be initialized with a string to get matched
with their hardware counterparts as follow. The valid names are:
-LDOn : for LDOs, where n can lie in ranges 1-15, 17-21, 23-30
and 32-35.
example: LDO1, LDO2, LDO35.
-BUCKn : for BUCKs, where n can lie in range 1 to 10.
example: BUCK1, BUCK5, BUCK10.
Example:
max77802@09 {
compatible = "maxim,max77802";
interrupt-parent = <&wakeup_eint>;
interrupts = <26 0>;
reg = <0x09>;
#address-cells = <1>;
#size-cells = <0>;
regulators {
ldo11_reg: LDO11 {
regulator-name = "vdd_ldo11";
regulator-min-microvolt = <1900000>;
regulator-max-microvolt = <1900000>;
regulator-always-on;
};
buck1_reg: BUCK1 {
regulator-name = "vdd_mif";
regulator-min-microvolt = <950000>;
regulator-max-microvolt = <1300000>;
regulator-always-on;
regulator-boot-on;
};
};
pwm regulator bindings
Required properties:
- compatible: Should be "pwm-regulator"
- pwms: OF device-tree PWM specification (see PWM binding pwm.txt)
- voltage-table: voltage and duty table, include 2 members in each set of
brackets, first one is voltage(unit: uv), the next is duty(unit: percent)
Any property defined as part of the core regulator binding defined in
regulator.txt can also be used.
Example:
pwm_regulator {
compatible = "pwm-regulator;
pwms = <&pwm1 0 8448 0>;
voltage-table = <1114000 0>,
<1095000 10>,
<1076000 20>,
<1056000 30>,
<1036000 40>,
<1016000 50>;
regulator-min-microvolt = <1016000>;
regulator-max-microvolt = <1114000>;
regulator-name = "vdd_logic";
};
SKY81452 voltage regulator
Required properties:
- any required generic properties defined in regulator.txt
Optional properties:
- any available generic properties defined in regulator.txt
Example:
regulator {
/* generic regulator properties */
regulator-name = "touch_en";
regulator-min-microvolt = <4500000>;
regulator-max-microvolt = <8000000>;
};
......@@ -49,6 +49,7 @@ epson Seiko Epson Corp.
est ESTeem Wireless Modems
eukrea Eukréa Electromatique
excito Excito
fcs Fairchild Semiconductor
fsl Freescale Semiconductor
GEFanuc GE Fanuc Intelligent Platforms Embedded Systems, Inc.
gef GE Fanuc Intelligent Platforms Embedded Systems, Inc.
......@@ -124,6 +125,7 @@ sil Silicon Image
silabs Silicon Laboratories
simtek
sii Seiko Instruments, Inc.
silergy Silergy Corp.
sirf SiRF Technology, Inc.
smsc Standard Microsystems Corporation
snps Synopsys, Inc.
......
......@@ -9895,6 +9895,7 @@ F: drivers/scsi/vmw_pvscsi.h
VOLTAGE AND CURRENT REGULATOR FRAMEWORK
M: Liam Girdwood <lgirdwood@gmail.com>
M: Mark Brown <broonie@kernel.org>
L: linux-kernel@vger.kernel.org
W: http://opensource.wolfsonmicro.com/node/15
W: http://www.slimlogic.co.uk/?p=48
T: git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git
......
......@@ -199,13 +199,14 @@ config REGULATOR_DA9210
interface.
config REGULATOR_DA9211
tristate "Dialog Semiconductor DA9211/DA9212 regulator"
tristate "Dialog Semiconductor DA9211/DA9212/DA9213/DA9214 regulator"
depends on I2C
select REGMAP_I2C
help
Say y here to support for the Dialog Semiconductor DA9211/DA9212.
The DA9211/DA9212 is a multi-phase synchronous step down
converter 12A DC-DC Buck controlled through an I2C
Say y here to support for the Dialog Semiconductor DA9211/DA9212
/DA9213/DA9214.
The DA9211/DA9212/DA9213/DA9214 is a multi-phase synchronous
step down converter 12A or 16A DC-DC Buck controlled through an I2C
interface.
config REGULATOR_DBX500_PRCMU
......@@ -240,6 +241,23 @@ config REGULATOR_GPIO
and the platform has to provide a mapping of GPIO-states
to target volts/amps.
config REGULATOR_HI6421
tristate "HiSilicon Hi6421 PMIC voltage regulator support"
depends on MFD_HI6421_PMIC && OF
help
This driver provides support for the voltage regulators on the
HiSilicon Hi6421 PMU / Codec IC.
Hi6421 is a multi-function device which, on regulator part, provides
21 general purpose LDOs, 3 dedicated LDOs, and 5 BUCKs. All
of them come with support to either ECO (idle) or sleep mode.
config REGULATOR_ISL9305
tristate "Intersil ISL9305 regulator"
depends on I2C
select REGMAP_I2C
help
This driver supports ISL9305 voltage regulator chip.
config REGULATOR_ISL6271A
tristate "Intersil ISL6271A Power regulator"
depends on I2C
......@@ -387,6 +405,15 @@ config REGULATOR_MAX77693
and one current regulator 'CHARGER'. This is suitable for
Exynos-4x12 chips.
config REGULATOR_MAX77802
tristate "Maxim 77802 regulator"
depends on MFD_MAX77686
help
This driver controls a Maxim 77802 regulator
via I2C bus. The provided regulator is suitable for
Exynos5420/Exynos5800 SoCs to control various voltages.
It includes support for control of voltage and ramp speed.
config REGULATOR_MC13XXX_CORE
tristate
......@@ -449,6 +476,25 @@ config REGULATOR_PFUZE100
Say y here to support the regulators found on the Freescale
PFUZE100/PFUZE200 PMIC.
config REGULATOR_PWM
tristate "PWM voltage regulator"
depends on PWM
help
This driver supports PWM controlled voltage regulators. PWM
duty cycle can increase or decrease the voltage.
config REGULATOR_QCOM_RPM
tristate "Qualcomm RPM regulator driver"
depends on MFD_QCOM_RPM
help
If you say yes to this option, support will be included for the
regulators exposed by the Resource Power Manager found in Qualcomm
8660, 8960 and 8064 based devices.
Say M here if you want to include support for the regulators on the
Qualcomm RPM as a module. The module will be named
"qcom_rpm-regulator".
config REGULATOR_RC5T583
tristate "RICOH RC5T583 Power regulators"
depends on MFD_RC5T583
......@@ -459,6 +505,22 @@ config REGULATOR_RC5T583
through regulator interface. The device supports multiple DCDC/LDO
outputs which can be controlled by i2c communication.
config REGULATOR_RK808
tristate "Rockchip RK808 Power regulators"
depends on MFD_RK808
help
Select this option to enable the power regulator of ROCKCHIP
PMIC RK808.
This driver supports the control of different power rails of device
through regulator interface. The device supports multiple DCDC/LDO
outputs which can be controlled by i2c communication.
config REGULATOR_RN5T618
tristate "Ricoh RN5T618 voltage regulators"
depends on MFD_RN5T618
help
Say y here to support the regulators found on Ricoh RN5T618 PMIC.
config REGULATOR_S2MPA01
tristate "Samsung S2MPA01 voltage regulator"
depends on MFD_SEC_CORE
......@@ -483,11 +545,16 @@ config REGULATOR_S5M8767
via I2C bus. S5M8767A have 9 Bucks and 28 LDOs output and
supports DVS mode with 8bits of output voltage control.
config REGULATOR_ST_PWM
tristate "STMicroelectronics PWM voltage regulator"
depends on ARCH_STI
config REGULATOR_SKY81452
tristate "Skyworks Solutions SKY81452 voltage regulator"
depends on SKY81452
help
This driver supports ST's PWM controlled voltage regulators.
This driver supports Skyworks SKY81452 voltage output regulator
via I2C bus. SKY81452 has one voltage linear regulator can be
programmed from 4.5V to 20V.
This driver can also be built as a module. If so, the module
will be called sky81452-regulator.
config REGULATOR_TI_ABB
tristate "TI Adaptive Body Bias on-chip LDO"
......
......@@ -32,7 +32,9 @@ obj-$(CONFIG_REGULATOR_DBX500_PRCMU) += dbx500-prcmu.o
obj-$(CONFIG_REGULATOR_DB8500_PRCMU) += db8500-prcmu.o
obj-$(CONFIG_REGULATOR_FAN53555) += fan53555.o
obj-$(CONFIG_REGULATOR_GPIO) += gpio-regulator.o
obj-$(CONFIG_REGULATOR_HI6421) += hi6421-regulator.o
obj-$(CONFIG_REGULATOR_ISL6271A) += isl6271a-regulator.o
obj-$(CONFIG_REGULATOR_ISL9305) += isl9305.o
obj-$(CONFIG_REGULATOR_LP3971) += lp3971.o
obj-$(CONFIG_REGULATOR_LP3972) += lp3972.o
obj-$(CONFIG_REGULATOR_LP872X) += lp872x.o
......@@ -52,20 +54,25 @@ obj-$(CONFIG_REGULATOR_MAX8997) += max8997.o
obj-$(CONFIG_REGULATOR_MAX8998) += max8998.o
obj-$(CONFIG_REGULATOR_MAX77686) += max77686.o
obj-$(CONFIG_REGULATOR_MAX77693) += max77693.o
obj-$(CONFIG_REGULATOR_MAX77802) += max77802.o
obj-$(CONFIG_REGULATOR_MC13783) += mc13783-regulator.o
obj-$(CONFIG_REGULATOR_MC13892) += mc13892-regulator.o
obj-$(CONFIG_REGULATOR_MC13XXX_CORE) += mc13xxx-regulator-core.o
obj-$(CONFIG_REGULATOR_QCOM_RPM) += qcom_rpm-regulator.o
obj-$(CONFIG_REGULATOR_PALMAS) += palmas-regulator.o
obj-$(CONFIG_REGULATOR_PFUZE100) += pfuze100-regulator.o
obj-$(CONFIG_REGULATOR_PWM) += pwm-regulator.o
obj-$(CONFIG_REGULATOR_TPS51632) += tps51632-regulator.o
obj-$(CONFIG_REGULATOR_PBIAS) += pbias-regulator.o
obj-$(CONFIG_REGULATOR_PCAP) += pcap-regulator.o
obj-$(CONFIG_REGULATOR_PCF50633) += pcf50633-regulator.o
obj-$(CONFIG_REGULATOR_RC5T583) += rc5t583-regulator.o
obj-$(CONFIG_REGULATOR_RK808) += rk808-regulator.o
obj-$(CONFIG_REGULATOR_RN5T618) += rn5t618-regulator.o
obj-$(CONFIG_REGULATOR_S2MPA01) += s2mpa01.o
obj-$(CONFIG_REGULATOR_S2MPS11) += s2mps11.o
obj-$(CONFIG_REGULATOR_S5M8767) += s5m8767.o
obj-$(CONFIG_REGULATOR_ST_PWM) += st-pwm.o
obj-$(CONFIG_REGULATOR_SKY81452) += sky81452-regulator.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
......
......@@ -22,12 +22,10 @@
struct as3711_regulator_info {
struct regulator_desc desc;
unsigned int max_uV;
};
struct as3711_regulator {
struct as3711_regulator_info *reg_info;
struct regulator_dev *rdev;
};
/*
......@@ -132,39 +130,37 @@ static const struct regulator_linear_range as3711_dldo_ranges[] = {
REGULATOR_LINEAR_RANGE(1750000, 0x20, 0x3f, 50000),
};
#define AS3711_REG(_id, _en_reg, _en_bit, _vmask, _vshift, _min_uV, _max_uV, _sfx) \
[AS3711_REGULATOR_ ## _id] = { \
.desc = { \
.name = "as3711-regulator-" # _id, \
.id = AS3711_REGULATOR_ ## _id, \
.n_voltages = (_vmask + 1), \
.ops = &as3711_ ## _sfx ## _ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
.vsel_reg = AS3711_ ## _id ## _VOLTAGE, \
.vsel_mask = _vmask << _vshift, \
.enable_reg = AS3711_ ## _en_reg, \
.enable_mask = BIT(_en_bit), \
.min_uV = _min_uV, \
.linear_ranges = as3711_ ## _sfx ## _ranges, \
.n_linear_ranges = ARRAY_SIZE(as3711_ ## _sfx ## _ranges), \
}, \
.max_uV = _max_uV, \
#define AS3711_REG(_id, _en_reg, _en_bit, _vmask, _sfx) \
[AS3711_REGULATOR_ ## _id] = { \
.desc = { \
.name = "as3711-regulator-" # _id, \
.id = AS3711_REGULATOR_ ## _id, \
.n_voltages = (_vmask + 1), \
.ops = &as3711_ ## _sfx ## _ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
.vsel_reg = AS3711_ ## _id ## _VOLTAGE, \
.vsel_mask = _vmask, \
.enable_reg = AS3711_ ## _en_reg, \
.enable_mask = BIT(_en_bit), \
.linear_ranges = as3711_ ## _sfx ## _ranges, \
.n_linear_ranges = ARRAY_SIZE(as3711_ ## _sfx ## _ranges), \
}, \
}
static struct as3711_regulator_info as3711_reg_info[] = {
AS3711_REG(SD_1, SD_CONTROL, 0, 0x7f, 0, 612500, 3350000, sd),
AS3711_REG(SD_2, SD_CONTROL, 1, 0x7f, 0, 612500, 3350000, sd),
AS3711_REG(SD_3, SD_CONTROL, 2, 0x7f, 0, 612500, 3350000, sd),
AS3711_REG(SD_4, SD_CONTROL, 3, 0x7f, 0, 612500, 3350000, sd),
AS3711_REG(LDO_1, LDO_1_VOLTAGE, 7, 0x1f, 0, 1200000, 3300000, aldo),
AS3711_REG(LDO_2, LDO_2_VOLTAGE, 7, 0x1f, 0, 1200000, 3300000, aldo),
AS3711_REG(LDO_3, LDO_3_VOLTAGE, 7, 0x3f, 0, 900000, 3300000, dldo),
AS3711_REG(LDO_4, LDO_4_VOLTAGE, 7, 0x3f, 0, 900000, 3300000, dldo),
AS3711_REG(LDO_5, LDO_5_VOLTAGE, 7, 0x3f, 0, 900000, 3300000, dldo),
AS3711_REG(LDO_6, LDO_6_VOLTAGE, 7, 0x3f, 0, 900000, 3300000, dldo),
AS3711_REG(LDO_7, LDO_7_VOLTAGE, 7, 0x3f, 0, 900000, 3300000, dldo),
AS3711_REG(LDO_8, LDO_8_VOLTAGE, 7, 0x3f, 0, 900000, 3300000, dldo),
AS3711_REG(SD_1, SD_CONTROL, 0, 0x7f, sd),
AS3711_REG(SD_2, SD_CONTROL, 1, 0x7f, sd),
AS3711_REG(SD_3, SD_CONTROL, 2, 0x7f, sd),
AS3711_REG(SD_4, SD_CONTROL, 3, 0x7f, sd),
AS3711_REG(LDO_1, LDO_1_VOLTAGE, 7, 0x1f, aldo),
AS3711_REG(LDO_2, LDO_2_VOLTAGE, 7, 0x1f, aldo),
AS3711_REG(LDO_3, LDO_3_VOLTAGE, 7, 0x3f, dldo),
AS3711_REG(LDO_4, LDO_4_VOLTAGE, 7, 0x3f, dldo),
AS3711_REG(LDO_5, LDO_5_VOLTAGE, 7, 0x3f, dldo),
AS3711_REG(LDO_6, LDO_6_VOLTAGE, 7, 0x3f, dldo),
AS3711_REG(LDO_7, LDO_7_VOLTAGE, 7, 0x3f, dldo),
AS3711_REG(LDO_8, LDO_8_VOLTAGE, 7, 0x3f, dldo),
/* StepUp output voltage depends on supplying regulator */
};
......@@ -263,7 +259,6 @@ static int as3711_regulator_probe(struct platform_device *pdev)
ri->desc.name);
return PTR_ERR(rdev);
}
reg->rdev = rdev;
}
platform_set_drvdata(pdev, regs);
return 0;
......
......@@ -245,7 +245,7 @@ static int axp20x_regulator_probe(struct platform_device *pdev)
for (i = 0; i < AXP20X_REG_ID_MAX; i++) {
init_data = axp20x_matches[i].init_data;
config.dev = &pdev->dev;
config.dev = pdev->dev.parent;
config.init_data = init_data;
config.regmap = axp20x->regmap;
config.of_node = axp20x_matches[i].of_node;
......
......@@ -202,7 +202,6 @@ static struct bcm590xx_info bcm590xx_regs[] = {
struct bcm590xx_reg {
struct regulator_desc *desc;
struct bcm590xx *mfd;
struct bcm590xx_info **info;
};
static int bcm590xx_get_vsel_register(int id)
......@@ -389,11 +388,6 @@ static int bcm590xx_probe(struct platform_device *pdev)
if (!pmu->desc)
return -ENOMEM;
pmu->info = devm_kzalloc(&pdev->dev, BCM590XX_NUM_REGS *
sizeof(struct bcm590xx_info *), GFP_KERNEL);
if (!pmu->info)
return -ENOMEM;
info = bcm590xx_regs;
for (i = 0; i < BCM590XX_NUM_REGS; i++, info++) {
......@@ -403,8 +397,6 @@ static int bcm590xx_probe(struct platform_device *pdev)
reg_data = NULL;
/* Register the regulators */
pmu->info[i] = info;
pmu->desc[i].name = info->name;
pmu->desc[i].supply_name = info->vin_name;
pmu->desc[i].id = i;
......
......@@ -102,7 +102,7 @@ static int _regulator_disable(struct regulator_dev *rdev);
static int _regulator_get_voltage(struct regulator_dev *rdev);
static int _regulator_get_current_limit(struct regulator_dev *rdev);
static unsigned int _regulator_get_mode(struct regulator_dev *rdev);
static void _notifier_call_chain(struct regulator_dev *rdev,
static int _notifier_call_chain(struct regulator_dev *rdev,
unsigned long event, void *data);
static int _regulator_do_set_voltage(struct regulator_dev *rdev,
int min_uV, int max_uV);
......@@ -839,7 +839,7 @@ static void print_constraints(struct regulator_dev *rdev)
static int machine_constraints_voltage(struct regulator_dev *rdev,
struct regulation_constraints *constraints)
{
struct regulator_ops *ops = rdev->desc->ops;
const struct regulator_ops *ops = rdev->desc->ops;
int ret;
/* do we need to apply the constraint voltage */
......@@ -938,7 +938,7 @@ static int machine_constraints_voltage(struct regulator_dev *rdev,
static int machine_constraints_current(struct regulator_dev *rdev,
struct regulation_constraints *constraints)
{
struct regulator_ops *ops = rdev->desc->ops;
const struct regulator_ops *ops = rdev->desc->ops;
int ret;
if (!constraints->min_uA && !constraints->max_uA)
......@@ -982,7 +982,7 @@ static int set_machine_constraints(struct regulator_dev *rdev,
const struct regulation_constraints *constraints)
{
int ret = 0;
struct regulator_ops *ops = rdev->desc->ops;
const struct regulator_ops *ops = rdev->desc->ops;
if (constraints)
rdev->constraints = kmemdup(constraints, sizeof(*constraints),
......@@ -1759,6 +1759,45 @@ static int regulator_ena_gpio_ctrl(struct regulator_dev *rdev, bool enable)
return 0;
}
/**
* _regulator_enable_delay - a delay helper function
* @delay: time to delay in microseconds
*
* Delay for the requested amount of time as per the guidelines in:
*
* Documentation/timers/timers-howto.txt
*
* The assumption here is that regulators will never be enabled in
* atomic context and therefore sleeping functions can be used.