Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
rtc-rv3029c2.c File Reference
#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/bcd.h>
#include <linux/rtc.h>

Go to the source code of this file.

Macros

#define RV3029C2_ONOFF_CTRL   0x00
 
#define RV3029C2_IRQ_CTRL   0x01
 
#define RV3029C2_IRQ_CTRL_AIE   (1 << 0)
 
#define RV3029C2_IRQ_FLAGS   0x02
 
#define RV3029C2_IRQ_FLAGS_AF   (1 << 0)
 
#define RV3029C2_STATUS   0x03
 
#define RV3029C2_STATUS_VLOW1   (1 << 2)
 
#define RV3029C2_STATUS_VLOW2   (1 << 3)
 
#define RV3029C2_STATUS_SR   (1 << 4)
 
#define RV3029C2_STATUS_PON   (1 << 5)
 
#define RV3029C2_STATUS_EEBUSY   (1 << 7)
 
#define RV3029C2_RST_CTRL   0x04
 
#define RV3029C2_CONTROL_SECTION_LEN   0x05
 
#define RV3029C2_W_SEC   0x08
 
#define RV3029C2_W_MINUTES   0x09
 
#define RV3029C2_W_HOURS   0x0A
 
#define RV3029C2_REG_HR_12_24   (1<<6) /* 24h/12h mode */
 
#define RV3029C2_REG_HR_PM   (1<<5) /* PM/AM bit in 12h mode */
 
#define RV3029C2_W_DATE   0x0B
 
#define RV3029C2_W_DAYS   0x0C
 
#define RV3029C2_W_MONTHS   0x0D
 
#define RV3029C2_W_YEARS   0x0E
 
#define RV3029C2_WATCH_SECTION_LEN   0x07
 
#define RV3029C2_A_SC   0x10
 
#define RV3029C2_A_MN   0x11
 
#define RV3029C2_A_HR   0x12
 
#define RV3029C2_A_DT   0x13
 
#define RV3029C2_A_DW   0x14
 
#define RV3029C2_A_MO   0x15
 
#define RV3029C2_A_YR   0x16
 
#define RV3029C2_ALARM_SECTION_LEN   0x07
 
#define RV3029C2_TIMER_LOW   0x18
 
#define RV3029C2_TIMER_HIGH   0x19
 
#define RV3029C2_TEMP_PAGE   0x20
 
#define RV3029C2_E2P_EEDATA1   0x28
 
#define RV3029C2_E2P_EEDATA2   0x29
 
#define RV3029C2_CONTROL_E2P_EECTRL   0x30
 
#define RV3029C2_TRICKLE_1K   (1<<0) /* 1K resistance */
 
#define RV3029C2_TRICKLE_5K   (1<<1) /* 5K resistance */
 
#define RV3029C2_TRICKLE_20K   (1<<2) /* 20K resistance */
 
#define RV3029C2_TRICKLE_80K   (1<<3) /* 80K resistance */
 
#define RV3029C2_CONTROL_E2P_XTALOFFSET   0x31
 
#define RV3029C2_CONTROL_E2P_QCOEF   0x32
 
#define RV3029C2_CONTROL_E2P_TURNOVER   0x33
 
#define RV3029C2_USR1_RAM_PAGE   0x38
 
#define RV3029C2_USR1_SECTION_LEN   0x04
 
#define RV3029C2_USR2_RAM_PAGE   0x3C
 
#define RV3029C2_USR2_SECTION_LEN   0x04
 

