Skip to content

Commit 9f79e9d

Browse files
Haojian ZhuangLiam Girdwood
authored andcommitted
regulator: use voltage number array in 88pm860x
A lot of condition comparision statements are used in original driver. These statements are used to check the boundary of voltage numbers since voltage number isn't linear. Now use array of voltage numbers instead. Clean code with simpler way. Signed-off-by: Haojian Zhuang <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Liam Girdwood <[email protected]>
1 parent 192bbb9 commit 9f79e9d

File tree

3 files changed

+224
-263
lines changed

3 files changed

+224
-263
lines changed

drivers/mfd/88pm860x-core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ static struct resource regulator_resources[] = {
173173
PM8607_REG_RESOURCE(LDO9, LDO9),
174174
PM8607_REG_RESOURCE(LDO10, LDO10),
175175
PM8607_REG_RESOURCE(LDO12, LDO12),
176+
PM8607_REG_RESOURCE(VIBRATOR_SET, VIBRATOR_SET),
176177
PM8607_REG_RESOURCE(LDO14, LDO14),
177178
};
178179

@@ -199,6 +200,7 @@ static struct mfd_cell regulator_devs[] = {
199200
PM8607_REG_DEVS(LDO9),
200201
PM8607_REG_DEVS(LDO10),
201202
PM8607_REG_DEVS(LDO12),
203+
PM8607_REG_DEVS(LDO13),
202204
PM8607_REG_DEVS(LDO14),
203205
};
204206

0 commit comments

Comments
 (0)