summaryrefslogtreecommitdiff
path: root/include/linux/power
diff options
context:
space:
mode:
authorJean Pihet <j-pihet@ti.com>2012-04-24 08:52:12 +0400
committerKevin Hilman <khilman@ti.com>2012-06-01 03:03:43 +0400
commit80821c9c90427dd0f9274a82f9d69e43300d10bb (patch)
tree3da631260b188c16a85d989e00ea7aab6fc2caf2 /include/linux/power
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 'include/linux/power')
-rw-r--r--include/linux/power/smartreflex.h31
1 files changed, 27 insertions, 4 deletions
diff --git a/include/linux/power/smartreflex.h b/include/linux/power/smartreflex.h
index 69eb270c6297..4224698cf8bd 100644
--- a/include/linux/power/smartreflex.h
+++ b/include/linux/power/smartreflex.h
@@ -143,6 +143,29 @@
#define OMAP3430_SR_ERRWEIGHT 0x04
#define OMAP3430_SR_ERRMAXLIMIT 0x02
+struct omap_sr {
+ struct list_head node;
+ struct platform_device *pdev;
+ struct omap_sr_nvalue_table *nvalue_table;
+ struct voltagedomain *voltdm;
+ struct dentry *dbg_dir;
+ unsigned int irq;
+ int srid;
+ int ip_type;
+ int nvalue_count;
+ bool autocomp_active;
+ u32 clk_length;
+ u32 err_weight;
+ u32 err_minlimit;
+ u32 err_maxlimit;
+ u32 accum_data;
+ u32 senn_avgweight;
+ u32 senp_avgweight;
+ u32 senp_mod;
+ u32 senn_mod;
+ void __iomem *base;
+};
+
/**
* struct omap_sr_pmic_data - Strucutre to be populated by pmic code to pass
* pmic specific info to smartreflex driver
@@ -187,10 +210,10 @@ struct omap_smartreflex_dev_attr {
* based decisions.
*/
struct omap_sr_class_data {
- int (*enable)(struct voltagedomain *voltdm);
- int (*disable)(struct voltagedomain *voltdm, int is_volt_reset);
- int (*configure)(struct voltagedomain *voltdm);
- int (*notify)(struct voltagedomain *voltdm, u32 status);
+ int (*enable)(struct omap_sr *sr);
+ int (*disable)(struct omap_sr *sr, int is_volt_reset);
+ int (*configure)(struct omap_sr *sr);
+ int (*notify)(struct omap_sr *sr, u32 status);
u8 notify_flags;
u8 class_type;
};