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

Go to the source code of this file.

Macros

#define DRV_NAME   "rtc-ds1302"
 
#define DRV_VERSION   "0.1.1"
 
#define RTC_CMD_READ   0x81 /* Read command */
 
#define RTC_CMD_WRITE   0x80 /* Write command */
 
#define RTC_ADDR_RAM0   0x20 /* Address of RAM0 */
 
#define RTC_ADDR_TCR   0x08 /* Address of trickle charge register */
 
#define RTC_ADDR_YEAR   0x06 /* Address of year register */
 
#define RTC_ADDR_DAY   0x05 /* Address of day of week register */
 
#define RTC_ADDR_MON   0x04 /* Address of month register */
 
#define RTC_ADDR_DATE   0x03 /* Address of day of month register */
 
#define RTC_ADDR_HOUR   0x02 /* Address of hour register */
 
#define RTC_ADDR_MIN   0x01 /* Address of minute register */
 
#define RTC_ADDR_SEC   0x00 /* Address of second register */
 

Functions

 module_init (ds1302_rtc_init)
 
 module_exit (ds1302_rtc_exit)
 
 MODULE_DESCRIPTION ("Dallas DS1302 RTC driver")
 
 MODULE_VERSION (DRV_VERSION)
 
 MODULE_AUTHOR ("Paul Mundt, David McCullough")
 
 MODULE_LICENSE ("GPL v2")
 

Macro Definition Documentation

#define DRV_NAME   "rtc-ds1302"

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

#define DRV_VERSION   "0.1.1"

Definition at line 21 of file rtc-ds1302.c.

#define RTC_ADDR_DATE   0x03 /* Address of day of month register */

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

#define RTC_ADDR_DAY   0x05 /* Address of day of week register */

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

#define RTC_ADDR_HOUR   0x02 /* Address of hour register */

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

#define RTC_ADDR_MIN   0x01 /* Address of minute register */

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

#define RTC_ADDR_MON   0x04 /* Address of month register */

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

#define RTC_ADDR_RAM0   0x20 /* Address of RAM0 */

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

#define RTC_ADDR_SEC   0x00 /* Address of second register */

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

#define RTC_ADDR_TCR   0x08 /* Address of trickle charge register */

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

#define RTC_ADDR_YEAR   0x06 /* Address of year register */

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

#define RTC_CMD_READ   0x81 /* Read command */

Definition at line 23 of file rtc-ds1302.c.

#define RTC_CMD_WRITE   0x80 /* Write command */

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

Function Documentation

MODULE_AUTHOR ( "Paul  Mundt,
David McCullough"   
)
MODULE_DESCRIPTION ( "Dallas DS1302 RTC driver )
module_exit ( ds1302_rtc_exit  )
module_init ( ds1302_rtc_init  )
MODULE_LICENSE ( "GPL v2 )
MODULE_VERSION ( DRV_VERSION  )