diff options
| author | Jean Pihet <j-pihet@ti.com> | 2012-04-24 00:52:12 -0400 |
|---|---|---|
| committer | Kevin Hilman <khilman@ti.com> | 2012-05-31 19:03:43 -0400 |
| commit | 80821c9c90427dd0f9274a82f9d69e43300d10bb (patch) | |
| tree | 3da631260b188c16a85d989e00ea7aab6fc2caf2 /include/linux/power | |
| parent | b86aeafc766b71f6d55e54ed2c77fdf7f56ec1ba (diff) | |
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.h | 31 |
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 @@ | |||
| 143 | #define OMAP3430_SR_ERRWEIGHT 0x04 | 143 | #define OMAP3430_SR_ERRWEIGHT 0x04 |
| 144 | #define OMAP3430_SR_ERRMAXLIMIT 0x02 | 144 | #define OMAP3430_SR_ERRMAXLIMIT 0x02 |
| 145 | 145 | ||
| 146 | struct omap_sr { | ||
| 147 | struct list_head node; | ||
| 148 | struct platform_device *pdev; | ||
| 149 | struct omap_sr_nvalue_table *nvalue_table; | ||
| 150 | struct voltagedomain *voltdm; | ||
| 151 | struct dentry *dbg_dir; | ||
| 152 | unsigned int irq; | ||
| 153 | int srid; | ||
| 154 | int ip_type; | ||
| 155 | int nvalue_count; | ||
| 156 | bool autocomp_active; | ||
| 157 | u32 clk_length; | ||
| 158 | u32 err_weight; | ||
| 159 | u32 err_minlimit; | ||
| 160 | u32 err_maxlimit; | ||
| 161 | u32 accum_data; | ||
| 162 | u32 senn_avgweight; | ||
| 163 | u32 senp_avgweight; | ||
| 164 | u32 senp_mod; | ||
| 165 | u32 senn_mod; | ||
| 166 | void __iomem *base; | ||
| 167 | }; | ||
| 168 | |||
| 146 | /** | 169 | /** |
| 147 | * struct omap_sr_pmic_data - Strucutre to be populated by pmic code to pass | 170 | * struct omap_sr_pmic_data - Strucutre to be populated by pmic code to pass |
| 148 | * pmic specific info to smartreflex driver | 171 | * pmic specific info to smartreflex driver |
| @@ -187,10 +210,10 @@ struct omap_smartreflex_dev_attr { | |||
| 187 | * based decisions. | 210 | * based decisions. |
| 188 | */ | 211 | */ |
| 189 | struct omap_sr_class_data { | 212 | struct omap_sr_class_data { |
| 190 | int (*enable)(struct voltagedomain *voltdm); | 213 | int (*enable)(struct omap_sr *sr); |
| 191 | int (*disable)(struct voltagedomain *voltdm, int is_volt_reset); | 214 | int (*disable)(struct omap_sr *sr, int is_volt_reset); |
| 192 | int (*configure)(struct voltagedomain *voltdm); | 215 | int (*configure)(struct omap_sr *sr); |
| 193 | int (*notify)(struct voltagedomain *voltdm, u32 status); | 216 | int (*notify)(struct omap_sr *sr, u32 status); |
| 194 | u8 notify_flags; | 217 | u8 notify_flags; |
| 195 | u8 class_type; | 218 | u8 class_type; |
| 196 | }; | 219 | }; |
