Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7fe0bf90 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull regulator updates from Mark Brown:
 "Another fairly quiet release, some new drivers with generic handling
  for minor features but nothing that makes a substantial difference
  outside of the subsystem or for most boards:

   - support for a bunch of new parameters which are present on enough
     regulators to be worth having generic handling for in the
     framework.

   - fixes for some issues with printing constraints during boot which
     should probably have gone in for v4.1 but didn't.

   - new drivers for Dialog DA9062, Maxim MAX77621 and Qualcomm SPMI
     regulators"

* tag 'regulator-v4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (45 commits)
  regulator: qcom_spmi: Fix calculating number of voltages
  regulator: qcom_spmi: Add missing braces for aligned code
  regulator: fix simple_return.cocci warnings
  regulator: Add QCOM SPMI regulator driver
  regulator: Add docbook for soft start
  regulator: Add input current limit support
  regulator: Add soft start support
  regulator: Add pull down support
  regulator: Add system_load constraint
  regulator: max8973: Fix up ramp_delay for MAX8973_RAMP_25mV_PER_US case
  regulator: core: replace sprintf with scnprintf
  regulator: core: fix constraints output buffer
  regulator: core: Don't corrupt display when printing uV offsets
  regulator: max8973: add support for MAX77621
  regulator: max8973: configure ramp delay through callback
  regulator: pwm-regulator: Diffientiate between dev (device) and rdev (regulator_dev)
  regulator: pwm-regulator: Remove superfluous is_enabled check
  regulator: pwm-regulator: Remove unnecessary descriptor attribute from ddata
  regulator: core: Don't spew backtraces on duplicate sysfs
  regulator: da9063: Fix up irq leak
  ...
parents 5a602e15 733ada00
Loading
Loading
Loading
Loading
+19 −1
Original line number Diff line number Diff line
@@ -2,12 +2,30 @@

Required properties:

- compatible:	must be "maxim,max8973"
- compatible:	must be one of following:
			"maxim,max8973"
			"maxim,max77621".
- reg:		the i2c slave address of the regulator. It should be 0x1b.

Any standard regulator properties can be used to configure the single max8973
DCDC.

Optional properties:

-maxim,externally-enable: boolean, externally control the regulator output
		enable/disable.
-maxim,enable-gpio: GPIO for enable control. If the valid GPIO is provided
		then externally enable control will be considered.
-maxim,dvs-gpio: GPIO which is connected to DVS pin of device.
-maxim,dvs-default-state: Default state of GPIO during initialisation.
		1 for HIGH and 0 for LOW.
-maxim,enable-remote-sense: boolean, enable reote sense.
-maxim,enable-falling-slew-rate: boolean, enable falling slew rate.
-maxim,enable-active-discharge: boolean: enable active discharge.
-maxim,enable-frequency-shift: boolean, enable 9% frequency shift.
-maxim,enable-bias-control: boolean, enable bias control. By enabling this
		startup delay can be reduce to 20us from 220us.

