OMAP3+: voltage: convert to PRM register access functions
[pandora-kernel.git] / arch / arm / mach-omap2 / voltage.h
index ea6bb98..6a19cf3 100644 (file)
@@ -59,6 +59,9 @@ struct omap_vfsm_instance_data {
  * @node: list_head linking all voltage domains
  * @pwrdm_list: list_head linking all powerdomains in this voltagedomain
  * @vc: pointer to VC channel associated with this voltagedomain
+ * @read: read a VC/VP register
+ * @write: write a VC/VP register
+ * @read: read-modify-write a VC/VP register
  * @vdd: to be removed
  */
 struct voltagedomain {
@@ -68,6 +71,11 @@ struct voltagedomain {
        struct list_head pwrdm_list;
        struct omap_vc_channel *vc;
 
+       /* VC/VP register access functions: SoC specific */
+       u32 (*read) (u8 offset);
+       void (*write) (u32 val, u8 offset);
+       u32 (*rmw)(u32 mask, u32 bits, u8 offset);
+
        struct omap_vdd_info *vdd;
 };
 
@@ -96,6 +104,8 @@ struct omap_volt_data {
  * @step_size: PMIC voltage step size (in uv)
  * @vsel_to_uv:        PMIC API to convert vsel value to actual voltage in uV.
  * @uv_to_vsel:        PMIC API to convert voltage in uV to vsel value.
+ * @volt_reg_addr: voltage configuration register address
+ * @cmd_reg_addr: command (on, on-LP, ret, off) configuration register address
  */
 struct omap_volt_pmic_info {
        int slew_rate;
@@ -112,7 +122,8 @@ struct omap_volt_pmic_info {
        u8 vp_vddmax;
        u8 vp_timeout_us;
        u8 i2c_slave_addr;
-       u8 pmic_reg;
+       u8 volt_reg_addr;
+       u8 cmd_reg_addr;
        unsigned long (*vsel_to_uv) (const u8 vsel);
        u8 (*uv_to_vsel) (unsigned long uV);
 };
@@ -130,7 +141,6 @@ struct omap_volt_pmic_info {
  * @vfsm                : voltage manager FSM data
  * @debug_dir          : debug directory for this voltage domain.
  * @curr_volt          : current voltage for this vdd.
- * @prm_irqst_mod       : PRM module id used for PRM IRQ status register access
  * @vp_enabled         : flag to keep track of whether vp is enabled or not
  * @volt_scale         : API to scale the voltage of the vdd.
  */
@@ -144,10 +154,6 @@ struct omap_vdd_info {
        u32 curr_volt;
        bool vp_enabled;
 
-       s16 prm_irqst_mod;
-       u8 prm_irqst_reg;
-       u32 (*read_reg) (u16 mod, u8 offset);
-       void (*write_reg) (u32 val, u16 mod, u8 offset);
        int (*volt_scale) (struct voltagedomain *voltdm,
                unsigned long target_volt);
 };