Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
ina2xx.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/jiffies.h>
#include <linux/platform_data/ina2xx.h>

Go to the source code of this file.

Data Structures

struct  ina2xx_config
 
struct  ina2xx_data
 

Macros

#define INA2XX_CONFIG   0x00
 
#define INA2XX_SHUNT_VOLTAGE   0x01 /* readonly */
 
#define INA2XX_BUS_VOLTAGE   0x02 /* readonly */
 
#define INA2XX_POWER   0x03 /* readonly */
 
#define INA2XX_CURRENT   0x04 /* readonly */
 
#define INA2XX_CALIBRATION   0x05
 
#define INA226_MASK_ENABLE   0x06
 
#define INA226_ALERT_LIMIT   0x07
 
#define INA226_DIE_ID   0xFF
 
#define INA219_REGISTERS   6
 
#define INA226_REGISTERS   8
 
#define INA2XX_MAX_REGISTERS   8
 
#define INA219_CONFIG_DEFAULT   0x399F /* PGA=8 */
 
#define INA226_CONFIG_DEFAULT   0x4527 /* averages=16 */
 
#define INA2XX_CONVERSION_RATE   15
 

Enumerations

enum  ina2xx_ids { ina219, ina226 }
 

Functions

 MODULE_DEVICE_TABLE (i2c, ina2xx_id)
 
 MODULE_AUTHOR ("Lothar Felten <l[email protected]>")
 
 MODULE_DESCRIPTION ("ina2xx driver")
 
 MODULE_LICENSE ("GPL")
 
 module_init (ina2xx_init)
 
 module_exit (ina2xx_exit)
 

Macro Definition Documentation

#define INA219_CONFIG_DEFAULT   0x399F /* PGA=8 */

Definition at line 61 of file ina2xx.c.

#define INA219_REGISTERS   6

Definition at line 55 of file ina2xx.c.

#define INA226_ALERT_LIMIT   0x07

Definition at line 50 of file ina2xx.c.

#define INA226_CONFIG_DEFAULT   0x4527 /* averages=16 */

Definition at line 62 of file ina2xx.c.

#define INA226_DIE_ID   0xFF

Definition at line 51 of file ina2xx.c.

#define INA226_MASK_ENABLE   0x06

Definition at line 49 of file ina2xx.c.

#define INA226_REGISTERS   8

Definition at line 56 of file ina2xx.c.

#define INA2XX_BUS_VOLTAGE   0x02 /* readonly */

Definition at line 43 of file ina2xx.c.

#define INA2XX_CALIBRATION   0x05

Definition at line 46 of file ina2xx.c.

#define INA2XX_CONFIG   0x00

Definition at line 41 of file ina2xx.c.

#define INA2XX_CONVERSION_RATE   15

Definition at line 65 of file ina2xx.c.

#define INA2XX_CURRENT   0x04 /* readonly */

Definition at line 45 of file ina2xx.c.

#define INA2XX_MAX_REGISTERS   8

Definition at line 58 of file ina2xx.c.

#define INA2XX_POWER   0x03 /* readonly */

Definition at line 44 of file ina2xx.c.

#define INA2XX_SHUNT_VOLTAGE   0x01 /* readonly */

Definition at line 42 of file ina2xx.c.

Enumeration Type Documentation

enum ina2xx_ids
Enumerator:
ina219 
ina226 

Definition at line 67 of file ina2xx.c.

Function Documentation

MODULE_AUTHOR ( "Lothar Felten <l[email protected]>"  )
MODULE_DESCRIPTION ( "ina2xx driver )
MODULE_DEVICE_TABLE ( i2c  ,
ina2xx_id   
)
module_exit ( ina2xx_exit  )
module_init ( ina2xx_init  )
MODULE_LICENSE ( "GPL"  )