Functions

 MODULE_DEVICE_TABLE (i2c, rv3029c2_id)
 
 module_i2c_driver (rv3029c2_driver)
 
 MODULE_AUTHOR ("Gregory Hermant <[email protected]>")
 
 MODULE_DESCRIPTION ("Micro Crystal RV3029C2 RTC driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define RV3029C2_A_DT   0x13

Definition at line 54 of file rtc-rv3029c2.c.

#define RV3029C2_A_DW   0x14

Definition at line 55 of file rtc-rv3029c2.c.

#define RV3029C2_A_HR   0x12

Definition at line 53 of file rtc-rv3029c2.c.

#define RV3029C2_A_MN   0x11

Definition at line 52 of file rtc-rv3029c2.c.

#define RV3029C2_A_MO   0x15

Definition at line 56 of file rtc-rv3029c2.c.

#define RV3029C2_A_SC   0x10

Definition at line 51 of file rtc-rv3029c2.c.

#define RV3029C2_A_YR   0x16

Definition at line 57 of file rtc-rv3029c2.c.

#define RV3029C2_ALARM_SECTION_LEN   0x07

Definition at line 58 of file rtc-rv3029c2.c.

#define RV3029C2_CONTROL_E2P_EECTRL   0x30

Definition at line 72 of file rtc-rv3029c2.c.

#define RV3029C2_CONTROL_E2P_QCOEF   0x32

Definition at line 78 of file rtc-rv3029c2.c.

#define RV3029C2_CONTROL_E2P_TURNOVER   0x33

Definition at line 79 of file rtc-rv3029c2.c.

#define RV3029C2_CONTROL_E2P_XTALOFFSET   0x31

Definition at line 77 of file rtc-rv3029c2.c.

#define RV3029C2_CONTROL_SECTION_LEN   0x05

Definition at line 36 of file rtc-rv3029c2.c.

#define RV3029C2_E2P_EEDATA1   0x28

Definition at line 68 of file rtc-rv3029c2.c.

#define RV3029C2_E2P_EEDATA2   0x29

Definition at line 69 of file rtc-rv3029c2.c.

#define RV3029C2_IRQ_CTRL   0x01

Definition at line 25 of file rtc-rv3029c2.c.

#define RV3029C2_IRQ_CTRL_AIE   (1 << 0)

Definition at line 26 of file rtc-rv3029c2.c.

#define RV3029C2_IRQ_FLAGS   0x02

Definition at line 27 of file rtc-rv3029c2.c.

#define RV3029C2_IRQ_FLAGS_AF   (1 << 0)

Definition at line 28 of file rtc-rv3029c2.c.

#define RV3029C2_ONOFF_CTRL   0x00

Definition at line 24 of file rtc-rv3029c2.c.

#define RV3029C2_REG_HR_12_24   (1<<6) /* 24h/12h mode */

Definition at line 42 of file rtc-rv3029c2.c.

#define RV3029C2_REG_HR_PM   (1<<5) /* PM/AM bit in 12h mode */

Definition at line 43 of file rtc-rv3029c2.c.

#define RV3029C2_RST_CTRL   0x04

Definition at line 35 of file rtc-rv3029c2.c.

#define RV3029C2_STATUS   0x03

Definition at line 29 of file rtc-rv3029c2.c.

#define RV3029C2_STATUS_EEBUSY   (1 << 7)

Definition at line 34 of file rtc-rv3029c2.c.

#define RV3029C2_STATUS_PON   (1 << 5)

Definition at line 33 of file rtc-rv3029c2.c.

#define RV3029C2_STATUS_SR   (1 << 4)

Definition at line 32 of file rtc-rv3029c2.c.

#define RV3029C2_STATUS_VLOW1   (1 << 2)

Definition at line 30 of file rtc-rv3029c2.c.

#define RV3029C2_STATUS_VLOW2   (1 << 3)

Definition at line 31 of file rtc-rv3029c2.c.

#define RV3029C2_TEMP_PAGE   0x20

Definition at line 65 of file rtc-rv3029c2.c.

#define RV3029C2_TIMER_HIGH   0x19

Definition at line 62 of file rtc-rv3029c2.c.

#define RV3029C2_TIMER_LOW   0x18

Definition at line 61 of file rtc-rv3029c2.c.

#define RV3029C2_TRICKLE_1K   (1<<0) /* 1K resistance */

Definition at line 73 of file rtc-rv3029c2.c.

#define RV3029C2_TRICKLE_20K   (1<<2) /* 20K resistance */

Definition at line 75 of file rtc-rv3029c2.c.

#define RV3029C2_TRICKLE_5K   (1<<1) /* 5K resistance */

Definition at line 74 of file rtc-rv3029c2.c.

#define RV3029C2_TRICKLE_80K   (1<<3) /* 80K resistance */

Definition at line 76 of file rtc-rv3029c2.c.

#define RV3029C2_USR1_RAM_PAGE   0x38

Definition at line 82 of file rtc-rv3029c2.c.

#define RV3029C2_USR1_SECTION_LEN   0x04

Definition at line 83 of file rtc-rv3029c2.c.

#define RV3029C2_USR2_RAM_PAGE   0x3C

Definition at line 84 of file rtc-rv3029c2.c.

#define RV3029C2_USR2_SECTION_LEN   0x04

Definition at line 85 of file rtc-rv3029c2.c.

#define RV3029C2_W_DATE   0x0B

Definition at line 44 of file rtc-rv3029c2.c.

#define RV3029C2_W_DAYS   0x0C

Definition at line 45 of file rtc-rv3029c2.c.

#define RV3029C2_W_HOURS   0x0A

Definition at line 41 of file rtc-rv3029c2.c.

#define RV3029C2_W_MINUTES   0x09

Definition at line 40 of file rtc-rv3029c2.c.

#define RV3029C2_W_MONTHS   0x0D

Definition at line 46 of file rtc-rv3029c2.c.

#define RV3029C2_W_SEC   0x08

Definition at line 39 of file rtc-rv3029c2.c.

#define RV3029C2_W_YEARS   0x0E

Definition at line 47 of file rtc-rv3029c2.c.

#define RV3029C2_WATCH_SECTION_LEN   0x07

Definition at line 48 of file rtc-rv3029c2.c.

Function Documentation

MODULE_AUTHOR ( "Gregory Hermant <[email protected]>"  )
MODULE_DESCRIPTION ( "Micro Crystal RV3029C2 RTC driver )
MODULE_DEVICE_TABLE ( i2c  ,
rv3029c2_id   
)
module_i2c_driver ( rv3029c2_driver  )
MODULE_LICENSE ( "GPL"  )