summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorEduardo Valentin <eduardo.valentin@ti.com>2013-03-15 13:00:17 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-15 16:02:22 (GMT)
commit8a1cefe857ae936d5a5f731eb301737139434580 (patch)
treeebfa392c74919ae79a4531578e3cb280c2626558 /drivers
parent0f0ed7dee23ff06456c13ad4f30829ccb761834b (diff)
downloadlinux-fsl-qoriq-8a1cefe857ae936d5a5f731eb301737139434580.tar.xz
staging: omap-thermal: document omap_bandgap_add_hyst function
Document function to handle hysteresis. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/omap-thermal/omap-bandgap.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap-thermal/omap-bandgap.c
index 7b10d18..bff4b75 100644
--- a/drivers/staging/omap-thermal/omap-bandgap.c
+++ b/drivers/staging/omap-thermal/omap-bandgap.c
@@ -303,6 +303,16 @@ exit:
return ret;
}
+/**
+ * omap_bandgap_add_hyst() - add hysteresis (in mCelsius) to an ADC value
+ * @bg_ptr: struct omap_bandgap pointer
+ * @adc_val: temperature value in ADC representation
+ * @hyst_val: hysteresis value in mCelsius
+ * @sum: address where to write the resulting temperature (in ADC scale)
+ *
+ * Adds an hysteresis value (in mCelsius) to a ADC temperature value.
+ * Returns 0 on success, -ERANGE otherwise.
+ */
static
int omap_bandgap_add_hyst(struct omap_bandgap *bg_ptr, int adc_val,
int hyst_val, u32 *sum)