Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
omap-bandgap.c File Reference
#include <linux/module.h>
#include <linux/export.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/interrupt.h>
#include <linux/clk.h>
#include <linux/gpio.h>
#include <linux/platform_device.h>
#include <linux/err.h>
#include <linux/types.h>
#include <linux/mutex.h>
#include <linux/reboot.h>
#include <linux/of_device.h>
#include <linux/of_platform.h>
#include <linux/of_irq.h>
#include "omap-bandgap.h"

Go to the source code of this file.

Macros

#define bandgap_is_valid(b)   (!IS_ERR_OR_NULL(b))
 
#define bandgap_is_valid_sensor_id(b, i)   ((i) >= 0 && (i) < (b)->conf->sensor_count)
 
#define DEV_PM_OPS   NULL
 

Functions

int omap_bandgap_read_thot (struct omap_bandgap *bg_ptr, int id, int *thot)
 
int omap_bandgap_write_thot (struct omap_bandgap *bg_ptr, int id, int val)
 
int omap_bandgap_read_tcold (struct omap_bandgap *bg_ptr, int id, int *tcold)
 
int omap_bandgap_write_tcold (struct omap_bandgap *bg_ptr, int id, int val)
 
int omap_bandgap_read_update_interval (struct omap_bandgap *bg_ptr, int id, int *interval)
 
int omap_bandgap_write_update_interval (struct omap_bandgap *bg_ptr, int id, u32 interval)
 
int omap_bandgap_read_temperature (struct omap_bandgap *bg_ptr, int id, int *temperature)
 
int omap_bandgap_set_sensor_data (struct omap_bandgap *bg_ptr, int id, void *data)
 
voidomap_bandgap_get_sensor_data (struct omap_bandgap *bg_ptr, int id)
 
 MODULE_DEVICE_TABLE (of, of_omap_bandgap_match)
 
 module_platform_driver (omap_bandgap_sensor_driver)
 
 MODULE_DESCRIPTION ("OMAP4+ bandgap temperature sensor driver")
 
 MODULE_LICENSE ("GPL v2")
 
 MODULE_ALIAS ("platform:omap-bandgap")
 
 MODULE_AUTHOR ("Texas Instrument Inc.")
 

Macro Definition Documentation

#define bandgap_is_valid (   b)    (!IS_ERR_OR_NULL(b))

Definition at line 372 of file omap-bandgap.c.

#define bandgap_is_valid_sensor_id (   b,
  i 
)    ((i) >= 0 && (i) < (b)->conf->sensor_count)

Definition at line 374 of file omap-bandgap.c.

#define DEV_PM_OPS   NULL

Definition at line 1144 of file omap-bandgap.c.

Function Documentation

MODULE_ALIAS ( "platform:omap-bandgap"  )
MODULE_AUTHOR ( "Texas Instrument Inc."  )
MODULE_DESCRIPTION ( "OMAP4+ bandgap temperature sensor driver )
MODULE_DEVICE_TABLE ( of  ,
of_omap_bandgap_match   
)
MODULE_LICENSE ( "GPL v2 )
module_platform_driver ( omap_bandgap_sensor_driver  )
void* omap_bandgap_get_sensor_data ( struct omap_bandgap bg_ptr,
int  id 
)

omap_bandgap_get_sensor_data() - helper function to get thermal framework related data. - pointer to bandgap instance - sensor id

returns data stored by set function with sensor id on success or NULL

Definition at line 662 of file omap-bandgap.c.

int omap_bandgap_read_tcold ( struct omap_bandgap bg_ptr,
int  id,
int tcold 
)

omap_bandgap_read_tcold() - reads sensor current tcold - pointer to bandgap instance - sensor id - resulting current tcold value

returns 0 on success or the proper error code

Definition at line 476 of file omap-bandgap.c.

int omap_bandgap_read_temperature ( struct omap_bandgap bg_ptr,
int  id,
int temperature 
)

omap_bandgap_read_temperature() - report current temperature - pointer to bandgap instance - sensor id - resulting temperature

returns 0 on success or the proper error code

Definition at line 609 of file omap-bandgap.c.

int omap_bandgap_read_thot ( struct omap_bandgap bg_ptr,
int  id,
int thot 
)

omap_bandgap_read_thot() - reads sensor current thot - pointer to bandgap instance - sensor id - resulting current thot value

returns 0 on success or the proper error code

Definition at line 401 of file omap-bandgap.c.

int omap_bandgap_read_update_interval ( struct omap_bandgap bg_ptr,
int  id,
int interval 
)

omap_bandgap_read_update_interval() - read the sensor update interval - pointer to bandgap instance - sensor id - resulting update interval in miliseconds

returns 0 on success or the proper error code

Definition at line 549 of file omap-bandgap.c.

int omap_bandgap_set_sensor_data ( struct omap_bandgap bg_ptr,
int  id,
void data 
)

omap_bandgap_set_sensor_data() - helper function to store thermal framework related data. - pointer to bandgap instance - sensor id - thermal framework related data to be stored

returns 0 on success or the proper error code

Definition at line 642 of file omap-bandgap.c.

int omap_bandgap_write_tcold ( struct omap_bandgap bg_ptr,
int  id,
int  val 
)

omap_bandgap_write_tcold() - sets the sensor tcold - pointer to bandgap instance - sensor id - desired tcold value

returns 0 on success or the proper error code

Definition at line 511 of file omap-bandgap.c.

int omap_bandgap_write_thot ( struct omap_bandgap bg_ptr,
int  id,
int  val 
)

omap_bandgap_write_thot() - sets sensor current thot - pointer to bandgap instance - sensor id - desired thot value

returns 0 on success or the proper error code

Definition at line 438 of file omap-bandgap.c.

int omap_bandgap_write_update_interval ( struct omap_bandgap bg_ptr,
int  id,
u32  interval 
)

omap_bandgap_write_update_interval() - set the update interval - pointer to bandgap instance - sensor id - desired update interval in miliseconds

returns 0 on success or the proper error code

Definition at line 583 of file omap-bandgap.c.