aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/vp.c30
-rw-r--r--arch/arm/mach-omap2/vp.h2
2 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c
index 7ccf0a3..3989cfd 100644
--- a/arch/arm/mach-omap2/vp.c
+++ b/arch/arm/mach-omap2/vp.c
@@ -105,6 +105,36 @@ void __init omap_vp_init(struct voltagedomain *voltdm)
voltdm->write(val, vp->vlimitto);
}
+/**
+ * omap_vp_is_transdone() - is voltage transfer done on vp?
+ * @voltdm: pointer to the VDD which is to be scaled.
+ *
+ * VP's transdone bit is the only way to ensure that the transfer
+ * of the voltage value has actually been send over to the PMIC
+ * This is hence useful for all users of voltage domain to precisely
+ * identify once the PMIC voltage has been set by the voltage processor
+ */
+bool omap_vp_is_transdone(struct voltagedomain *voltdm)
+{
+
+ struct omap_vp_instance *vp = voltdm->vp;
+
+ return vp->common->ops->check_txdone(vp->id) ? true : false;
+}
+
+/**
+ * omap_vp_clear_transdone() - clear voltage transfer done status on vp
+ * @voltdm: pointer to the VDD which is to be scaled.
+ */
+void omap_vp_clear_transdone(struct voltagedomain *voltdm)
+{
+ struct omap_vp_instance *vp = voltdm->vp;
+
+ vp->common->ops->clear_txdone(vp->id);
+
+ return;
+}
+
int omap_vp_update_errorgain(struct voltagedomain *voltdm,
unsigned long target_volt)
{
diff --git a/arch/arm/mach-omap2/vp.h b/arch/arm/mach-omap2/vp.h
index c3a1e69..88381bb 100644
--- a/arch/arm/mach-omap2/vp.h
+++ b/arch/arm/mach-omap2/vp.h
@@ -117,5 +117,7 @@ int omap_vp_forceupdate_scale(struct voltagedomain *voltdm,
struct omap_volt_data *target_v);
int omap_vp_update_errorgain(struct voltagedomain *voltdm,
unsigned long target_volt);
+bool omap_vp_is_transdone(struct voltagedomain *voltdm);
+void omap_vp_clear_transdone(struct voltagedomain *voltdm);
#endif