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

Commit 61be53f9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull regulator updates from Mark Brown:
 "In terms of big picture changes this has been an extremely quiet
  release however there's a lot of changes and a fairly big diffstat
  thanks to a bunch of small fixes, mainly coming from Axel Lin. Thanks
  to his work this release removes code overall even though we've added
  a new (albiet fairly small) driver.

  Notable things:

   - A fix for a long standing issue with locking on error interrupts
     from Steve Twiss.

   - A new driver for ST Microelectonics STM32 PWR"

* tag 'regulator-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (134 commits)
  regulator: core: simplify return value on suported_voltage
  regulator: da9xxx: Switch to SPDX identifier
  regulator: stm32-pwr: Remove unneeded .min_uV and .list_volage
  regulator: stm32-pwr: Remove unneeded *desc from struct stm32_pwr_reg
  regulator: ab3100: Set fixed_uV instead of min_uV for fixed regulators
  regulator: ab3100: Constify regulator_ops and ab3100_regulator_desc
  regulator: pv880x0: Switch to SPDX identifier
  regulator: hi6xxx: Switch to SPDX identifier
  regulator: vexpress: Switch to SPDX identifier
  regulator: vexpress: Get rid of struct vexpress_regulator
  regulator: sky81452: Switch to SPDX identifier
  regulator: sky81452: Constify sky81452_reg_ops
  regulator: sy8106a: Get rid of struct sy8106a
  regulator: core: do not report EPROBE_DEFER as error but as debug
  regulator: mt63xx: Switch to SPDX identifier
  regulator: fan53555: Switch to SPDX identifier
  regulator: fan53555: Clean up unneeded fields from struct fan53555_device_info
  regulator: ltc3589: Switch to SPDX identifier
  regulator: ltc3589: Get rid of struct ltc3589_regulator
  regulator: ltc3589: Convert to use simplified DT parsing
  ...
parents 962d5ecc e2a23aff
Loading
Loading
Loading
Loading
+22 −8
Original line number Diff line number Diff line
@@ -4,16 +4,30 @@ Required properties:
- compatible		: Must be "regulator-gpio".
- regulator-name	: Defined in regulator.txt as optional, but required
			  here.
- states		: Selection of available voltages and GPIO configs.
                          if there are no states, then use a fixed regulator
- gpios			: Array of one or more GPIO pins used to select the
			  regulator voltage/current listed in "states".
- states		: Selection of available voltages/currents provided by
			  this regulator and matching GPIO configurations to
			  achieve them. If there are no states in the "states"
			  array, use a fixed regulator instead.

Optional properties:
- enable-gpio		: GPIO to use to enable/disable the regulator.
- gpios			: GPIO group used to control voltage.
- gpios-states		: gpios pin's initial states array. 0: LOW, 1: HIGH.
			  defualt is LOW if nothing is specified.
- enable-gpios		: GPIO used to enable/disable the regulator.
			  Warning, the GPIO phandle flags are ignored and the
			  GPIO polarity is controlled solely by the presence
			  of "enable-active-high" DT property. This is due to
			  compatibility with old DTs.
- enable-active-high	: Polarity of "enable-gpio" GPIO is active HIGH.
			  Default is active LOW.
- gpios-states		: On operating systems, that don't support reading back
			  gpio values in output mode (most notably linux), this
			  array provides the state of GPIO pins set when
			  requesting them from the gpio controller. Systems,
			  that are capable of preserving state when requesting
			  the lines, are free to ignore this property.
			  0: LOW, 1: HIGH. Default is LOW if nothing else
			  is specified.
- startup-delay-us	: Startup time in microseconds.
- enable-active-high	: Polarity of GPIO is active high (default is low).
- regulator-type	: Specifies what is being regulated, must be either
			  "voltage" or "current", defaults to voltage.

