Merge remote-tracking branch 'regulator/topic/lp8788' into regulator-next
This commit is contained in:
commit
a8bfb69e77
|
@ -429,18 +429,6 @@ static struct regulator_desc lp8788_buck_desc[] = {
|
|||
},
|
||||
};
|
||||
|
||||
static int _gpio_request(struct lp8788_buck *buck, int gpio, char *name)
|
||||
{
|
||||
struct device *dev = buck->lp->dev;
|
||||
|
||||
if (!gpio_is_valid(gpio)) {
|
||||
dev_err(dev, "invalid gpio: %d\n", gpio);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return devm_gpio_request_one(dev, gpio, DVS_LOW, name);
|
||||
}
|
||||
|
||||
static int lp8788_dvs_gpio_request(struct lp8788_buck *buck,
|
||||
enum lp8788_buck_id id)
|
||||
{
|
||||
|
@ -452,7 +440,8 @@ static int lp8788_dvs_gpio_request(struct lp8788_buck *buck,
|
|||
switch (id) {
|
||||
case BUCK1:
|
||||
gpio = pdata->buck1_dvs->gpio;
|
||||
ret = _gpio_request(buck, gpio, b1_name);
|
||||
ret = devm_gpio_request_one(buck->lp->dev, gpio, DVS_LOW,
|
||||
b1_name);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
@ -461,7 +450,8 @@ static int lp8788_dvs_gpio_request(struct lp8788_buck *buck,
|
|||
case BUCK2:
|
||||
for (i = 0 ; i < LP8788_NUM_BUCK2_DVS ; i++) {
|
||||
gpio = pdata->buck2_dvs->gpio[i];
|
||||
ret = _gpio_request(buck, gpio, b2_name[i]);
|
||||
ret = devm_gpio_request_one(buck->lp->dev, gpio,
|
||||
DVS_LOW, b2_name[i]);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@ struct lp8788_ldo {
|
|||
};
|
||||
|
||||
/* DLDO 1, 2, 3, 9 voltage table */
|
||||
const int lp8788_dldo1239_vtbl[] = {
|
||||
static const int lp8788_dldo1239_vtbl[] = {
|
||||
1800000, 1900000, 2000000, 2100000, 2200000, 2300000, 2400000, 2500000,
|
||||
2600000, 2700000, 2800000, 2900000, 3000000, 2850000, 2850000, 2850000,
|
||||
2850000, 2850000, 2850000, 2850000, 2850000, 2850000, 2850000, 2850000,
|
||||
|
@ -662,14 +662,6 @@ static int lp8788_config_ldo_enable_mode(struct lp8788_ldo *ldo,
|
|||
[EN_DLDO7] = LP8788_EN_SEL_DLDO7_M,
|
||||
[EN_DLDO911] = LP8788_EN_SEL_DLDO911_M,
|
||||
};
|
||||
u8 val[] = {
|
||||
[EN_ALDO1] = 0 << 5,
|
||||
[EN_ALDO234] = 0 << 4,
|
||||
[EN_ALDO5] = 0 << 3,
|
||||
[EN_ALDO7] = 0 << 2,
|
||||
[EN_DLDO7] = 0 << 1,
|
||||
[EN_DLDO911] = 0 << 0,
|
||||
};
|
||||
|
||||
switch (id) {
|
||||
case DLDO7:
|
||||
|
@ -708,8 +700,7 @@ static int lp8788_config_ldo_enable_mode(struct lp8788_ldo *ldo,
|
|||
return ret;
|
||||
|
||||
set_default_ldo_enable_mode:
|
||||
return lp8788_update_bits(lp, LP8788_EN_SEL, en_mask[enable_id],
|
||||
val[enable_id]);
|
||||
return lp8788_update_bits(lp, LP8788_EN_SEL, en_mask[enable_id], 0);
|
||||
}
|
||||
|
||||
static int lp8788_dldo_probe(struct platform_device *pdev)
|
||||
|
|
Loading…
Reference in New Issue