Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
w1_ds2760.h File Reference

Go to the source code of this file.

Macros

#define W1_DS2760_SWAP   0xAA
 
#define W1_DS2760_READ_DATA   0x69
 
#define W1_DS2760_WRITE_DATA   0x6C
 
#define W1_DS2760_COPY_DATA   0x48
 
#define W1_DS2760_RECALL_DATA   0xB8
 
#define W1_DS2760_LOCK   0x6A
 
#define DS2760_DATA_SIZE   0x40
 
#define DS2760_PROTECTION_REG   0x00
 
#define DS2760_STATUS_REG   0x01
 
#define DS2760_STATUS_IE   (1 << 2)
 
#define DS2760_STATUS_SWEN   (1 << 3)
 
#define DS2760_STATUS_RNAOP   (1 << 4)
 
#define DS2760_STATUS_PMOD   (1 << 5)
 
#define DS2760_EEPROM_REG   0x07
 
#define DS2760_SPECIAL_FEATURE_REG   0x08
 
#define DS2760_VOLTAGE_MSB   0x0c
 
#define DS2760_VOLTAGE_LSB   0x0d
 
#define DS2760_CURRENT_MSB   0x0e
 
#define DS2760_CURRENT_LSB   0x0f
 
#define DS2760_CURRENT_ACCUM_MSB   0x10
 
#define DS2760_CURRENT_ACCUM_LSB   0x11
 
#define DS2760_TEMP_MSB   0x18
 
#define DS2760_TEMP_LSB   0x19
 
#define DS2760_EEPROM_BLOCK0   0x20
 
#define DS2760_ACTIVE_FULL   0x20
 
#define DS2760_EEPROM_BLOCK1   0x30
 
#define DS2760_STATUS_WRITE_REG   0x31
 
#define DS2760_RATED_CAPACITY   0x32
 
#define DS2760_CURRENT_OFFSET_BIAS   0x33
 
#define DS2760_ACTIVE_EMPTY   0x3b
 

Functions

int w1_ds2760_read (struct device *dev, char *buf, int addr, size_t count)
 
int w1_ds2760_write (struct device *dev, char *buf, int addr, size_t count)
 
int w1_ds2760_store_eeprom (struct device *dev, int addr)
 
int w1_ds2760_recall_eeprom (struct device *dev, int addr)
 

Macro Definition Documentation

#define DS2760_ACTIVE_EMPTY   0x3b

Definition at line 48 of file w1_ds2760.h.

#define DS2760_ACTIVE_FULL   0x20

Definition at line 43 of file w1_ds2760.h.

#define DS2760_CURRENT_ACCUM_LSB   0x11

Definition at line 39 of file w1_ds2760.h.

#define DS2760_CURRENT_ACCUM_MSB   0x10

Definition at line 38 of file w1_ds2760.h.

#define DS2760_CURRENT_LSB   0x0f

Definition at line 37 of file w1_ds2760.h.

#define DS2760_CURRENT_MSB   0x0e

Definition at line 36 of file w1_ds2760.h.

#define DS2760_CURRENT_OFFSET_BIAS   0x33

Definition at line 47 of file w1_ds2760.h.

#define DS2760_DATA_SIZE   0x40

Definition at line 24 of file w1_ds2760.h.

#define DS2760_EEPROM_BLOCK0   0x20

Definition at line 42 of file w1_ds2760.h.

#define DS2760_EEPROM_BLOCK1   0x30

Definition at line 44 of file w1_ds2760.h.

#define DS2760_EEPROM_REG   0x07

Definition at line 32 of file w1_ds2760.h.

#define DS2760_PROTECTION_REG   0x00

Definition at line 26 of file w1_ds2760.h.

#define DS2760_RATED_CAPACITY   0x32

Definition at line 46 of file w1_ds2760.h.

#define DS2760_SPECIAL_FEATURE_REG   0x08

Definition at line 33 of file w1_ds2760.h.

#define DS2760_STATUS_IE   (1 << 2)

Definition at line 28 of file w1_ds2760.h.

#define DS2760_STATUS_PMOD   (1 << 5)

Definition at line 31 of file w1_ds2760.h.

#define DS2760_STATUS_REG   0x01

Definition at line 27 of file w1_ds2760.h.

#define DS2760_STATUS_RNAOP   (1 << 4)

Definition at line 30 of file w1_ds2760.h.

#define DS2760_STATUS_SWEN   (1 << 3)

Definition at line 29 of file w1_ds2760.h.

#define DS2760_STATUS_WRITE_REG   0x31

Definition at line 45 of file w1_ds2760.h.

#define DS2760_TEMP_LSB   0x19

Definition at line 41 of file w1_ds2760.h.

#define DS2760_TEMP_MSB   0x18

Definition at line 40 of file w1_ds2760.h.

#define DS2760_VOLTAGE_LSB   0x0d

Definition at line 35 of file w1_ds2760.h.

#define DS2760_VOLTAGE_MSB   0x0c

Definition at line 34 of file w1_ds2760.h.

#define W1_DS2760_COPY_DATA   0x48

Definition at line 19 of file w1_ds2760.h.

#define W1_DS2760_LOCK   0x6A

Definition at line 21 of file w1_ds2760.h.

#define W1_DS2760_READ_DATA   0x69

Definition at line 17 of file w1_ds2760.h.

#define W1_DS2760_RECALL_DATA   0xB8

Definition at line 20 of file w1_ds2760.h.

#define W1_DS2760_SWAP   0xAA

Definition at line 16 of file w1_ds2760.h.

#define W1_DS2760_WRITE_DATA   0x6C

Definition at line 18 of file w1_ds2760.h.

Function Documentation

int w1_ds2760_read ( struct device dev,
char buf,
int  addr,
size_t  count 
)

Definition at line 62 of file w1_ds2760.c.

int w1_ds2760_recall_eeprom ( struct device dev,
int  addr 
)

Definition at line 95 of file w1_ds2760.c.

int w1_ds2760_store_eeprom ( struct device dev,
int  addr 
)

Definition at line 90 of file w1_ds2760.c.

int w1_ds2760_write ( struct device dev,
char buf,
int  addr,
size_t  count 
)

Definition at line 67 of file w1_ds2760.c.