Skip to content

Commit

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

Pull regulator updates from Mark Brown:
 "Quite a lot going on with the regulator API for this release, much
  more in the core than in the drivers for a change:

   - Fixes for voltage change propagation through dumb power switches.

   - A notification when regulators are enabled.

   - A new settling time property for regulators where the time taken to
     move to a new voltage is not related to the size of the change.

   - Some reorganization of the Arizona drivers in preparation for
     sharing the code with the next generation devices they've been
     integrated with.

   - Support for newer Freescale chips in the Anatop regulator.

   - A new driver for voltage controlled regulators to cope with some
     exciting ChromeOS hardware designs.

   - Support for Rohm BD9571MWV-M and TI TPS65132"

* tag 'regulator-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (51 commits)
  regulator: Add ROHM BD9571MWV-M PMIC regulator driver
  regulator: arizona-ldo1: Factor out generic initialization
  regulator: arizona-ldo1: Make arizona_ldo1 independent of struct arizona
  regulator: arizona-ldo1: Move pdata into a separate structure
  regulator: arizona-micsupp: Factor out generic initialization
  regulator: arizona-micsupp: Make arizona_micsupp independent of struct arizona
  regulator: arizona-micsupp: Move pdata into a separate structure
  regulator: arizona: Split KConfig options for LDO1 and MICSUPP regulators
  regulator: anatop: make regulator name property required
  regulator: tps65023: Fix inverted core enable logic.
  regulator: anatop: make sure regulator name is properly defined
  regulator: core: Allow dummy regulators for supplies
  regulator: core: Only propagate voltage changes to if it can change voltages
  regulator: vctrl: Fix out of bounds array access for vctrl->vtable
  regulator: tps65132: fix platform_no_drv_owner.cocci warnings
  regulator: tps65132: Fix off-by-one for .max_register setting
  regulator: anatop: set default voltage selector for pcie
  regulator: tps65132: add device-tree binding
  regulator: tps65132: add regulator driver for TI TPS65132
  regulator: anatop: remove unneeded name field of struct anatop_regulator
  ...
  • Loading branch information
torvalds committed May 3, 2017
2 parents 14b7307 + ae53b5d commit a90f0e9
Show file tree
Hide file tree
Showing 42 changed files with 1,626 additions and 175 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Anatop Voltage regulators

Required properties:
- compatible: Must be "fsl,anatop-regulator"
- regulator-name: A string used as a descriptive name for regulator outputs
- anatop-reg-offset: Anatop MFD register offset
- anatop-vol-bit-shift: Bit shift for the register
- anatop-vol-bit-width: Number of bits used in the register
Expand Down
78 changes: 76 additions & 2 deletions Documentation/devicetree/bindings/regulator/lm363x-regulator.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Required property:

Optional properties:
LM3632 has external enable pins for two LDOs.
- ti,lcm-en1-gpio: A GPIO specifier for Vpos control pin.
- ti,lcm-en2-gpio: A GPIO specifier for Vneg control pin.
- enable-gpios: Two GPIO specifiers for Vpos and Vneg control pins.
The first entry is Vpos, the second is Vneg enable pin.

Child nodes:
LM3631
Expand All @@ -30,5 +30,79 @@ Child nodes:

Examples: Please refer to ti-lmu dt-bindings [2].

lm3631@29 {
compatible = "ti,lm3631";
reg = <0x29>;

regulators {
compatible = "ti,lm363x-regulator";

vboost {
regulator-name = "lcd_boost";
regulator-min-microvolt = <4500000>;
regulator-max-microvolt = <6350000>;
regulator-always-on;
};

vcont {
regulator-name = "lcd_vcont";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
};

voref {
regulator-name = "lcd_voref";
regulator-min-microvolt = <4000000>;
regulator-max-microvolt = <6000000>;
};

vpos {
regulator-name = "lcd_vpos";
regulator-min-microvolt = <4000000>;
regulator-max-microvolt = <6000000>;
regulator-boot-on;
};

vneg {
regulator-name = "lcd_vneg";
regulator-min-microvolt = <4000000>;
regulator-max-microvolt = <6000000>;
regulator-boot-on;
};
};
};

