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

Commit 56e3d92d authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branches 'regulator/topic/gpio',...

Merge remote-tracking branches 'regulator/topic/gpio', 'regulator/topic/lp873x', 'regulator/topic/max77620', 'regulator/topic/pwm' and 'regulator/topic/tps6507x' into regulator-next
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -7,6 +7,9 @@ Required properties:
  - #gpio-cells:	Should be two.  The first cell is the pin number and
  - #gpio-cells:	Should be two.  The first cell is the pin number and
			the second cell is used to specify flags.
			the second cell is used to specify flags.
			See ../gpio/gpio.txt for more information.
			See ../gpio/gpio.txt for more information.
  - xxx-in-supply:	Phandle to parent supply node of each regulator
			populated under regulators node. xxx can be
			buck0, buck1, ldo0 or ldo1.
  - regulators:	List of child nodes that specify the regulator
  - regulators:	List of child nodes that specify the regulator
			initialization data.
			initialization data.
Example:
Example:
@@ -17,6 +20,11 @@ pmic: lp8733@60 {
	gpio-controller;
	gpio-controller;
	#gpio-cells = <2>;
	#gpio-cells = <2>;


	buck0-in-supply = <&vsys_3v3>;
	buck1-in-supply = <&vsys_3v3>;
	ldo0-in-supply = <&vsys_3v3>;
	ldo1-in-supply = <&vsys_3v3>;

	regulators {
	regulators {
		lp8733_buck0: buck0 {
		lp8733_buck0: buck0 {
			regulator-name = "lp8733-buck0";
			regulator-name = "lp8733-buck0";
+12 −0
Original line number Original line Diff line number Diff line
@@ -106,6 +106,18 @@ Here supported time periods by device in microseconds are as follows:
MAX77620 supports 40, 80, 160, 320, 640, 1280, 2560 and 5120 microseconds.
MAX77620 supports 40, 80, 160, 320, 640, 1280, 2560 and 5120 microseconds.
MAX20024 supports 20, 40, 80, 160, 320, 640, 1280 and 2540 microseconds.
MAX20024 supports 20, 40, 80, 160, 320, 640, 1280 and 2540 microseconds.


-maxim,power-ok-control: configure map power ok bit
			1: Enables POK(Power OK) to control nRST_IO and GPIO1
			POK function.
			0: Disables POK control.
			if property missing, do not configure MPOK bit.
			If POK mapping is enabled for GPIO1/nRST_IO then,
			GPIO1/nRST_IO pins are HIGH only if all rails
			that have POK control enabled are HIGH.
			If any of the rails goes down(which are enabled for POK
			control) then, GPIO1/nRST_IO goes LOW.
			this property is valid for max20024 only.

For DT binding details of different sub modules like GPIO, pincontrol,
For DT binding details of different sub modules like GPIO, pincontrol,
regulator, power, please refer respective device-tree binding document
regulator, power, please refer respective device-tree binding document
under their respective sub-system directories.
under their respective sub-system directories.
+2 −2
Original line number Original line Diff line number Diff line
@@ -59,7 +59,7 @@ Any property defined as part of the core regulator binding can also be used.


Continuous Voltage With Enable GPIO Example:
Continuous Voltage With Enable GPIO Example:
	pwm_regulator {
	pwm_regulator {
		compatible = "pwm-regulator;
		compatible = "pwm-regulator";
		pwms = <&pwm1 0 8448 0>;
		pwms = <&pwm1 0 8448 0>;
		enable-gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
		enable-gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
		regulator-min-microvolt = <1016000>;
		regulator-min-microvolt = <1016000>;
@@ -76,7 +76,7 @@ Continuous Voltage With Enable GPIO Example:


Voltage Table Example:
Voltage Table Example:
	pwm_regulator {
	pwm_regulator {
		compatible = "pwm-regulator;
		compatible = "pwm-regulator";
		pwms = <&pwm1 0 8448 0>;
		pwms = <&pwm1 0 8448 0>;
		regulator-min-microvolt = <1016000>;
		regulator-min-microvolt = <1016000>;
		regulator-max-microvolt = <1114000>;
		regulator-max-microvolt = <1114000>;
+6 −3
Original line number Original line Diff line number Diff line
@@ -162,8 +162,8 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np,
	of_property_read_u32(np, "startup-delay-us", &config->startup_delay);
	of_property_read_u32(np, "startup-delay-us", &config->startup_delay);


	config->enable_gpio = of_get_named_gpio(np, "enable-gpio", 0);
	config->enable_gpio = of_get_named_gpio(np, "enable-gpio", 0);
	if (config->enable_gpio == -EPROBE_DEFER)
	if (config->enable_gpio < 0 && config->enable_gpio != -ENOENT)
		return ERR_PTR(-EPROBE_DEFER);
		return ERR_PTR(config->enable_gpio);


	/* Fetch GPIOs. - optional property*/
	/* Fetch GPIOs. - optional property*/
	ret = of_gpio_count(np);
	ret = of_gpio_count(np);
@@ -190,8 +190,11 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np,


		for (i = 0; i < config->nr_gpios; i++) {
		for (i = 0; i < config->nr_gpios; i++) {
			gpio = of_get_named_gpio(np, "gpios", i);
			gpio = of_get_named_gpio(np, "gpios", i);
			if (gpio < 0)
			if (gpio < 0) {
				if (gpio != -ENOENT)
					return ERR_PTR(gpio);
				break;
				break;
			}
			config->gpios[i].gpio = gpio;
			config->gpios[i].gpio = gpio;
			if (proplen > 0) {
			if (proplen > 0) {
				of_property_read_u32_index(np, "gpios-states",
				of_property_read_u32_index(np, "gpios-states",
+1 −0
Original line number Original line Diff line number Diff line
@@ -24,6 +24,7 @@
	[_id] = {							\
	[_id] = {							\
		.desc = {						\
		.desc = {						\
			.name			= _name,		\
			.name			= _name,		\
			.supply_name		= _of "-in",		\
			.id			= _id,			\
			.id			= _id,			\
			.of_match		= of_match_ptr(_of),	\
			.of_match		= of_match_ptr(_of),	\
			.regulators_node	= of_match_ptr("regulators"),\
			.regulators_node	= of_match_ptr("regulators"),\
Loading