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

Go to the source code of this file.

Data Structures

struct  ds3232
 

Macros

#define DS3232_REG_SECONDS   0x00
 
#define DS3232_REG_MINUTES   0x01
 
#define DS3232_REG_HOURS   0x02
 
#define DS3232_REG_AMPM   0x02
 
#define DS3232_REG_DAY   0x03
 
#define DS3232_REG_DATE   0x04
 
#define DS3232_REG_MONTH   0x05
 
#define DS3232_REG_CENTURY   0x05
 
#define DS3232_REG_YEAR   0x06
 
#define DS3232_REG_ALARM1   0x07 /* Alarm 1 BASE */
 
#define DS3232_REG_ALARM2   0x0B /* Alarm 2 BASE */
 
#define DS3232_REG_CR   0x0E /* Control register */
 
#define DS3232_REG_CR_nEOSC   0x80
 
#define DS3232_REG_CR_INTCN   0x04
 
#define DS3232_REG_CR_A2IE   0x02
 
#define DS3232_REG_CR_A1IE   0x01
 
#define DS3232_REG_SR   0x0F /* control/status register */
 
#define DS3232_REG_SR_OSF   0x80
 
#define DS3232_REG_SR_BSY   0x04
 
#define DS3232_REG_SR_A2F   0x02
 
#define DS3232_REG_SR_A1F   0x01
 

Functions

 MODULE_DEVICE_TABLE (i2c, ds3232_id)
 
 module_i2c_driver (ds3232_driver)
 
 MODULE_AUTHOR ("Srikanth Srinivasan <[email protected]>")
 
 MODULE_DESCRIPTION ("Maxim/Dallas DS3232 RTC Driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define DS3232_REG_ALARM1   0x07 /* Alarm 1 BASE */

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

#define DS3232_REG_ALARM2   0x0B /* Alarm 2 BASE */

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

#define DS3232_REG_AMPM   0x02

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

#define DS3232_REG_CENTURY   0x05

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

#define DS3232_REG_CR   0x0E /* Control register */

Definition at line 38 of file rtc-ds3232.c.

#define DS3232_REG_CR_A1IE   0x01

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

#define DS3232_REG_CR_A2IE   0x02

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

#define DS3232_REG_CR_INTCN   0x04

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

#define DS3232_REG_CR_nEOSC   0x80

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

#define DS3232_REG_DATE   0x04

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

#define DS3232_REG_DAY   0x03

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

#define DS3232_REG_HOURS   0x02

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

#define DS3232_REG_MINUTES   0x01

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

#define DS3232_REG_MONTH   0x05

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

#define DS3232_REG_SECONDS   0x00

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

#define DS3232_REG_SR   0x0F /* control/status register */

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

#define DS3232_REG_SR_A1F   0x01

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

#define DS3232_REG_SR_A2F   0x02

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

#define DS3232_REG_SR_BSY   0x04

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

#define DS3232_REG_SR_OSF   0x80

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

#define DS3232_REG_YEAR   0x06

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

Function Documentation

MODULE_AUTHOR ( "Srikanth Srinivasan <[email protected]>"  )
MODULE_DESCRIPTION ( "Maxim/Dallas DS3232 RTC Driver"  )
MODULE_DEVICE_TABLE ( i2c  ,
ds3232_id   
)
module_i2c_driver ( ds3232_driver  )
MODULE_LICENSE ( "GPL"  )