Skip to content

Commit

Permalink
regulator: use voltage number array in 88pm860x
Browse files Browse the repository at this point in the history
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 <haojian.zhuang@marvell.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
  • Loading branch information
Haojian Zhuang authored and Liam Girdwood committed May 25, 2010
1 parent 192bbb9 commit 9f79e9d
Show file tree
Hide file tree
Showing 3 changed files with 224 additions and 263 deletions.
2 changes: 2 additions & 0 deletions drivers/mfd/88pm860x-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ static struct resource regulator_resources[] = {
PM8607_REG_RESOURCE(LDO9, LDO9),
PM8607_REG_RESOURCE(LDO10, LDO10),
PM8607_REG_RESOURCE(LDO12, LDO12),
PM8607_REG_RESOURCE(VIBRATOR_SET, VIBRATOR_SET),
PM8607_REG_RESOURCE(LDO14, LDO14),
};

Expand All @@ -199,6 +200,7 @@ static struct mfd_cell regulator_devs[] = {
PM8607_REG_DEVS(LDO9),
PM8607_REG_DEVS(LDO10),
PM8607_REG_DEVS(LDO12),
PM8607_REG_DEVS(LDO13),
PM8607_REG_DEVS(LDO14),
};

Expand Down
Loading

0 comments on commit 9f79e9d

Please sign in to comment.