lm3632@11 {
compatible = "ti,lm3632";
reg = <0x11>;

regulators {
compatible = "ti,lm363x-regulator";

/* GPIO1_16 for Vpos, GPIO1_28 is for Vneg */
enable-gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>,
<&gpio1 28 GPIO_ACTIVE_HIGH>;

vboost {
regulator-name = "lcd_boost";
regulator-min-microvolt = <4500000>;
regulator-max-microvolt = <6400000>;
regulator-always-on;
};

vpos {
regulator-name = "lcd_vpos";
regulator-min-microvolt = <4000000>;
regulator-max-microvolt = <6000000>;
};

vneg {
regulator-name = "lcd_vneg";
regulator-min-microvolt = <4000000>;
regulator-max-microvolt = <6000000>;
};
};
};

[1] ../regulator/regulator.txt
[2] ../mfd/ti-lmu.txt
8 changes: 7 additions & 1 deletion Documentation/devicetree/bindings/regulator/pfuze100.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Required child node:
--PFUZE100
sw1ab,sw1c,sw2,sw3a,sw3b,sw4,swbst,vsnvs,vrefddr,vgen1~vgen6
--PFUZE200
sw1ab,sw2,sw3a,sw3b,swbst,vsnvs,vrefddr,vgen1~vgen6
sw1ab,sw2,sw3a,sw3b,swbst,vsnvs,vrefddr,vgen1~vgen6,coin
--PFUZE3000
sw1a,sw1b,sw2,sw3,swbst,vsnvs,vrefddr,vldo1,vldo2,vccsd,v33,vldo3,vldo4

Expand Down Expand Up @@ -205,6 +205,12 @@ Example 2: PFUZE200
regulator-max-microvolt = <3300000>;
regulator-always-on;
};

coin_reg: coin {
regulator-min-microvolt = <2500000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
};
};
};

Expand Down
3 changes: 3 additions & 0 deletions Documentation/devicetree/bindings/regulator/regulator.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ Optional properties:
design requires. This property describes the total system ramp time
required due to the combination of internal ramping of the regulator itself,
and board design issues such as trace capacitance and load on the supply.
- regulator-settling-time-us: Settling time, in microseconds, for voltage
change if regulator have the constant time for any level voltage change.
This is useful when regulator have exponential voltage change.
- regulator-soft-start: Enable soft start so that voltage ramps slowly
- regulator-state-mem sub-root node for Suspend-to-RAM mode
: suspend to memory, the device goes to sleep, but all data stored in memory,
Expand Down
46 changes: 46 additions & 0 deletions Documentation/devicetree/bindings/regulator/tps65132-regulator.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
TPS65132 regulators

Required properties:
- compatible: "ti,tps65132"
- reg: I2C slave address

Optional Subnode:
Device supports two regulators OUTP and OUTN. A sub node within the
device node describe the properties of these regulators. The sub-node
names must be as follows:
-For regulator outp, the sub node name should be "outp".
-For regulator outn, the sub node name should be "outn".

-enable-gpios:(active high, output) Regulators are controlled by the input pins.
If it is connected to GPIO through host system then provide the
gpio number as per gpio.txt.
-active-discharge-gpios: (active high, output) Some configurations use delay mechanisms
on the enable pin, to keep the regulator enabled for some time after
the enable signal goes low. This GPIO is used to actively discharge
the delay mechanism. Requires specification of ti,active-discharge-time-us
-ti,active-discharge-time-us: how long the active discharge gpio should be
asserted for during active discharge, in microseconds.

Each regulator is defined using the standard binding for regulators.

Example:

tps65132@3e {
compatible = "ti,tps65132";
reg = <0x3e>;

outp {
regulator-name = "outp";
regulator-boot-on;
regulator-always-on;
enable-gpios = <&gpio 23 0>;
};

outn {
regulator-name = "outn";
regulator-boot-on;
regulator-always-on;
regulator-active-discharge = <0>;
enable-gpios = <&gpio 40 0>;
};
};
49 changes: 49 additions & 0 deletions Documentation/devicetree/bindings/regulator/vctrl.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Bindings for Voltage controlled regulators
==========================================