Example:

	max8973@1b {
+121 −0
Original line number Diff line number Diff line
Qualcomm SPMI Regulators

- compatible:
	Usage: required
	Value type: <string>
	Definition: must be one of:
			"qcom,pm8841-regulators"
			"qcom,pm8916-regulators"
			"qcom,pm8941-regulators"

- interrupts:
	Usage: optional
	Value type: <prop-encoded-array>
	Definition: List of OCP interrupts.

- interrupt-names:
	Usage: required if 'interrupts' property present
	Value type: <string-array>
	Definition: List of strings defining the names of the
		    interrupts in the 'interrupts' property 1-to-1.
		    Supported values are "ocp-<regulator_name>", where
		    <regulator_name> corresponds to a voltage switch
		    type regulator.

- vdd_s1-supply:
- vdd_s2-supply:
- vdd_s3-supply:
- vdd_s4-supply:
- vdd_s5-supply:
- vdd_s6-supply:
- vdd_s7-supply:
- vdd_s8-supply:
	Usage: optional (pm8841 only)
	Value type: <phandle>
	Definition: Reference to regulator supplying the input pin, as
		    described in the data sheet.

- vdd_s1-supply:
- vdd_s2-supply:
- vdd_s3-supply:
- vdd_s4-supply:
- vdd_l1_l3-supply:
- vdd_l2-supply:
- vdd_l4_l5_l6-supply:
- vdd_l7-supply:
- vdd_l8_l11_l14_l15_l16-supply:
- vdd_l9_l10_l12_l13_l17_l18-supply:
	Usage: optional (pm8916 only)
	Value type: <phandle>
	Definition: Reference to regulator supplying the input pin, as
		    described in the data sheet.

- vdd_s1-supply:
- vdd_s2-supply:
- vdd_s3-supply:
- vdd_l1_l3-supply:
- vdd_l2_lvs_1_2_3-supply:
- vdd_l4_l11-supply:
- vdd_l5_l7-supply:
- vdd_l6_l12_l14_l15-supply:
- vdd_l8_l16_l18_19-supply:
- vdd_l9_l10_l17_l22-supply:
- vdd_l13_l20_l23_l24-supply:
- vdd_l21-supply:
- vin_5vs-supply:
	Usage: optional (pm8941 only)
	Value type: <phandle>
	Definition: Reference to regulator supplying the input pin, as
		    described in the data sheet.


The regulator node houses sub-nodes for each regulator within the device. Each
sub-node is identified using the node's name, with valid values listed for each
of the PMICs below.

pm8841:
	s1, s2, s3, s4, s5, s6, s7, s8

pm8916:
	s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13,
	l14, l15, l16, l17, l18

pm8941:
	s1, s2, s3, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14,
	l15, l16, l17, l18, l19, l20, l21, l22, l23, l24, lvs1, lvs2, lvs3,
	mvs1, mvs2

The content of each sub-node is defined by the standard binding for regulators -
see regulator.txt - with additional custom properties described below:

- regulator-initial-mode:
	Usage: optional
	Value type: <u32>
	Descrption: 1 = Set initial mode to high power mode (HPM), also referred
		    to as NPM.  HPM consumes more ground current than LPM, but
		    it can source significantly higher load current. HPM is not
		    available on boost type regulators. For voltage switch type
		    regulators, HPM implies that over current protection and
		    soft start are active all the time. 0 = Set initial mode to
		    low power mode (LPM).

Example:

	regulators {
		compatible = "qcom,pm8941-regulators";
		vdd_l1_l3-supply = <&s1>;

		s1: s1 {
			regulator-min-microvolt = <1300000>;
			regulator-max-microvolt = <1400000>;
		};

		...

		l1: l1 {
			regulator-min-microvolt = <1225000>;
			regulator-max-microvolt = <1300000>;
		};

		....
	};
+6 −1
Original line number Diff line number Diff line
@@ -7,18 +7,20 @@ Optional properties:
- regulator-microvolt-offset: Offset applied to voltages to compensate for voltage drops
- regulator-min-microamp: smallest current consumers may set
- regulator-max-microamp: largest current consumers may set
- regulator-input-current-limit-microamp: maximum input current regulator allows
- regulator-always-on: boolean, regulator should never be disabled
- regulator-boot-on: bootloader/firmware enabled regulator
- regulator-allow-bypass: allow the regulator to go into bypass mode
- <name>-supply: phandle to the parent supply/regulator node
- regulator-ramp-delay: ramp delay for regulator(in uV/uS)
  For hardware which supports disabling ramp rate, it should be explicitly
  intialised to zero (regulator-ramp-delay = <0>) for disabling ramp delay.
  initialised to zero (regulator-ramp-delay = <0>) for disabling ramp delay.
- regulator-enable-ramp-delay: The time taken, in microseconds, for the supply
  rail to reach the target voltage, plus/minus whatever tolerance the board
  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-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,
  only some external interrupt can wake the device.
@@ -37,6 +39,9 @@ Optional properties:
- regulator-initial-mode: initial operating mode. The set of possible operating
  modes depends on the capabilities of every hardware so each device binding
  documentation explains which values the regulator supports.
- regulator-system-load: Load in uA present on regulator that is not captured by
  any consumer request.
- regulator-pull-down: Enable pull down resistor when the regulator is disabled.

Deprecated properties:
- regulator-compatible: If a regulator chip contains multiple
+1 −1
Original line number Diff line number Diff line
@@ -404,7 +404,7 @@ static int pm8607_regulator_probe(struct platform_device *pdev)
	return 0;
}

static struct platform_device_id pm8607_regulator_driver_ids[] = {
static const struct platform_device_id pm8607_regulator_driver_ids[] = {
	{
		.name	= "88pm860x-regulator",
		.driver_data	= 0,
+22 −1
Original line number Diff line number Diff line
@@ -178,6 +178,16 @@ config REGULATOR_DA9055
	  This driver can also be built as a module. If so, the module
	  will be called da9055-regulator.

config REGULATOR_DA9062
	tristate "Dialog Semiconductor DA9062 regulators"
	depends on MFD_DA9062
	help
	  Say y here to support the BUCKs and LDOs regulators found on
	  DA9062 PMICs.

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

config REGULATOR_DA9063
	tristate "Dialog Semiconductor DA9063 regulators"
	depends on MFD_DA9063
@@ -233,7 +243,7 @@ config REGULATOR_FAN53555

config REGULATOR_GPIO
	tristate "GPIO regulator support"
	depends on GPIOLIB
	depends on GPIOLIB || COMPILE_TEST
	help
	  This driver provides support for regulators that can be
	  controlled via gpios.
@@ -512,6 +522,17 @@ config REGULATOR_QCOM_RPM
	  Qualcomm RPM as a module. The module will be named
	  "qcom_rpm-regulator".

config REGULATOR_QCOM_SPMI
	tristate "Qualcomm SPMI regulator driver"
	depends on SPMI || COMPILE_TEST
	help
	  If you say yes to this option, support will be included for the
	  regulators found in Qualcomm SPMI PMICs.

	  Say M here if you want to include support for the regulators on the
	  Qualcomm SPMI PMICs as a module. The module will be named
	  "qcom_spmi-regulator".

config REGULATOR_RC5T583
	tristate "RICOH RC5T583 Power regulators"
	depends on MFD_RC5T583
Loading