Skip to content

Commit

Permalink
Merge tag 'regulator-v4.9' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/git/broonie/regulator

Pull regulator updates from Mark Brown:
 "This is an extremely quiet release for the regulator API, we've got a
  small set of bug fixes and minor feature enhancements for drivers plus
  a couple of more visible changes:

   - add support for ramp times in regulators that don't use selectors.

   - new driver for LTC3676"

* tag 'regulator-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: dbx500: remove unused functions in dbx500-prcmu.c
  regulator: pv88080: Update regulator for PV88080 BB silicon support
  regulator: core: don't return error with inadequate reason
  regulator: tps65910: Work around silicon erratum SWCZ010
  regulator: core: Add set_voltage_time op
  regulator: core: Don't skip set_voltage_time when ramp delay disabled
  regulator: core: Simplify error flow in _regulator_do_set_voltage()
  regulator: core: Use local ops variable in _regulator_do_set_voltage()
  regulator: hi6421: mark hi6421_regulator_ldo_get_optimum_mode() static
  regulator: Kconfig: Fix typo
  regulator: bindings: Use the correct symbol for second
  regulator: Remove support for optional supplies in the bulk API
  regulator: Add LTC3676 support
  regulator: rk808: Delete owner assignment
  regulator: tps65218: do not disable DCDC3 during poweroff on broken PMICs
  mfd: tps65218: add version check to the PMIC probe
  • Loading branch information
Linus Torvalds committed Oct 4, 2016
2 parents 808c2b0 + 2ed89d5 commit 5a9f228
Show file tree
Hide file tree
Showing 20 changed files with 981 additions and 183 deletions.
94 changes: 94 additions & 0 deletions Documentation/devicetree/bindings/regulator/ltc3676.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
Linear Technology LTC3676 8-output regulators

Required properties:
- compatible: "lltc,ltc3676"
- reg: I2C slave address

Required child node:
- regulators: Contains eight regulator child nodes sw1, sw2, sw3, sw4,
ldo1, ldo2, ldo3, and ldo4, specifying the initialization data as
documented in Documentation/devicetree/bindings/regulator/regulator.txt.

Each regulator is defined using the standard binding for regulators. The
nodes for sw1, sw2, sw3, sw4, ldo1, ldo2 and ldo4 additionally need to specify
the resistor values of their external feedback voltage dividers:

Required properties (not on ldo3):
- lltc,fb-voltage-divider: An array of two integers containing the resistor
values R1 and R2 of the feedback voltage divider in ohms.

Regulators sw1, sw2, sw3, sw4 can regulate the feedback reference from:
412.5mV to 800mV in 12.5 mV steps. The output voltage thus ranges between
0.4125 * (1 + R1/R2) V and 0.8 * (1 + R1/R2) V.

Regulators ldo1, ldo2, and ldo4 have a fixed 0.725 V reference and thus output
0.725 * (1 + R1/R2) V. The ldo3 regulator is fixed to 1.8 V. The ldo1 standby
regulator can not be disabled and thus should have the regulator-always-on
property set.

Example:

ltc3676: pmic@3c {
compatible = "lltc,ltc3676";
reg = <0x3c>;

regulators {
sw1_reg: sw1 {
regulator-min-microvolt = <674400>;
regulator-max-microvolt = <1308000>;
lltc,fb-voltage-divider = <127000 200000>;
regulator-ramp-delay = <7000>;
regulator-boot-on;
regulator-always-on;
};

sw2_reg: sw2 {
regulator-min-microvolt = <1033310>;
regulator-max-microvolt = <200400>;
lltc,fb-voltage-divider = <301000 200000>;
regulator-ramp-delay = <7000>;
regulator-boot-on;
regulator-always-on;
};

sw3_reg: sw3 {
regulator-min-microvolt = <674400>;
regulator-max-microvolt = <130800>;
lltc,fb-voltage-divider = <127000 200000>;
regulator-ramp-delay = <7000>;
regulator-boot-on;
regulator-always-on;
};

sw4_reg: sw4 {
regulator-min-microvolt = <868310>;
regulator-max-microvolt = <168400>;
lltc,fb-voltage-divider = <221000 200000>;
regulator-ramp-delay = <7000>;
regulator-boot-on;
regulator-always-on;
};

ldo2_reg: ldo2 {
regulator-min-microvolt = <2490375>;
regulator-max-microvolt = <2490375>;
lltc,fb-voltage-divider = <487000 200000>;
regulator-boot-on;
regulator-always-on;
};

ldo3_reg: ldo3 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-boot-on;
};

ldo4_reg: ldo4 {
regulator-min-microvolt = <3023250>;
regulator-max-microvolt = <3023250>;
lltc,fb-voltage-divider = <634000 200000>;
regulator-boot-on;
regulator-always-on;
};
};
};
23 changes: 18 additions & 5 deletions Documentation/devicetree/bindings/regulator/pv88080.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
* Powerventure Semiconductor PV88080 Voltage Regulator

Required properties:
- compatible: "pvs,pv88080".
- reg: I2C slave address, usually 0x49.
- compatible: Must be one of the following, depending on the
silicon version:
- "pvs,pv88080" (DEPRECATED)

- "pvs,pv88080-aa" for PV88080 AA or AB silicon
- "pvs,pv88080-ba" for PV88080 BA or BB silicon
NOTE: The use of the compatibles with no silicon version is deprecated.
- reg: I2C slave address, usually 0x49
- 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.
BUCK1, BUCK2, and BUCK3.
BUCK1, BUCK2, BUCK3 and HVBUCK.

Optional properties:
- Any optional property defined in regulator.txt

Example
Example:

pmic: pv88080@49 {
compatible = "pvs,pv88080";
compatible = "pvs,pv88080-ba";
reg = <0x49>;
interrupt-parent = <&gpio>;
interrupts = <24 24>;
Expand Down Expand Up @@ -45,5 +51,12 @@ Example
regulator-min-microamp = <1496000>;
regulator-max-microamp = <4189000>;
};

HVBUCK {
regulator-name = "hvbuck";
regulator-min-microvolt = < 5000>;
regulator-max-microvolt = <1275000>;
};
};
};

2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/regulator/regulator.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Optional properties:
- regulator-allow-bypass: allow the regulator to go into bypass mode
- regulator-allow-set-load: allow the regulator performance level to be configured
- <name>-supply: phandle to the parent supply/regulator node
- regulator-ramp-delay: ramp delay for regulator(in uV/uS)
- regulator-ramp-delay: ramp delay for regulator(in uV/us)
For hardware which supports disabling ramp rate, it should be explicitly
initialised to zero (regulator-ramp-delay = <0>) for disabling ramp delay.
- regulator-enable-ramp-delay: The time taken, in microseconds, for the supply
Expand Down
9 changes: 9 additions & 0 deletions drivers/mfd/tps65218.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ static int tps65218_probe(struct i2c_client *client,
struct tps65218 *tps;
const struct of_device_id *match;
int ret;
unsigned int chipid;

match = of_match_device(of_tps65218_match_table, &client->dev);
if (!match) {
Expand Down Expand Up @@ -250,6 +251,14 @@ static int tps65218_probe(struct i2c_client *client,
if (ret < 0)
return ret;

ret = tps65218_reg_read(tps, TPS65218_REG_CHIPID, &chipid);
if (ret) {
dev_err(tps->dev, "Failed to read chipid: %d\n", ret);
return ret;
}

tps->rev = chipid & TPS65218_CHIPID_REV_MASK;

ret = of_platform_populate(client->dev.of_node, NULL, NULL,
&client->dev);
if (ret < 0)
Expand Down
10 changes: 9 additions & 1 deletion drivers/regulator/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,14 @@ config REGULATOR_LTC3589
This enables support for the LTC3589, LTC3589-1, and LTC3589-2
8-output regulators controlled via I2C.

config REGULATOR_LTC3676
tristate "LTC3676 8-output voltage regulator"
depends on I2C
select REGMAP_I2C
help
This enables support for the LTC3676
8-output regulators controlled via I2C.

config REGULATOR_MAX14577
tristate "Maxim 14577/77836 regulator"
depends on MFD_MAX14577
Expand Down Expand Up @@ -820,7 +828,7 @@ config REGULATOR_TPS65912
This driver supports TPS65912 voltage regulator chip.

config REGULATOR_TPS80031
tristate "TI TPS80031/TPS80032 power regualtor driver"
tristate "TI TPS80031/TPS80032 power regulator driver"
depends on MFD_TPS80031
help
TPS80031/ TPS80032 Fully Integrated Power Management with Power
Expand Down
1 change: 1 addition & 0 deletions drivers/regulator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ obj-$(CONFIG_REGULATOR_LP8788) += lp8788-buck.o
obj-$(CONFIG_REGULATOR_LP8788) += lp8788-ldo.o
obj-$(CONFIG_REGULATOR_LP8755) += lp8755.o
obj-$(CONFIG_REGULATOR_LTC3589) += ltc3589.o
obj-$(CONFIG_REGULATOR_LTC3676) += ltc3676.o
obj-$(CONFIG_REGULATOR_MAX14577) += max14577-regulator.o
obj-$(CONFIG_REGULATOR_MAX1586) += max1586.o
obj-$(CONFIG_REGULATOR_MAX77620) += max77620-regulator.o
Expand Down
Loading

0 comments on commit 5a9f228

Please sign in to comment.