[glsdk/meta-ti-glsdk.git] / recipes-kernel / linux / linux-3.0 / pm-wip / voltdm / 0143-OMAP3-voltage-rename-omap_voltage_get_nom_volt-voltd.patch
1 From d8d3f4c82b790d2cc392264dd41048b2a95d0245 Mon Sep 17 00:00:00 2001
2 From: Kevin Hilman <khilman@ti.com>
3 Date: Fri, 15 Jul 2011 16:05:12 -0700
4 Subject: [PATCH 143/149] OMAP3+: voltage: rename omap_voltage_get_nom_volt -> voltdm_get_voltage
6 Use preferred voltdm_ naming for getting current nominal voltage.
8 No functional changes.
10 Signed-off-by: Kevin Hilman <khilman@ti.com>
11 ---
12 arch/arm/mach-omap2/smartreflex-class3.c | 2 +-
13 arch/arm/mach-omap2/voltage.c | 14 ++++++++------
14 arch/arm/mach-omap2/voltage.h | 2 +-
15 3 files changed, 10 insertions(+), 8 deletions(-)
17 diff --git a/arch/arm/mach-omap2/smartreflex-class3.c b/arch/arm/mach-omap2/smartreflex-class3.c
18 index 4eac1bc..53d9d0a 100644
19 --- a/arch/arm/mach-omap2/smartreflex-class3.c
20 +++ b/arch/arm/mach-omap2/smartreflex-class3.c
21 @@ -15,7 +15,7 @@
23 static int sr_class3_enable(struct voltagedomain *voltdm)
24 {
25 - unsigned long volt = omap_voltage_get_nom_volt(voltdm);
26 + unsigned long volt = voltdm_get_voltage(voltdm);
28 if (!volt) {
29 pr_warning("%s: Curr voltage unknown. Cannot enable sr_%s\n",
30 diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c
31 index 2e5528f..031f6bf 100644
32 --- a/arch/arm/mach-omap2/voltage.c
33 +++ b/arch/arm/mach-omap2/voltage.c
34 @@ -45,13 +45,13 @@ static LIST_HEAD(voltdm_list);
36 /* Public functions */
37 /**
38 - * omap_voltage_get_nom_volt() - Gets the current non-auto-compensated voltage
39 - * @voltdm: pointer to the VDD for which current voltage info is needed
40 + * voltdm_get_voltage() - Gets the current non-auto-compensated voltage
41 + * @voltdm: pointer to the voltdm for which current voltage info is needed
42 *
43 - * API to get the current non-auto-compensated voltage for a VDD.
44 - * Returns 0 in case of error else returns the current voltage for the VDD.
45 + * API to get the current non-auto-compensated voltage for a voltage domain.
46 + * Returns 0 in case of error else returns the current voltage.
47 */
48 -unsigned long omap_voltage_get_nom_volt(struct voltagedomain *voltdm)
49 +unsigned long voltdm_get_voltage(struct voltagedomain *voltdm)
50 {
51 if (!voltdm || IS_ERR(voltdm)) {
52 pr_warning("%s: VDD specified does not exist!\n", __func__);
53 @@ -72,6 +72,8 @@ unsigned long omap_voltage_get_nom_volt(struct voltagedomain *voltdm)
54 int voltdm_scale(struct voltagedomain *voltdm,
55 unsigned long target_volt)
56 {
57 + int ret;
58 +
59 if (!voltdm || IS_ERR(voltdm)) {
60 pr_warning("%s: VDD specified does not exist!\n", __func__);
61 return -EINVAL;
62 @@ -104,7 +106,7 @@ void voltdm_reset(struct voltagedomain *voltdm)
63 return;
64 }
66 - target_volt = omap_voltage_get_nom_volt(voltdm);
67 + target_volt = voltdm_get_voltage(voltdm);
68 if (!target_volt) {
69 pr_err("%s: unable to find current voltage for vdd_%s\n",
70 __func__, voltdm->name);
71 diff --git a/arch/arm/mach-omap2/voltage.h b/arch/arm/mach-omap2/voltage.h
72 index 68b1ed5..b4c6259 100644
73 --- a/arch/arm/mach-omap2/voltage.h
74 +++ b/arch/arm/mach-omap2/voltage.h
75 @@ -143,7 +143,6 @@ void omap_voltage_get_volttable(struct voltagedomain *voltdm,
76 struct omap_volt_data **volt_data);
77 struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,
78 unsigned long volt);
79 -unsigned long omap_voltage_get_nom_volt(struct voltagedomain *voltdm);
80 #ifdef CONFIG_PM
81 int omap_voltage_register_pmic(struct voltagedomain *voltdm,
82 struct omap_voltdm_pmic *pmic);
83 @@ -178,4 +177,5 @@ int voltdm_for_each_pwrdm(struct voltagedomain *voltdm,
84 struct powerdomain *pwrdm));
85 int voltdm_scale(struct voltagedomain *voltdm, unsigned long target_volt);
86 void voltdm_reset(struct voltagedomain *voltdm);
87 +unsigned long voltdm_get_voltage(struct voltagedomain *voltdm);
88 #endif
89 --
90 1.6.6.1