Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Beomho Seo and committed by
Mark Brown
53aebb7f 97bf6af1

+7 -1
+7 -1
drivers/regulator/rt5033-regulator.c
··· 36 36 static const struct regulator_desc rt5033_supported_regulators[] = { 37 37 [RT5033_BUCK] = { 38 38 .name = "BUCK", 39 + .of_match = of_match_ptr("BUCK"), 40 + .regulators_node = of_match_ptr("regulators"), 39 41 .id = RT5033_BUCK, 40 42 .ops = &rt5033_buck_ops, 41 43 .type = REGULATOR_VOLTAGE, ··· 52 50 }, 53 51 [RT5033_LDO] = { 54 52 .name = "LDO", 53 + .of_match = of_match_ptr("LDO"), 54 + .regulators_node = of_match_ptr("regulators"), 55 55 .id = RT5033_LDO, 56 56 .ops = &rt5033_buck_ops, 57 57 .type = REGULATOR_VOLTAGE, ··· 68 64 }, 69 65 [RT5033_SAFE_LDO] = { 70 66 .name = "SAFE_LDO", 67 + .of_match = of_match_ptr("SAFE_LDO"), 68 + .regulators_node = of_match_ptr("regulators"), 71 69 .id = RT5033_SAFE_LDO, 72 70 .ops = &rt5033_safe_ldo_ops, 73 71 .type = REGULATOR_VOLTAGE, ··· 87 81 int ret, i; 88 82 struct regulator_config config = {}; 89 83 90 - config.dev = &pdev->dev; 84 + config.dev = rt5033->dev; 91 85 config.driver_data = rt5033; 92 86 93 87 for (i = 0; i < ARRAY_SIZE(rt5033_supported_regulators); i++) {