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>
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
Reference in New Issue
Block a user