Skip to content

Commit

Permalink
staging: omap-thermal: add documentation for omap_bandgap_adc_to_mcel…
Browse files Browse the repository at this point in the history
…sius

Document the conversion function.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Eduardo Valentin authored and Greg Kroah-Hartman committed Mar 15, 2013
1 parent 2047059 commit 2577e93
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/staging/omap-thermal/omap-bandgap.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,17 @@ static irqreturn_t omap_bandgap_tshut_irq_handler(int irq, void *data)

/*** Helper functions which manipulate conversion ADC <-> mi Celsius ***/

/**
* omap_bandgap_adc_to_mcelsius() - converts an ADC value to mCelsius scale
* @bg_ptr: struct omap_bandgap pointer
* @id: sensor id
* @adc_val: value in ADC representation
* @t: address where to write the resulting temperature in mCelsius
*
* Simple conversion from ADC representation to mCelsius. In case the ADC value
* is out of the ADC conv table range, it returns -ERANGE, 0 on success.
* The conversion table is indexed by the ADC values.
*/
static
int omap_bandgap_adc_to_mcelsius(struct omap_bandgap *bg_ptr, int id,
int adc_val, int *t)
Expand Down

0 comments on commit 2577e93

Please sign in to comment.