Required properties:
--------------------
- compatible : must be "vctrl-regulator".
- regulator-min-microvolt : smallest voltage consumers may set
- regulator-max-microvolt : largest voltage consumers may set
- ctrl-supply : The regulator supplying the control voltage.
- ctrl-voltage-range : an array of two integer values describing the range
(min/max) of the control voltage. The values specify
the control voltage needed to generate the corresponding
regulator-min/max-microvolt output voltage.

Optional properties:
--------------------
- ovp-threshold-percent : overvoltage protection (OVP) threshold of the
regulator in percent. Some regulators have an OVP
circuitry which shuts down the regulator when the
actual output voltage deviates beyond a certain
margin from the expected value for a given control
voltage. On larger voltage decreases this can occur
undesiredly since the output voltage does not adjust
inmediately to changes in the control voltage. To
avoid this situation the vctrl driver breaks down
larger voltage decreases into multiple steps, where
each step is within the OVP threshold.
- min-slew-down-rate : Describes how slowly the regulator voltage will decay
down in the worst case (lightest expected load).
Specified in uV / us (like main regulator ramp rate).
This value is required when ovp-threshold-percent is
specified.

Example:

vctrl-reg {
compatible = "vctrl-regulator";
regulator-name = "vctrl_reg";

ctrl-supply = <&ctrl_reg>;

regulator-min-microvolt = <800000>;
regulator-max-microvolt = <1500000>;

ctrl-voltage-range = <200000 500000>;

min-slew-down-rate = <225>;
ovp-threshold-percent = <16>;
};
2 changes: 2 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -13756,12 +13756,14 @@ F: drivers/mfd/cs47l24*
F: drivers/power/supply/wm83*.c
F: drivers/rtc/rtc-wm83*.c
F: drivers/regulator/wm8*.c
F: drivers/regulator/arizona*
F: drivers/video/backlight/wm83*_bl.c
F: drivers/watchdog/wm83*_wdt.c
F: include/linux/mfd/arizona/
F: include/linux/mfd/wm831x/
F: include/linux/mfd/wm8350/
F: include/linux/mfd/wm8400*
F: include/linux/regulator/arizona*
F: include/linux/wm97xx.h
F: include/sound/wm????.h
F: sound/soc/codecs/arizona.?
Expand Down
8 changes: 6 additions & 2 deletions arch/arm/mach-s3c64xx/mach-crag6410-module.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,9 @@ static const struct i2c_board_info wm1277_devs[] = {
};

