diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2011-06-07 04:38:24 -0400 |
---|---|---|
committer | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2011-07-04 11:43:43 -0400 |
commit | b252b0efb605b92a2f5d118e294d088d89cfd286 (patch) | |
tree | aa501248da2e0d369badcefdf027f6cc2ff04b94 /arch/arm/mach-omap2/twl-common.c | |
parent | 827ed9aef2f13000d58616384ea6a22497e787b6 (diff) |
OMAP3: Move common regulator configuration to twl-common
Some regulator config can be moved out from board files,
since they are close to identical.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/twl-common.c')
-rw-r--r-- | arch/arm/mach-omap2/twl-common.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c index 9e8decf14a22..3aaa46f6cd12 100644 --- a/arch/arm/mach-omap2/twl-common.c +++ b/arch/arm/mach-omap2/twl-common.c | |||
@@ -87,6 +87,41 @@ static struct twl4030_codec_data omap3_codec_pdata = { | |||
87 | .audio = &omap3_audio, | 87 | .audio = &omap3_audio, |
88 | }; | 88 | }; |
89 | 89 | ||
90 | static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = { | ||
91 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"), | ||
92 | }; | ||
93 | |||
94 | static struct regulator_init_data omap3_vdac_idata = { | ||
95 | .constraints = { | ||
96 | .min_uV = 1800000, | ||
97 | .max_uV = 1800000, | ||
98 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
99 | | REGULATOR_MODE_STANDBY, | ||
100 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
101 | | REGULATOR_CHANGE_STATUS, | ||
102 | }, | ||
103 | .num_consumer_supplies = ARRAY_SIZE(omap3_vdda_dac_supplies), | ||
104 | .consumer_supplies = omap3_vdda_dac_supplies, | ||
105 | }; | ||
106 | |||
107 | static struct regulator_consumer_supply omap3_vpll2_supplies[] = { | ||
108 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"), | ||
109 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), | ||
110 | }; | ||
111 | |||
112 | static struct regulator_init_data omap3_vpll2_idata = { | ||
113 | .constraints = { | ||
114 | .min_uV = 1800000, | ||
115 | .max_uV = 1800000, | ||
116 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
117 | | REGULATOR_MODE_STANDBY, | ||
118 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
119 | | REGULATOR_CHANGE_STATUS, | ||
120 | }, | ||
121 | .num_consumer_supplies = ARRAY_SIZE(omap3_vpll2_supplies), | ||
122 | .consumer_supplies = omap3_vpll2_supplies, | ||
123 | }; | ||
124 | |||
90 | static struct regulator_init_data omap4_vdac_idata = { | 125 | static struct regulator_init_data omap4_vdac_idata = { |
91 | .constraints = { | 126 | .constraints = { |
92 | .min_uV = 1800000, | 127 | .min_uV = 1800000, |
@@ -259,4 +294,11 @@ void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data, | |||
259 | 294 | ||
260 | if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->codec) | 295 | if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->codec) |
261 | pmic_data->codec = &omap3_codec_pdata; | 296 | pmic_data->codec = &omap3_codec_pdata; |
297 | |||
298 | /* Common regulator configurations */ | ||
299 | if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac) | ||
300 | pmic_data->vdac = &omap3_vdac_idata; | ||
301 | |||
302 | if (regulators_flags & TWL_COMMON_REGULATOR_VPLL2 && !pmic_data->vpll2) | ||
303 | pmic_data->vpll2 = &omap3_vpll2_idata; | ||
262 | } | 304 | } |