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

Go to the source code of this file.

Data Structures

struct  x1205_limit
 

Macros

#define DRV_VERSION   "1.0.8"
 
#define CCR_SEC   0
 
#define CCR_MIN   1
 
#define CCR_HOUR   2
 
#define CCR_MDAY   3
 
#define CCR_MONTH   4
 
#define CCR_YEAR   5
 
#define CCR_WDAY   6
 
#define CCR_Y2K   7
 
#define X1205_REG_SR   0x3F /* status register */
 
#define X1205_REG_Y2K   0x37
 
#define X1205_REG_DW   0x36
 
#define X1205_REG_YR   0x35
 
#define X1205_REG_MO   0x34
 
#define X1205_REG_DT   0x33
 
#define X1205_REG_HR   0x32
 
#define X1205_REG_MN   0x31
 
#define X1205_REG_SC   0x30
 
#define X1205_REG_DTR   0x13
 
#define X1205_REG_ATR   0x12
 
#define X1205_REG_INT   0x11
 
#define X1205_REG_0   0x10
 
#define X1205_REG_Y2K1   0x0F
 
#define X1205_REG_DWA1   0x0E
 
#define X1205_REG_YRA1   0x0D
 
#define X1205_REG_MOA1   0x0C
 
#define X1205_REG_DTA1   0x0B
 
#define X1205_REG_HRA1   0x0A
 
#define X1205_REG_MNA1   0x09
 
#define X1205_REG_SCA1   0x08
 
#define X1205_REG_Y2K0   0x07
 
#define X1205_REG_DWA0   0x06
 
#define X1205_REG_YRA0   0x05
 
#define X1205_REG_MOA0   0x04
 
#define X1205_REG_DTA0   0x03
 
#define X1205_REG_HRA0   0x02
 
#define X1205_REG_MNA0   0x01
 
#define X1205_REG_SCA0   0x00
 
#define X1205_CCR_BASE   0x30 /* Base address of CCR */
 
#define X1205_ALM0_BASE   0x00 /* Base address of ALARM0 */
 
#define X1205_SR_RTCF   0x01 /* Clock failure */
 
#define X1205_SR_WEL   0x02 /* Write Enable Latch */
 
#define X1205_SR_RWEL   0x04 /* Register Write Enable */
 
#define X1205_SR_AL0   0x20 /* Alarm 0 match */
 
#define X1205_DTR_DTR0   0x01
 
#define X1205_DTR_DTR1   0x02
 
#define X1205_DTR_DTR2   0x04
 
#define X1205_HR_MIL   0x80 /* Set in ccr.hour for 24 hr mode */
 
#define X1205_INT_AL0E   0x20 /* Alarm 0 enable */
 

Functions

 MODULE_DEVICE_TABLE (i2c, x1205_id)
 
 module_i2c_driver (x1205_driver)
 
 MODULE_AUTHOR ("Karen Spearel <kas111 at gmail dot com>, ""Alessandro Zummo <[email protected]>")
 
 MODULE_DESCRIPTION ("Xicor/Intersil X1205 RTC driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_VERSION (DRV_VERSION)
 

Macro Definition Documentation

#define CCR_HOUR   2

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

#define CCR_MDAY   3

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

#define CCR_MIN   1

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

#define CCR_MONTH   4

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

#define CCR_SEC   0

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

#define CCR_WDAY   6

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

#define CCR_Y2K   7

Definition at line 37 of file rtc-x1205.c.

#define CCR_YEAR   5

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

#define DRV_VERSION   "1.0.8"

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

#define X1205_ALM0_BASE   0x00 /* Base address of ALARM0 */

Definition at line 70 of file rtc-x1205.c.

#define X1205_CCR_BASE   0x30 /* Base address of CCR */

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

#define X1205_DTR_DTR0   0x01

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

#define X1205_DTR_DTR1   0x02

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

#define X1205_DTR_DTR2   0x04

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

#define X1205_HR_MIL   0x80 /* Set in ccr.hour for 24 hr mode */

Definition at line 81 of file rtc-x1205.c.

#define X1205_INT_AL0E   0x20 /* Alarm 0 enable */

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

#define X1205_REG_0   0x10

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

#define X1205_REG_ATR   0x12

Definition at line 49 of file rtc-x1205.c.

#define X1205_REG_DT   0x33

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

#define X1205_REG_DTA0   0x03

Definition at line 64 of file rtc-x1205.c.

#define X1205_REG_DTA1   0x0B

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

#define X1205_REG_DTR   0x13

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

#define X1205_REG_DW   0x36

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

#define X1205_REG_DWA0   0x06

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

#define X1205_REG_DWA1   0x0E

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

#define X1205_REG_HR   0x32

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

#define X1205_REG_HRA0   0x02

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

#define X1205_REG_HRA1   0x0A

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

#define X1205_REG_INT   0x11

Definition at line 50 of file rtc-x1205.c.

#define X1205_REG_MN   0x31

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

#define X1205_REG_MNA0   0x01

Definition at line 66 of file rtc-x1205.c.

#define X1205_REG_MNA1   0x09

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

#define X1205_REG_MO   0x34

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

#define X1205_REG_MOA0   0x04

Definition at line 63 of file rtc-x1205.c.

#define X1205_REG_MOA1   0x0C

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

#define X1205_REG_SC   0x30

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

#define X1205_REG_SCA0   0x00

Definition at line 67 of file rtc-x1205.c.

#define X1205_REG_SCA1   0x08

Definition at line 59 of file rtc-x1205.c.

#define X1205_REG_SR   0x3F /* status register */

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

#define X1205_REG_Y2K   0x37

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

#define X1205_REG_Y2K0   0x07

Definition at line 60 of file rtc-x1205.c.

#define X1205_REG_Y2K1   0x0F

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

#define X1205_REG_YR   0x35

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

#define X1205_REG_YRA0   0x05

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

#define X1205_REG_YRA1   0x0D

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

#define X1205_SR_AL0   0x20 /* Alarm 0 match */

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

#define X1205_SR_RTCF   0x01 /* Clock failure */

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

#define X1205_SR_RWEL   0x04 /* Register Write Enable */

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

#define X1205_SR_WEL   0x02 /* Write Enable Latch */

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

Function Documentation

MODULE_AUTHOR ( "Karen Spearel <kas111 at gmail dot com>  ,
""Alessandro Zummo< a.zummo @towertech.it >"   
)
MODULE_DESCRIPTION ( "Xicor/Intersil X1205 RTC driver )
MODULE_DEVICE_TABLE ( i2c  ,
x1205_id   
)
module_i2c_driver ( x1205_driver  )
MODULE_LICENSE ( "GPL"  )
MODULE_VERSION ( DRV_VERSION  )