diff options
author | Kevin Hilman <khilman@ti.com> | 2011-03-30 14:01:10 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2011-09-15 15:08:57 -0400 |
commit | ce8ebe0dfb1f8713337cebf82499d3dced288328 (patch) | |
tree | 3ffb4cac949459b9feda4f307d4d9b51b0da3a5c /arch/arm/mach-omap2/vp.c | |
parent | 24d3194a2c9bc4d2315117915d4d22c395c07fd5 (diff) |
OMAP3+: voltage domain: move PMIC struct from vdd_info into struct voltagedomain
Move structure containing PMIC configurable settings into struct
voltagedomain. In the process, rename from omap_volt_pmic_info to
omap_voltdm_pmic (_info suffix is not helpful.)
No functional changes.
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/vp.c')
-rw-r--r-- | arch/arm/mach-omap2/vp.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c index 88ac742a38cf..a3afcbe741e3 100644 --- a/arch/arm/mach-omap2/vp.c +++ b/arch/arm/mach-omap2/vp.c | |||
@@ -18,7 +18,6 @@ static void vp_latch_vsel(struct voltagedomain *voltdm) | |||
18 | u32 vpconfig; | 18 | u32 vpconfig; |
19 | unsigned long uvdc; | 19 | unsigned long uvdc; |
20 | char vsel; | 20 | char vsel; |
21 | struct omap_vdd_info *vdd = voltdm->vdd; | ||
22 | 21 | ||
23 | uvdc = omap_voltage_get_nom_volt(voltdm); | 22 | uvdc = omap_voltage_get_nom_volt(voltdm); |
24 | if (!uvdc) { | 23 | if (!uvdc) { |
@@ -27,13 +26,13 @@ static void vp_latch_vsel(struct voltagedomain *voltdm) | |||
27 | return; | 26 | return; |
28 | } | 27 | } |
29 | 28 | ||
30 | if (!vdd->pmic_info || !vdd->pmic_info->uv_to_vsel) { | 29 | if (!voltdm->pmic || !voltdm->pmic->uv_to_vsel) { |
31 | pr_warning("%s: PMIC function to convert voltage in uV to" | 30 | pr_warning("%s: PMIC function to convert voltage in uV to" |
32 | " vsel not registered\n", __func__); | 31 | " vsel not registered\n", __func__); |
33 | return; | 32 | return; |
34 | } | 33 | } |
35 | 34 | ||
36 | vsel = vdd->pmic_info->uv_to_vsel(uvdc); | 35 | vsel = voltdm->pmic->uv_to_vsel(uvdc); |
37 | 36 | ||
38 | vpconfig = voltdm->read(vp->vpconfig); | 37 | vpconfig = voltdm->read(vp->vpconfig); |
39 | vpconfig &= ~(vp->vp_common->vpconfig_initvoltage_mask | | 38 | vpconfig &= ~(vp->vp_common->vpconfig_initvoltage_mask | |
@@ -206,13 +205,13 @@ unsigned long omap_vp_get_curr_volt(struct voltagedomain *voltdm) | |||
206 | 205 | ||
207 | curr_vsel = voltdm->read(vp->voltage); | 206 | curr_vsel = voltdm->read(vp->voltage); |
208 | 207 | ||
209 | if (!vdd->pmic_info || !vdd->pmic_info->vsel_to_uv) { | 208 | if (!voltdm->pmic || !voltdm->pmic->vsel_to_uv) { |
210 | pr_warning("%s: PMIC function to convert vsel to voltage" | 209 | pr_warning("%s: PMIC function to convert vsel to voltage" |
211 | "in uV not registerd\n", __func__); | 210 | "in uV not registerd\n", __func__); |
212 | return 0; | 211 | return 0; |
213 | } | 212 | } |
214 | 213 | ||
215 | return vdd->pmic_info->vsel_to_uv(curr_vsel); | 214 | return voltdm->pmic->vsel_to_uv(curr_vsel); |
216 | } | 215 | } |
217 | 216 | ||
218 | /** | 217 | /** |
@@ -323,13 +322,13 @@ static int vp_volt_debug_get(void *data, u64 *val) | |||
323 | 322 | ||
324 | vsel = voltdm->read(vp->voltage); | 323 | vsel = voltdm->read(vp->voltage); |
325 | 324 | ||
326 | if (!vdd->pmic_info->vsel_to_uv) { | 325 | if (!voltdm->pmic->vsel_to_uv) { |
327 | pr_warning("PMIC function to convert vsel to voltage" | 326 | pr_warning("PMIC function to convert vsel to voltage" |
328 | "in uV not registerd\n"); | 327 | "in uV not registerd\n"); |
329 | return -EINVAL; | 328 | return -EINVAL; |
330 | } | 329 | } |
331 | 330 | ||
332 | *val = vdd->pmic_info->vsel_to_uv(vsel); | 331 | *val = voltdm->pmic->vsel_to_uv(vsel); |
333 | return 0; | 332 | return 0; |
334 | } | 333 | } |
335 | 334 | ||