Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a1cefe8 authored by Eduardo Valentin's avatar Eduardo Valentin Committed by Greg Kroah-Hartman
Browse files

staging: omap-thermal: document omap_bandgap_add_hyst function



Document function to handle hysteresis.

Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0f0ed7de
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -303,6 +303,16 @@ int omap_bandgap_mcelsius_to_adc(struct omap_bandgap *bg_ptr, long temp,
	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)