@@ -30,7 +44,7 @@ Example:
		regulator-max-microvolt = <2600000>;
		regulator-boot-on;

		enable-gpio = <&gpio0 23 0x4>;
		enable-gpios = <&gpio0 23 0x4>;
		gpios = <&gpio0 24 0x4
			 &gpio0 25 0x4>;
		states = <1800000 0x3
+43 −0
Original line number Diff line number Diff line
STM32MP1 PWR Regulators
-----------------------

Available Regulators in STM32MP1 PWR block are:
  - reg11 for regulator 1V1
  - reg18 for regulator 1V8
  - usb33 for the swtich USB3V3

Required properties:
- compatible: Must be "st,stm32mp1,pwr-reg"
- list of child nodes that specify the regulator reg11, reg18 or usb33
  initialization data for defined regulators. The definition for each of
  these nodes is defined using the standard binding for regulators found at
  Documentation/devicetree/bindings/regulator/regulator.txt.
- vdd-supply: phandle to the parent supply/regulator node for vdd input
- vdd_3v3_usbfs-supply: phandle to the parent supply/regulator node for usb33

Example:

pwr_regulators: pwr@50001000 {
	compatible = "st,stm32mp1,pwr-reg";
	reg = <0x50001000 0x10>;
	vdd-supply = <&vdd>;
	vdd_3v3_usbfs-supply = <&vdd_usb>;

	reg11: reg11 {
		regulator-name = "reg11";
		regulator-min-microvolt = <1100000>;
		regulator-max-microvolt = <1100000>;
	};

	reg18: reg18 {
		regulator-name = "reg18";
		regulator-min-microvolt = <1800000>;
		regulator-max-microvolt = <1800000>;
	};

	usb33: usb33 {
		regulator-name = "usb33";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
	};
};
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@
/* Current settings - values are 2*2^(reg_val/4) microamps.  These are
 * exported since they are used by multiple drivers.
 */
int wm831x_isinkv_values[WM831X_ISINK_MAX_ISEL + 1] = {
const unsigned int wm831x_isinkv_values[WM831X_ISINK_MAX_ISEL + 1] = {
	2,
	2,
	3,
+0 −6
Original line number Diff line number Diff line
@@ -35,12 +35,6 @@ static bool wm8400_volatile(struct device *dev, unsigned int reg)
	}
}

int wm8400_block_read(struct wm8400 *wm8400, u8 reg, int count, u16 *data)
{
	return regmap_bulk_read(wm8400->regmap, reg, data, count);
}
EXPORT_SYMBOL_GPL(wm8400_block_read);

static int wm8400_register_codec(struct wm8400 *wm8400)
{
	const struct mfd_cell cell = {
+1 −17
Original line number Diff line number Diff line
@@ -77,11 +77,6 @@ struct pm800_regulator_info {
	int max_ua;
};

struct pm800_regulators {
	struct pm80x_chip *chip;
	struct regmap *map;
};

/*
 * vreg - the buck regs string.
 * ereg - the string for the enable register.
@@ -235,7 +230,6 @@ static int pm800_regulator_probe(struct platform_device *pdev)
{
	struct pm80x_chip *chip = dev_get_drvdata(pdev->dev.parent);
	struct pm80x_platform_data *pdata = dev_get_platdata(pdev->dev.parent);
	struct pm800_regulators *pm800_data;
	struct regulator_config config = { };
	struct regulator_init_data *init_data;
	int i, ret;
@@ -252,18 +246,8 @@ static int pm800_regulator_probe(struct platform_device *pdev)
			return -EINVAL;
	}

	pm800_data = devm_kzalloc(&pdev->dev, sizeof(*pm800_data),
					GFP_KERNEL);
	if (!pm800_data)
		return -ENOMEM;

	pm800_data->map = chip->subchip->regmap_power;
	pm800_data->chip = chip;

	platform_set_drvdata(pdev, pm800_data);

	config.dev = chip->dev;
	config.regmap = pm800_data->map;
	config.regmap = chip->subchip->regmap_power;
	for (i = 0; i < PM800_ID_RG_MAX; i++) {
		struct regulator_dev *regulator;

Loading