diff options
author | Beomho Seo <beomho.seo@samsung.com> | 2014-12-18 06:13:36 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-12-24 07:54:56 -0500 |
commit | 53aebb7f19b71df6cf5aace87609b88cfc1c87ec (patch) | |
tree | bf80f8673f7fe4087c5595c8fba90ef8b67c6c18 /drivers/regulator | |
parent | 97bf6af1f928216fd6c5a66e8a57bfa95a659672 (diff) |
regulator: rt5033-regulator: Use regulator_nodes/of_match in the descriptor
This patch is add regulator_nodes/of_match in the regulator descriptor
for using information from DT instead of sppecific codes.
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/rt5033-regulator.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/regulator/rt5033-regulator.c b/drivers/regulator/rt5033-regulator.c index 870cc49438db..96d2c18e051a 100644 --- a/drivers/regulator/rt5033-regulator.c +++ b/drivers/regulator/rt5033-regulator.c | |||
@@ -36,6 +36,8 @@ static struct regulator_ops rt5033_buck_ops = { | |||
36 | static const struct regulator_desc rt5033_supported_regulators[] = { | 36 | static const struct regulator_desc rt5033_supported_regulators[] = { |
37 | [RT5033_BUCK] = { | 37 | [RT5033_BUCK] = { |
38 | .name = "BUCK", | 38 | .name = "BUCK", |
39 | .of_match = of_match_ptr("BUCK"), | ||
40 | .regulators_node = of_match_ptr("regulators"), | ||
39 | .id = RT5033_BUCK, | 41 | .id = RT5033_BUCK, |
40 | .ops = &rt5033_buck_ops, | 42 | .ops = &rt5033_buck_ops, |
41 | .type = REGULATOR_VOLTAGE, | 43 | .type = REGULATOR_VOLTAGE, |
@@ -50,6 +52,8 @@ static const struct regulator_desc rt5033_supported_regulators[] = { | |||
50 | }, | 52 | }, |
51 | [RT5033_LDO] = { | 53 | [RT5033_LDO] = { |
52 | .name = "LDO", | 54 | .name = "LDO", |
55 | .of_match = of_match_ptr("LDO"), | ||
56 | .regulators_node = of_match_ptr("regulators"), | ||
53 | .id = RT5033_LDO, | 57 | .id = RT5033_LDO, |
54 | .ops = &rt5033_buck_ops, | 58 | .ops = &rt5033_buck_ops, |
55 | .type = REGULATOR_VOLTAGE, | 59 | .type = REGULATOR_VOLTAGE, |
@@ -64,6 +68,8 @@ static const struct regulator_desc rt5033_supported_regulators[] = { | |||
64 | }, | 68 | }, |
65 | [RT5033_SAFE_LDO] = { | 69 | [RT5033_SAFE_LDO] = { |
66 | .name = "SAFE_LDO", | 70 | .name = "SAFE_LDO", |
71 | .of_match = of_match_ptr("SAFE_LDO"), | ||
72 | .regulators_node = of_match_ptr("regulators"), | ||
67 | .id = RT5033_SAFE_LDO, | 73 | .id = RT5033_SAFE_LDO, |
68 | .ops = &rt5033_safe_ldo_ops, | 74 | .ops = &rt5033_safe_ldo_ops, |
69 | .type = REGULATOR_VOLTAGE, | 75 | .type = REGULATOR_VOLTAGE, |
@@ -81,7 +87,7 @@ static int rt5033_regulator_probe(struct platform_device *pdev) | |||
81 | int ret, i; | 87 | int ret, i; |
82 | struct regulator_config config = {}; | 88 | struct regulator_config config = {}; |
83 | 89 | ||
84 | config.dev = &pdev->dev; | 90 | config.dev = rt5033->dev; |
85 | config.driver_data = rt5033; | 91 | config.driver_data = rt5033; |
86 | 92 | ||
87 | for (i = 0; i < ARRAY_SIZE(rt5033_supported_regulators); i++) { | 93 | for (i = 0; i < ARRAY_SIZE(rt5033_supported_regulators); i++) { |