summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/smartreflex-class3.c
diff options
context:
space:
mode:
authorJean Pihet <j-pihet@ti.com>2012-04-24 04:52:12 (GMT)
committerKevin Hilman <khilman@ti.com>2012-05-31 23:03:43 (GMT)
commit80821c9c90427dd0f9274a82f9d69e43300d10bb (patch)
tree3da631260b188c16a85d989e00ea7aab6fc2caf2 /arch/arm/mach-omap2/smartreflex-class3.c
parentb86aeafc766b71f6d55e54ed2c77fdf7f56ec1ba (diff)
downloadlinux-80821c9c90427dd0f9274a82f9d69e43300d10bb.tar.xz
ARM: OMAP3+: SmartReflex: class drivers should use struct omap_sr *
Convert SmartReflex "class" functions to take a struct omap_sr *, rather than a struct voltagedomain *. SmartReflex code should be driver code and not tightly coupled to OMAP subarchitecture-specific structures. Based on Paul's original code for the SmartReflex driver conversion. Signed-off-by: Jean Pihet <j-pihet@ti.com> Signed-off-by: J Keerthy <j-keerthy@ti.com> Reviewed-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/smartreflex-class3.c')
-rw-r--r--arch/arm/mach-omap2/smartreflex-class3.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/arm/mach-omap2/smartreflex-class3.c b/arch/arm/mach-omap2/smartreflex-class3.c
index ab8cf83..9381654 100644
--- a/arch/arm/mach-omap2/smartreflex-class3.c
+++ b/arch/arm/mach-omap2/smartreflex-class3.c
@@ -14,34 +14,34 @@
#include <linux/power/smartreflex.h>
#include "voltage.h"
-static int sr_class3_enable(struct voltagedomain *voltdm)
+static int sr_class3_enable(struct omap_sr *sr)
{
- unsigned long volt = voltdm_get_voltage(voltdm);
+ unsigned long volt = voltdm_get_voltage(sr->voltdm);
if (!volt) {
pr_warning("%s: Curr voltage unknown. Cannot enable sr_%s\n",
- __func__, voltdm->name);
+ __func__, sr->voltdm->name);
return -ENODATA;
}
- omap_vp_enable(voltdm);
- return sr_enable(voltdm, volt);
+ omap_vp_enable(sr->voltdm);
+ return sr_enable(sr->voltdm, volt);
}
-static int sr_class3_disable(struct voltagedomain *voltdm, int is_volt_reset)
+static int sr_class3_disable(struct omap_sr *sr, int is_volt_reset)
{
- sr_disable_errgen(voltdm);
- omap_vp_disable(voltdm);
- sr_disable(voltdm);
+ sr_disable_errgen(sr->voltdm);
+ omap_vp_disable(sr->voltdm);
+ sr_disable(sr->voltdm);
if (is_volt_reset)
- voltdm_reset(voltdm);
+ voltdm_reset(sr->voltdm);
return 0;
}
-static int sr_class3_configure(struct voltagedomain *voltdm)
+static int sr_class3_configure(struct omap_sr *sr)
{
- return sr_configure_errgen(voltdm);
+ return sr_configure_errgen(sr->voltdm);
}
/* SR class3 structure */