mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-02 10:43:57 +08:00
regulator: lp8788: Remove lp8788_dldo_id and lp8788_aldo_id arrays
The id for DLDOx matches the entries in enum lp8788_ldo_id and it's easy to calculate the id for ALDOx. Thus remove lp8788_dldo_id and lp8788_aldo_id arrays. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
407945fd78
commit
80abd60d98
@ -156,34 +156,6 @@ static const int lp8788_aldo7_vtbl[] = {
|
|||||||
1200000, 1300000, 1400000, 1500000, 1600000, 1700000, 1800000, 1800000,
|
1200000, 1300000, 1400000, 1500000, 1600000, 1700000, 1800000, 1800000,
|
||||||
};
|
};
|
||||||
|
|
||||||
static enum lp8788_ldo_id lp8788_dldo_id[] = {
|
|
||||||
DLDO1,
|
|
||||||
DLDO2,
|
|
||||||
DLDO3,
|
|
||||||
DLDO4,
|
|
||||||
DLDO5,
|
|
||||||
DLDO6,
|
|
||||||
DLDO7,
|
|
||||||
DLDO8,
|
|
||||||
DLDO9,
|
|
||||||
DLDO10,
|
|
||||||
DLDO11,
|
|
||||||
DLDO12,
|
|
||||||
};
|
|
||||||
|
|
||||||
static enum lp8788_ldo_id lp8788_aldo_id[] = {
|
|
||||||
ALDO1,
|
|
||||||
ALDO2,
|
|
||||||
ALDO3,
|
|
||||||
ALDO4,
|
|
||||||
ALDO5,
|
|
||||||
ALDO6,
|
|
||||||
ALDO7,
|
|
||||||
ALDO8,
|
|
||||||
ALDO9,
|
|
||||||
ALDO10,
|
|
||||||
};
|
|
||||||
|
|
||||||
static int lp8788_ldo_enable_time(struct regulator_dev *rdev)
|
static int lp8788_ldo_enable_time(struct regulator_dev *rdev)
|
||||||
{
|
{
|
||||||
struct lp8788_ldo *ldo = rdev_get_drvdata(rdev);
|
struct lp8788_ldo *ldo = rdev_get_drvdata(rdev);
|
||||||
@ -566,7 +538,7 @@ static int lp8788_dldo_probe(struct platform_device *pdev)
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
ldo->lp = lp;
|
ldo->lp = lp;
|
||||||
ret = lp8788_config_ldo_enable_mode(pdev, ldo, lp8788_dldo_id[id]);
|
ret = lp8788_config_ldo_enable_mode(pdev, ldo, id);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
@ -627,7 +599,7 @@ static int lp8788_aldo_probe(struct platform_device *pdev)
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
ldo->lp = lp;
|
ldo->lp = lp;
|
||||||
ret = lp8788_config_ldo_enable_mode(pdev, ldo, lp8788_aldo_id[id]);
|
ret = lp8788_config_ldo_enable_mode(pdev, ldo, id + ALDO1);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user