Commit d6d50a8f authored by Mark Brown's avatar Mark Brown

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

Merge remote-tracking branches 'regulator/topic/ltc3589', 'regulator/topic/max77620', 'regulator/topic/max77686', 'regulator/topic/max77802' and 'regulator/topic/maxim' into regulator-next
Regulator DT binding for MAX77620 Power management IC from Maxim Semiconductor.
Device has multiple DCDC(sd[0-3] and LDOs(ldo[0-8]). The input supply
of these regulators are defined under parent device node.
Details of regulator properties are defined as child node under
sub-node "regulators" which is child node of device node.
Please refer file <Documentation/devicetree/bindings/regulator/regulator.txt>
for common regulator bindings used by client.
Following are properties of parent node related to regulators.
Optional properties:
-------------------
The input supply of regulators are the optional properties on the
parent device node. The input supply of these regulators are provided
through following properties:
in-sd0-supply: Input supply for SD0, INA-SD0 or INB-SD0 pins.
in-sd1-supply: Input supply for SD1.
in-sd2-supply: Input supply for SD2.
in-sd3-supply: Input supply for SD3.
in-ldo0-1-supply: Input supply for LDO0 and LDO1.
in-ldo2-supply: Input supply for LDO2.
in-ldo3-5-supply: Input supply for LDO3 and LDO5
in-ldo4-6-supply: Input supply for LDO4 and LDO6.
in-ldo7-8-supply: Input supply for LDO7 and LDO8.
Optional sub nodes for regulators under "regulators" subnode:
------------------------------------------------------------
The subnodes name is the name of regulator and it must be one of:
sd[0-3], ldo[0-8]
Each sub-node should contain the constraints and initialization
information for that regulator. The definition for each of these
nodes is defined using the standard binding for regulators found at
<Documentation/devicetree/bindings/regulator/regulator.txt>.
Theres are also additional properties for SD/LDOs. These additional properties
are required to configure FPS configuration parameters for SDs and LDOs.
Please refer <devicetree/bindings/mfd/max77620.txt> for more detail of Flexible
Power Sequence (FPS).
Following are additional properties:
- maxim,active-fps-source: FPS source for the regulators to get
enabled/disabled when system is in
active state. Valid values are:
- MAX77620_FPS_SRC_0,
FPS source is FPS0.
- MAX77620_FPS_SRC_1,
FPS source is FPS1
- MAX77620_FPS_SRC_2 and
FPS source is FPS2
- MAX77620_FPS_SRC_NONE.
Regulator is not controlled
by FPS events and it gets
enabled/disabled by register
access.
Absence of this property will leave
the FPS configuration register for that
regulator to default configuration.
- maxim,active-fps-power-up-slot: Sequencing event slot number on which
the regulator get enabled when
master FPS input event set to HIGH.
Valid values are 0 to 7.
This is applicable if FPS source is
selected as FPS0, FPS1 or FPS2.
- maxim,active-fps-power-down-slot: Sequencing event slot number on which
the regulator get disabled when master
FPS input event set to LOW.
Valid values are 0 to 7.
This is applicable if FPS source is
selected as FPS0, FPS1 or FPS2.
- maxim,suspend-fps-source: This is same as property
"maxim,active-fps-source" but value
get configured when system enters in
to suspend state.
- maxim,suspend-fps-power-up-slot: This is same as property
"maxim,active-fps-power-up-slot" but
this value get configured into FPS
configuration register when system
enters into suspend.
This is applicable if suspend state
FPS source is selected as FPS0, FPS1 or
- maxim,suspend-fps-power-down-slot: This is same as property
"maxim,active-fps-power-down-slot" but
this value get configured into FPS
configuration register when system
enters into suspend.
This is applicable if suspend state
FPS source is selected as FPS0, FPS1 or
FPS2.
Example:
--------
#include <dt-bindings/mfd/max77620.h>
...
max77620@3c {
in-ldo0-1-supply = <&max77620_sd2>;
in-ldo7-8-supply = <&max77620_sd2>;
regulators {
sd0 {
regulator-name = "vdd-core";
regulator-min-microvolt = <600000>;
regulator-max-microvolt = <1400000>;
regulator-boot-on;
regulator-always-on;
maxim,active-fps-source = <MAX77620_FPS_SRC_1>;
};
sd1 {
regulator-name = "vddio-ddr";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-always-on;
regulator-boot-on;
maxim,active-fps-source = <MAX77620_FPS_SRC_0>;
};
sd2 {
regulator-name = "vdd-pre-reg";
regulator-min-microvolt = <1350000>;
regulator-max-microvolt = <1350000>;
};
sd3 {
regulator-name = "vdd-1v8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
regulator-boot-on;
};
ldo0 {
regulator-name = "avdd-sys";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-always-on;
regulator-boot-on;
};
ldo1 {
regulator-name = "vdd-pex";
regulator-min-microvolt = <1050000>;
regulator-max-microvolt = <1050000>;
};
ldo2 {
regulator-name = "vddio-sdmmc3";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
};
ldo3 {
regulator-name = "vdd-cam-hv";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
};
ldo4 {
regulator-name = "vdd-rtc";
regulator-min-microvolt = <1250000>;
regulator-max-microvolt = <1250000>;
regulator-always-on;
regulator-boot-on;
};
ldo5 {
regulator-name = "avdd-ts-hv";
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
};
ldo6 {
regulator-name = "vdd-ts";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
regulator-boot-on;
};
ldo7 {
regulator-name = "vdd-gen-pll-edp";
regulator-min-microvolt = <1050000>;
regulator-max-microvolt = <1050000>;
regulator-always-on;
regulator-boot-on;
};
ldo8 {
regulator-name = "vdd-hdmi-dp";
regulator-min-microvolt = <1050000>;
regulator-max-microvolt = <1050000>;
};
};
};
...@@ -6899,7 +6899,7 @@ MAXIM MAX77802 MULTIFUNCTION PMIC DEVICE DRIVERS ...@@ -6899,7 +6899,7 @@ MAXIM MAX77802 MULTIFUNCTION PMIC DEVICE DRIVERS
M: Javier Martinez Canillas <javier@osg.samsung.com> M: Javier Martinez Canillas <javier@osg.samsung.com>
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
S: Supported S: Supported
F: drivers/*/*max77802.c F: drivers/*/*max77802*.c
F: Documentation/devicetree/bindings/*/*max77802.txt F: Documentation/devicetree/bindings/*/*max77802.txt
F: include/dt-bindings/*/*max77802.h F: include/dt-bindings/*/*max77802.h
...@@ -6909,7 +6909,7 @@ M: Krzysztof Kozlowski <k.kozlowski@samsung.com> ...@@ -6909,7 +6909,7 @@ M: Krzysztof Kozlowski <k.kozlowski@samsung.com>
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
S: Supported S: Supported
F: drivers/*/max14577.c F: drivers/*/max14577.c
F: drivers/*/max77686.c F: drivers/*/max77686*.c
F: drivers/*/max77693.c F: drivers/*/max77693.c
F: drivers/extcon/extcon-max14577.c F: drivers/extcon/extcon-max14577.c
F: drivers/extcon/extcon-max77693.c F: drivers/extcon/extcon-max77693.c
......
...@@ -360,6 +360,15 @@ config REGULATOR_MAX1586 ...@@ -360,6 +360,15 @@ config REGULATOR_MAX1586
regulator via I2C bus. The provided regulator is suitable regulator via I2C bus. The provided regulator is suitable
for PXA27x chips to control VCC_CORE and VCC_USIM voltages. for PXA27x chips to control VCC_CORE and VCC_USIM voltages.
config REGULATOR_MAX77620
tristate "Maxim 77620/MAX20024 voltage regulator"
depends on MFD_MAX77620
help
This driver controls Maxim MAX77620 voltage output regulator
via I2C bus. The provided regulator is suitable for Tegra
chip to control Step-Down DC-DC and LDOs. Say Y here to
enable the regulator driver.
config REGULATOR_MAX8649 config REGULATOR_MAX8649
tristate "Maxim 8649 voltage regulator" tristate "Maxim 8649 voltage regulator"
depends on I2C depends on I2C
......
...@@ -48,6 +48,7 @@ obj-$(CONFIG_REGULATOR_LP8755) += lp8755.o ...@@ -48,6 +48,7 @@ obj-$(CONFIG_REGULATOR_LP8755) += lp8755.o
obj-$(CONFIG_REGULATOR_LTC3589) += ltc3589.o obj-$(CONFIG_REGULATOR_LTC3589) += ltc3589.o
obj-$(CONFIG_REGULATOR_MAX14577) += max14577.o obj-$(CONFIG_REGULATOR_MAX14577) += max14577.o
obj-$(CONFIG_REGULATOR_MAX1586) += max1586.o obj-$(CONFIG_REGULATOR_MAX1586) += max1586.o
obj-$(CONFIG_REGULATOR_MAX77620) += max77620-regulator.o
obj-$(CONFIG_REGULATOR_MAX8649) += max8649.o obj-$(CONFIG_REGULATOR_MAX8649) += max8649.o
obj-$(CONFIG_REGULATOR_MAX8660) += max8660.o obj-$(CONFIG_REGULATOR_MAX8660) += max8660.o
obj-$(CONFIG_REGULATOR_MAX8907) += max8907-regulator.o obj-$(CONFIG_REGULATOR_MAX8907) += max8907-regulator.o
...@@ -56,9 +57,9 @@ obj-$(CONFIG_REGULATOR_MAX8952) += max8952.o ...@@ -56,9 +57,9 @@ obj-$(CONFIG_REGULATOR_MAX8952) += max8952.o
obj-$(CONFIG_REGULATOR_MAX8973) += max8973-regulator.o obj-$(CONFIG_REGULATOR_MAX8973) += max8973-regulator.o
obj-$(CONFIG_REGULATOR_MAX8997) += max8997.o obj-$(CONFIG_REGULATOR_MAX8997) += max8997.o
obj-$(CONFIG_REGULATOR_MAX8998) += max8998.o obj-$(CONFIG_REGULATOR_MAX8998) += max8998.o
obj-$(CONFIG_REGULATOR_MAX77686) += max77686.o obj-$(CONFIG_REGULATOR_MAX77686) += max77686-regulator.o
obj-$(CONFIG_REGULATOR_MAX77693) += max77693.o obj-$(CONFIG_REGULATOR_MAX77693) += max77693.o
obj-$(CONFIG_REGULATOR_MAX77802) += max77802.o obj-$(CONFIG_REGULATOR_MAX77802) += max77802-regulator.o
obj-$(CONFIG_REGULATOR_MC13783) += mc13783-regulator.o obj-$(CONFIG_REGULATOR_MC13783) += mc13783-regulator.o
obj-$(CONFIG_REGULATOR_MC13892) += mc13892-regulator.o obj-$(CONFIG_REGULATOR_MC13892) += mc13892-regulator.o
obj-$(CONFIG_REGULATOR_MC13XXX_CORE) += mc13xxx-regulator-core.o obj-$(CONFIG_REGULATOR_MC13XXX_CORE) += mc13xxx-regulator-core.o
......
...@@ -1150,6 +1150,17 @@ static int set_machine_constraints(struct regulator_dev *rdev, ...@@ -1150,6 +1150,17 @@ static int set_machine_constraints(struct regulator_dev *rdev,
} }
} }
if (rdev->constraints->active_discharge && ops->set_active_discharge) {
bool ad_state = (rdev->constraints->active_discharge ==
REGULATOR_ACTIVE_DISCHARGE_ENABLE) ? true : false;
ret = ops->set_active_discharge(rdev, ad_state);
if (ret < 0) {
rdev_err(rdev, "failed to set active discharge\n");
return ret;
}
}
print_constraints(rdev); print_constraints(rdev);
return 0; return 0;
} }
......
...@@ -520,12 +520,15 @@ static int ltc3589_probe(struct i2c_client *client, ...@@ -520,12 +520,15 @@ static int ltc3589_probe(struct i2c_client *client,
} }
} }
ret = devm_request_threaded_irq(dev, client->irq, NULL, ltc3589_isr, if (client->irq) {
IRQF_TRIGGER_LOW | IRQF_ONESHOT, ret = devm_request_threaded_irq(dev, client->irq, NULL,
client->name, ltc3589); ltc3589_isr,
if (ret) { IRQF_TRIGGER_LOW | IRQF_ONESHOT,
dev_err(dev, "Failed to request IRQ: %d\n", ret); client->name, ltc3589);
return ret; if (ret) {
dev_err(dev, "Failed to request IRQ: %d\n", ret);
return ret;
}
} }
return 0; return 0;
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment