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

Go to the source code of this file.

Macros

#define DRV_VERSION   "0.2"
 
#define MAX6900_REG_SC   0 /* seconds 00-59 */
 
#define MAX6900_REG_MN   1 /* minutes 00-59 */
 
#define MAX6900_REG_HR   2 /* hours 00-23 */
 
#define MAX6900_REG_DT   3 /* day of month 00-31 */
 
#define MAX6900_REG_MO   4 /* month 01-12 */
 
#define MAX6900_REG_DW   5 /* day of week 1-7 */
 
#define MAX6900_REG_YR   6 /* year 00-99 */
 
#define MAX6900_REG_CT   7 /* control */
 
#define MAX6900_REG_CENTURY   9 /* century */
 
#define MAX6900_REG_LEN   10
 
#define MAX6900_BURST_LEN   8 /* can burst r/w first 8 regs */
 
#define MAX6900_REG_CT_WP   (1 << 7) /* Write Protect */
 
#define MAX6900_REG_CONTROL_WRITE   0x8e
 
#define MAX6900_REG_CENTURY_WRITE   0x92
 
#define MAX6900_REG_CENTURY_READ   0x93
 
#define MAX6900_REG_RESERVED_READ   0x96
 
#define MAX6900_REG_BURST_WRITE   0xbe
 
#define MAX6900_REG_BURST_READ   0xbf
 
#define MAX6900_IDLE_TIME_AFTER_WRITE   3 /* specification says 2.5 mS */
 

Functions

 module_i2c_driver (max6900_driver)
 
 MODULE_DESCRIPTION ("Maxim MAX6900 RTC driver")
 
 MODULE_AUTHOR ("Dale Farnsworth <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_VERSION (DRV_VERSION)
 

Macro Definition Documentation

#define DRV_VERSION   "0.2"

Definition at line 20 of file rtc-max6900.c.

#define MAX6900_BURST_LEN   8 /* can burst r/w first 8 regs */

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

#define MAX6900_IDLE_TIME_AFTER_WRITE   3 /* specification says 2.5 mS */

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

#define MAX6900_REG_BURST_READ   0xbf

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

#define MAX6900_REG_BURST_WRITE   0xbe

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

#define MAX6900_REG_CENTURY   9 /* century */

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

#define MAX6900_REG_CENTURY_READ   0x93

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

#define MAX6900_REG_CENTURY_WRITE   0x92

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

#define MAX6900_REG_CONTROL_WRITE   0x8e

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

#define MAX6900_REG_CT   7 /* control */

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

#define MAX6900_REG_CT_WP   (1 << 7) /* Write Protect */

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

#define MAX6900_REG_DT   3 /* day of month 00-31 */

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

#define MAX6900_REG_DW   5 /* day of week 1-7 */

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

#define MAX6900_REG_HR   2 /* hours 00-23 */

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

#define MAX6900_REG_LEN   10

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

#define MAX6900_REG_MN   1 /* minutes 00-59 */

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

#define MAX6900_REG_MO   4 /* month 01-12 */

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

#define MAX6900_REG_RESERVED_READ   0x96

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

#define MAX6900_REG_SC   0 /* seconds 00-59 */

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

#define MAX6900_REG_YR   6 /* year 00-99 */

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

Function Documentation

MODULE_AUTHOR ( "Dale Farnsworth <[email protected]>"  )
MODULE_DESCRIPTION ( "Maxim MAX6900 RTC driver )
module_i2c_driver ( max6900_driver  )
MODULE_LICENSE ( "GPL"  )
MODULE_VERSION ( DRV_VERSION  )