Merge remote-tracking branches 'regulator/fix/axp20x', 'regulator/fix/da9063', 'regulator/fix/gpio' and 'regulator/fix/s2mps11' into regulator-linus
This commit is contained in:
commit
9689dab30a
5 changed files with 36 additions and 10 deletions
|
@ -157,7 +157,9 @@ static struct regulator_ops axp20x_ops_sw = {
|
|||
static const struct regulator_linear_range axp20x_ldo4_ranges[] = {
|
||||
REGULATOR_LINEAR_RANGE(1250000, 0x0, 0x0, 0),
|
||||
REGULATOR_LINEAR_RANGE(1300000, 0x1, 0x8, 100000),
|
||||
REGULATOR_LINEAR_RANGE(2500000, 0x9, 0xf, 100000),
|
||||
REGULATOR_LINEAR_RANGE(2500000, 0x9, 0x9, 0),
|
||||
REGULATOR_LINEAR_RANGE(2700000, 0xa, 0xb, 100000),
|
||||
REGULATOR_LINEAR_RANGE(3000000, 0xc, 0xf, 100000),
|
||||
};
|
||||
|
||||
static const struct regulator_desc axp20x_regulators[] = {
|
||||
|
@ -215,10 +217,14 @@ static const struct regulator_desc axp22x_regulators[] = {
|
|||
AXP22X_ELDO2_V_OUT, 0x1f, AXP22X_PWR_OUT_CTRL2, BIT(1)),
|
||||
AXP_DESC(AXP22X, ELDO3, "eldo3", "eldoin", 700, 3300, 100,
|
||||
AXP22X_ELDO3_V_OUT, 0x1f, AXP22X_PWR_OUT_CTRL2, BIT(2)),
|
||||
AXP_DESC_IO(AXP22X, LDO_IO0, "ldo_io0", "ips", 1800, 3300, 100,
|
||||
/* Note the datasheet only guarantees reliable operation up to
|
||||
* 3.3V, this needs to be enforced via dts provided constraints */
|
||||
AXP_DESC_IO(AXP22X, LDO_IO0, "ldo_io0", "ips", 700, 3800, 100,
|
||||
AXP22X_LDO_IO0_V_OUT, 0x1f, AXP20X_GPIO0_CTRL, 0x07,
|
||||
AXP22X_IO_ENABLED, AXP22X_IO_DISABLED),
|
||||
AXP_DESC_IO(AXP22X, LDO_IO1, "ldo_io1", "ips", 1800, 3300, 100,
|
||||
/* Note the datasheet only guarantees reliable operation up to
|
||||
* 3.3V, this needs to be enforced via dts provided constraints */
|
||||
AXP_DESC_IO(AXP22X, LDO_IO1, "ldo_io1", "ips", 700, 3800, 100,
|
||||
AXP22X_LDO_IO1_V_OUT, 0x1f, AXP20X_GPIO1_CTRL, 0x07,
|
||||
AXP22X_IO_ENABLED, AXP22X_IO_DISABLED),
|
||||
AXP_DESC_FIXED(AXP22X, RTC_LDO, "rtc_ldo", "ips", 3000),
|
||||
|
|
|
@ -900,4 +900,4 @@ module_exit(da9063_regulator_cleanup);
|
|||
MODULE_AUTHOR("Krystian Garbaciak <krystian.garbaciak@diasemi.com>");
|
||||
MODULE_DESCRIPTION("DA9063 regulators driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_ALIAS("paltform:" DA9063_DRVNAME_REGULATORS);
|
||||
MODULE_ALIAS("platform:" DA9063_DRVNAME_REGULATORS);
|
||||
|
|
|
@ -162,6 +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);
|
||||
|
||||
config->enable_gpio = of_get_named_gpio(np, "enable-gpio", 0);
|
||||
if (config->enable_gpio == -EPROBE_DEFER)
|
||||
return ERR_PTR(-EPROBE_DEFER);
|
||||
|
||||
/* Fetch GPIOs. - optional property*/
|
||||
ret = of_gpio_count(np);
|
||||
|
|
|
@ -308,7 +308,7 @@ static struct regulator_ops s2mps11_buck_ops = {
|
|||
.enable_mask = S2MPS11_ENABLE_MASK \
|
||||
}
|
||||
|
||||
#define regulator_desc_s2mps11_buck6_10(num, min, step) { \
|
||||
#define regulator_desc_s2mps11_buck67810(num, min, step) { \
|
||||
.name = "BUCK"#num, \
|
||||
.id = S2MPS11_BUCK##num, \
|
||||
.ops = &s2mps11_buck_ops, \
|
||||
|
@ -324,6 +324,22 @@ static struct regulator_ops s2mps11_buck_ops = {
|
|||
.enable_mask = S2MPS11_ENABLE_MASK \
|
||||
}
|
||||
|
||||
#define regulator_desc_s2mps11_buck9 { \
|
||||
.name = "BUCK9", \
|
||||
.id = S2MPS11_BUCK9, \
|
||||
.ops = &s2mps11_buck_ops, \
|
||||
.type = REGULATOR_VOLTAGE, \
|
||||
.owner = THIS_MODULE, \
|
||||
.min_uV = MIN_3000_MV, \
|
||||
.uV_step = STEP_25_MV, \
|
||||
.n_voltages = S2MPS11_BUCK9_N_VOLTAGES, \
|
||||
.ramp_delay = S2MPS11_RAMP_DELAY, \
|
||||
.vsel_reg = S2MPS11_REG_B9CTRL2, \
|
||||
.vsel_mask = S2MPS11_BUCK9_VSEL_MASK, \
|
||||
.enable_reg = S2MPS11_REG_B9CTRL1, \
|
||||
.enable_mask = S2MPS11_ENABLE_MASK \
|
||||
}
|
||||
|
||||
static const struct regulator_desc s2mps11_regulators[] = {
|
||||
regulator_desc_s2mps11_ldo(1, STEP_25_MV),
|
||||
regulator_desc_s2mps11_ldo(2, STEP_50_MV),
|
||||
|
@ -368,11 +384,11 @@ static const struct regulator_desc s2mps11_regulators[] = {
|
|||
regulator_desc_s2mps11_buck1_4(3),
|
||||
regulator_desc_s2mps11_buck1_4(4),
|
||||
regulator_desc_s2mps11_buck5,
|
||||
regulator_desc_s2mps11_buck6_10(6, MIN_600_MV, STEP_6_25_MV),
|
||||
regulator_desc_s2mps11_buck6_10(7, MIN_600_MV, STEP_6_25_MV),
|
||||
regulator_desc_s2mps11_buck6_10(8, MIN_600_MV, STEP_6_25_MV),
|
||||
regulator_desc_s2mps11_buck6_10(9, MIN_3000_MV, STEP_25_MV),
|
||||
regulator_desc_s2mps11_buck6_10(10, MIN_750_MV, STEP_12_5_MV),
|
||||
regulator_desc_s2mps11_buck67810(6, MIN_600_MV, STEP_6_25_MV),
|
||||
regulator_desc_s2mps11_buck67810(7, MIN_600_MV, STEP_6_25_MV),
|
||||
regulator_desc_s2mps11_buck67810(8, MIN_600_MV, STEP_6_25_MV),
|
||||
regulator_desc_s2mps11_buck9,
|
||||
regulator_desc_s2mps11_buck67810(10, MIN_750_MV, STEP_12_5_MV),
|
||||
};
|
||||
|
||||
static struct regulator_ops s2mps14_reg_ops;
|
||||
|
|
|
@ -173,10 +173,12 @@ enum s2mps11_regulators {
|
|||
|
||||
#define S2MPS11_LDO_VSEL_MASK 0x3F
|
||||
#define S2MPS11_BUCK_VSEL_MASK 0xFF
|
||||
#define S2MPS11_BUCK9_VSEL_MASK 0x1F
|
||||
#define S2MPS11_ENABLE_MASK (0x03 << S2MPS11_ENABLE_SHIFT)
|
||||
#define S2MPS11_ENABLE_SHIFT 0x06
|
||||
#define S2MPS11_LDO_N_VOLTAGES (S2MPS11_LDO_VSEL_MASK + 1)
|
||||
#define S2MPS11_BUCK_N_VOLTAGES (S2MPS11_BUCK_VSEL_MASK + 1)
|
||||
#define S2MPS11_BUCK9_N_VOLTAGES (S2MPS11_BUCK9_VSEL_MASK + 1)
|
||||
#define S2MPS11_RAMP_DELAY 25000 /* uV/us */
|
||||
|
||||
#define S2MPS11_CTRL1_PWRHOLD_MASK BIT(4)
|
||||
|
|
Loading…
Reference in a new issue