static struct arizona_pdata wm5102_reva_pdata = {
.ldoena = S3C64XX_GPN(7),
.ldo1 = {
.ldoena = S3C64XX_GPN(7),
},
.gpio_base = CODEC_GPIO_BASE,
.irq_flags = IRQF_TRIGGER_HIGH,
.micd_pol_gpio = CODEC_GPIO_BASE + 4,
Expand Down Expand Up @@ -239,7 +241,9 @@ static struct spi_board_info wm5102_reva_spi_devs[] = {
};

static struct arizona_pdata wm5102_pdata = {
.ldoena = S3C64XX_GPN(7),
.ldo1 = {
.ldoena = S3C64XX_GPN(7),
},
.gpio_base = CODEC_GPIO_BASE,
.irq_flags = IRQF_TRIGGER_HIGH,
.micd_pol_gpio = CODEC_GPIO_BASE + 2,
Expand Down
40 changes: 37 additions & 3 deletions drivers/regulator/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,20 @@ config REGULATOR_AB8500
This driver supports the regulators found on the ST-Ericsson mixed
signal AB8500 PMIC

config REGULATOR_ARIZONA
tristate "Wolfson Arizona class devices"
config REGULATOR_ARIZONA_LDO1
tristate "Wolfson Arizona class devices LDO1"
depends on MFD_ARIZONA
depends on SND_SOC
help
Support for the regulators found on Wolfson Arizona class
Support for the LDO1 regulators found on Wolfson Arizona class
devices.

config REGULATOR_ARIZONA_MICSUPP
tristate "Wolfson Arizona class devices MICSUPP"
depends on MFD_ARIZONA
depends on SND_SOC
help
Support for the MICSUPP regulators found on Wolfson Arizona class
devices.

config REGULATOR_AS3711
Expand Down Expand Up @@ -163,6 +171,17 @@ config REGULATOR_BCM590XX
BCM590xx PMUs. This will enable support for the software
controllable LDO/Switching regulators.

config REGULATOR_BD9571MWV
tristate "ROHM BD9571MWV Regulators"
depends on MFD_BD9571MWV
help
This driver provides support for the voltage regulators on the
ROHM BD9571MWV PMIC. This will enable support for the software
controllable regulator and voltage sampling units.

This driver can also be built as a module. If so, the module
will be called bd9571mwv-regulator.

config REGULATOR_CPCAP
tristate "Motorola CPCAP regulator"
depends on MFD_CPCAP
Expand Down Expand Up @@ -788,6 +807,14 @@ config REGULATOR_TPS65090
This driver provides support for the voltage regulators on the
TI TPS65090 PMIC.

config REGULATOR_TPS65132
tristate "TI TPS65132 Dual Output Power regulators"
depends on I2C && GPIOLIB
select REGMAP_I2C
help
This driver supports TPS65132 single inductor - dual output
power supply specifcally designed for display panels.

config REGULATOR_TPS65217
tristate "TI TPS65217 Power regulators"
depends on MFD_TPS65217
Expand Down Expand Up @@ -850,6 +877,13 @@ config REGULATOR_TWL4030
This driver supports the voltage regulators provided by
this family of companion chips.

config REGULATOR_VCTRL
tristate "Voltage controlled regulators"
depends on OF
help
This driver provides support for voltage regulators whose output
voltage is controlled by the voltage of another regulator.

config REGULATOR_VEXPRESS
tristate "Versatile Express regulators"
depends on VEXPRESS_CONFIG
Expand Down
6 changes: 5 additions & 1 deletion drivers/regulator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ obj-$(CONFIG_REGULATOR_ACT8865) += act8865-regulator.o
obj-$(CONFIG_REGULATOR_ACT8945A) += act8945a-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_ARIZONA_LDO1) += arizona-ldo1.o
obj-$(CONFIG_REGULATOR_ARIZONA_MICSUPP) += arizona-micsupp.o
obj-$(CONFIG_REGULATOR_AS3711) += as3711-regulator.o
obj-$(CONFIG_REGULATOR_AS3722) += as3722-regulator.o
obj-$(CONFIG_REGULATOR_AXP20X) += axp20x-regulator.o
obj-$(CONFIG_REGULATOR_BCM590XX) += bcm590xx-regulator.o
obj-$(CONFIG_REGULATOR_BD9571MWV) += bd9571mwv-regulator.o
obj-$(CONFIG_REGULATOR_DA903X) += da903x.o
obj-$(CONFIG_REGULATOR_DA9052) += da9052-regulator.o
obj-$(CONFIG_REGULATOR_DA9055) += da9055-regulator.o
Expand Down Expand Up @@ -105,7 +107,9 @@ obj-$(CONFIG_REGULATOR_TPS6586X) += tps6586x-regulator.o
obj-$(CONFIG_REGULATOR_TPS65910) += tps65910-regulator.o
obj-$(CONFIG_REGULATOR_TPS65912) += tps65912-regulator.o
obj-$(CONFIG_REGULATOR_TPS80031) += tps80031-regulator.o
obj-$(CONFIG_REGULATOR_TPS65132) += tps65132-regulator.o
obj-$(CONFIG_REGULATOR_TWL4030) += twl-regulator.o twl6030-regulator.o
obj-$(CONFIG_REGULATOR_VCTRL) += vctrl-regulator.o
obj-$(CONFIG_REGULATOR_VEXPRESS) += vexpress-regulator.o
obj-$(CONFIG_REGULATOR_WM831X) += wm831x-dcdc.o
obj-$(CONFIG_REGULATOR_WM831X) += wm831x-isink.o
Expand Down
Loading

0 comments on commit a90f0e9

Please sign in to comment.