Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
ltc4261.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>

Go to the source code of this file.

Data Structures

struct  ltc4261_data
 

Macros

#define LTC4261_STATUS   0x00 /* readonly */
 
#define LTC4261_FAULT   0x01
 
#define LTC4261_ALERT   0x02
 
#define LTC4261_CONTROL   0x03
 
#define LTC4261_SENSE_H   0x04
 
#define LTC4261_SENSE_L   0x05
 
#define LTC4261_ADIN2_H   0x06
 
#define LTC4261_ADIN2_L   0x07
 
#define LTC4261_ADIN_H   0x08
 
#define LTC4261_ADIN_L   0x09
 
#define FAULT_OV   (1<<0)
 
#define FAULT_UV   (1<<1)
 
#define FAULT_OC   (1<<2)
 
#define LTC4261_VALUE(name, ltc4261_cmd_idx)
 
#define LTC4261_BOOL(name, mask)
 

Functions

 LTC4261_VALUE (in1_input, LTC4261_ADIN_H)
 
 LTC4261_VALUE (in2_input, LTC4261_ADIN2_H)
 
 LTC4261_BOOL (in1_min_alarm, FAULT_UV)
 
 LTC4261_BOOL (in1_max_alarm, FAULT_OV)
 
 LTC4261_BOOL (in2_min_alarm, FAULT_UV)
 
 LTC4261_BOOL (in2_max_alarm, FAULT_OV)
 
 LTC4261_VALUE (curr1_input, LTC4261_SENSE_H)
 
 LTC4261_BOOL (curr1_max_alarm, FAULT_OC)
 
 MODULE_DEVICE_TABLE (i2c, ltc4261_id)
 
 module_i2c_driver (ltc4261_driver)
 
 MODULE_AUTHOR ("Guenter Roeck <[email protected]>")
 
 MODULE_DESCRIPTION ("LTC4261 driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define FAULT_OC   (1<<2)

Definition at line 55 of file ltc4261.c.

#define FAULT_OV   (1<<0)

Definition at line 53 of file ltc4261.c.

#define FAULT_UV   (1<<1)

Definition at line 54 of file ltc4261.c.

#define LTC4261_ADIN2_H   0x06

Definition at line 45 of file ltc4261.c.

#define LTC4261_ADIN2_L   0x07

Definition at line 46 of file ltc4261.c.

#define LTC4261_ADIN_H   0x08

Definition at line 47 of file ltc4261.c.

#define LTC4261_ADIN_L   0x09

Definition at line 48 of file ltc4261.c.

#define LTC4261_ALERT   0x02

Definition at line 41 of file ltc4261.c.

#define LTC4261_BOOL (   name,
  mask 
)
Value:
ltc4261_show_bool, NULL, (mask))

Definition at line 177 of file ltc4261.c.

#define LTC4261_CONTROL   0x03

Definition at line 42 of file ltc4261.c.

#define LTC4261_FAULT   0x01

Definition at line 40 of file ltc4261.c.

#define LTC4261_SENSE_H   0x04

Definition at line 43 of file ltc4261.c.

#define LTC4261_SENSE_L   0x05

Definition at line 44 of file ltc4261.c.

#define LTC4261_STATUS   0x00 /* readonly */

Definition at line 39 of file ltc4261.c.

#define LTC4261_VALUE (   name,
  ltc4261_cmd_idx 
)
Value:
ltc4261_show_value, NULL, ltc4261_cmd_idx)

Definition at line 173 of file ltc4261.c.

Function Documentation

LTC4261_BOOL ( in1_min_alarm  ,
FAULT_UV   
)
LTC4261_BOOL ( in1_max_alarm  ,
FAULT_OV   
)
LTC4261_BOOL ( in2_min_alarm  ,
FAULT_UV   
)
LTC4261_BOOL ( in2_max_alarm  ,
FAULT_OV   
)
LTC4261_BOOL ( curr1_max_alarm  ,
FAULT_OC   
)
LTC4261_VALUE ( in1_input  ,
LTC4261_ADIN_H   
)
LTC4261_VALUE ( in2_input  ,
LTC4261_ADIN2_H   
)
LTC4261_VALUE ( curr1_input  ,
LTC4261_SENSE_H   
)
MODULE_AUTHOR ( "Guenter Roeck <[email protected]>"  )
MODULE_DESCRIPTION ( "LTC4261 driver )
MODULE_DEVICE_TABLE ( i2c  ,
ltc4261_id   
)
module_i2c_driver ( ltc4261_driver  )
MODULE_LICENSE ( "GPL"  )