]> Pileus Git - ~andy/linux/blobdiff - arch/arm/mach-omap2/voltage.h
Merge branch 'master'; commit 'v3.2-rc2' into next
[~andy/linux] / arch / arm / mach-omap2 / voltage.h
index 7f8b00aff394c99e6e94c5a49fd84ebee113a17c..16a1b092cf36902b768010fc899b4defcded7eb3 100644 (file)
@@ -33,8 +33,6 @@ struct powerdomain;
 #define OMAP3_VOLTOFFSET       0xff
 #define OMAP3_VOLTSETUP2       0xff
 
-struct omap_vdd_info;
-
 /**
  * struct omap_vfsm_instance - per-voltage manager FSM register/bitfield
  * data
@@ -60,8 +58,10 @@ struct omap_vfsm_instance {
  * @write: write a VC/VP register
  * @read: read-modify-write a VC/VP register
  * @sys_clk: system clock name/frequency, used for various timing calculations
- * @vdd: to be removed
  * @scale: function used to scale the voltage of the voltagedomain
+ * @nominal_volt: current nominal voltage for this voltage domain
+ * @volt_data: voltage table having the distinct voltages supported
+ *             by the domain and other associated per voltage data.
  */
 struct voltagedomain {
        char *name;
@@ -86,7 +86,8 @@ struct voltagedomain {
        int (*scale) (struct voltagedomain *voltdm,
                      unsigned long target_volt);
 
-       struct omap_vdd_info *vdd;
+       u32 nominal_volt;
+       struct omap_volt_data *volt_data;
 };
 
 /**
@@ -143,42 +144,15 @@ struct omap_voltdm_pmic {
        u8 (*uv_to_vsel) (unsigned long uV);
 };
 
-/**
- * omap_vdd_info - Per Voltage Domain info
- *
- * @volt_data          : voltage table having the distinct voltages supported
- *                       by the domain and other associated per voltage data.
- * @curr_volt          : current voltage for this vdd.
- */
-struct omap_vdd_info {
-       struct omap_volt_data *volt_data;
-       u32 curr_volt;
-};
-
 void omap_voltage_get_volttable(struct voltagedomain *voltdm,
                struct omap_volt_data **volt_data);
 struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,
                unsigned long volt);
-unsigned long omap_voltage_get_nom_volt(struct voltagedomain *voltdm);
-#ifdef CONFIG_PM
 int omap_voltage_register_pmic(struct voltagedomain *voltdm,
                               struct omap_voltdm_pmic *pmic);
 void omap_change_voltscale_method(struct voltagedomain *voltdm,
                int voltscale_method);
 int omap_voltage_late_init(void);
-#else
-static inline int omap_voltage_register_pmic(struct voltagedomain *voltdm,
-                                            struct omap_voltdm_pmic *pmic)
-{
-       return -EINVAL;
-}
-static inline  void omap_change_voltscale_method(struct voltagedomain *voltdm,
-               int voltscale_method) {}
-static inline int omap_voltage_late_init(void)
-{
-       return -EINVAL;
-}
-#endif
 
 extern void omap2xxx_voltagedomains_init(void);
 extern void omap3xxx_voltagedomains_init(void);
@@ -194,4 +168,5 @@ int voltdm_for_each_pwrdm(struct voltagedomain *voltdm,
                                    struct powerdomain *pwrdm));
 int voltdm_scale(struct voltagedomain *voltdm, unsigned long target_volt);
 void voltdm_reset(struct voltagedomain *voltdm);
+unsigned long voltdm_get_voltage(struct voltagedomain *voltdm);
 #endif