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

Go to the source code of this file.

Data Structures

struct  vt8500_rtc
 

Macros

#define VT8500_RTC_TS   0x00 /* Time set */
 
#define VT8500_RTC_DS   0x04 /* Date set */
 
#define VT8500_RTC_AS   0x08 /* Alarm set */
 
#define VT8500_RTC_CR   0x0c /* Control */
 
#define VT8500_RTC_TR   0x10 /* Time read */
 
#define VT8500_RTC_DR   0x14 /* Date read */
 
#define VT8500_RTC_WS   0x18 /* Write status */
 
#define VT8500_RTC_CL   0x20 /* Calibration */
 
#define VT8500_RTC_IS   0x24 /* Interrupt status */
 
#define VT8500_RTC_ST   0x28 /* Status */
 
#define INVALID_TIME_BIT   (1 << 31)
 
#define DATE_CENTURY_S   19
 
#define DATE_YEAR_S   11
 
#define DATE_YEAR_MASK   (0xff << DATE_YEAR_S)
 
#define DATE_MONTH_S   6
 
#define DATE_MONTH_MASK   (0x1f << DATE_MONTH_S)
 
#define DATE_DAY_MASK   0x3f
 
#define TIME_DOW_S   20
 
#define TIME_DOW_MASK   (0x07 << TIME_DOW_S)
 
#define TIME_HOUR_S   14
 
#define TIME_HOUR_MASK   (0x3f << TIME_HOUR_S)
 
#define TIME_MIN_S   7
 
#define TIME_MIN_MASK   (0x7f << TIME_MIN_S)
 
#define TIME_SEC_MASK   0x7f
 
#define ALARM_DAY_S   20
 
#define ALARM_DAY_MASK   (0x3f << ALARM_DAY_S)
 
#define ALARM_DAY_BIT   (1 << 29)
 
#define ALARM_HOUR_BIT   (1 << 28)
 
#define ALARM_MIN_BIT   (1 << 27)
 
#define ALARM_SEC_BIT   (1 << 26)
 
#define ALARM_ENABLE_MASK
 
#define VT8500_RTC_CR_ENABLE   (1 << 0) /* Enable RTC */
 
#define VT8500_RTC_CR_24H   (1 << 1) /* 24h time format */
 
#define VT8500_RTC_CR_SM_ENABLE   (1 << 2) /* Enable periodic irqs */
 
#define VT8500_RTC_CR_SM_SEC   (1 << 3) /* 0: 1Hz/60, 1: 1Hz */
 
#define VT8500_RTC_CR_CALIB   (1 << 4) /* Enable calibration */
 
#define VT8500_RTC_IS_ALARM   (1 << 0) /* Alarm interrupt status */
 

Functions

 module_platform_driver (vt8500_rtc_driver)
 
 MODULE_AUTHOR ("Alexey Charkov <[email protected]>")
 
 MODULE_DESCRIPTION ("VIA VT8500 SoC Realtime Clock Driver (RTC)")
 
 MODULE_LICENSE ("GPL v2")
 
 MODULE_ALIAS ("platform:vt8500-rtc")
 

Macro Definition Documentation

#define ALARM_DAY_BIT   (1 << 29)

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

#define ALARM_DAY_MASK   (0x3f << ALARM_DAY_S)

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

#define ALARM_DAY_S   20

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

#define ALARM_ENABLE_MASK
Value:

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

#define ALARM_HOUR_BIT   (1 << 28)

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

#define ALARM_MIN_BIT   (1 << 27)

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

#define ALARM_SEC_BIT   (1 << 26)

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

#define DATE_CENTURY_S   19

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

#define DATE_DAY_MASK   0x3f

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

#define DATE_MONTH_MASK   (0x1f << DATE_MONTH_S)

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

#define DATE_MONTH_S   6

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

#define DATE_YEAR_MASK   (0xff << DATE_YEAR_S)

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

#define DATE_YEAR_S   11

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

#define INVALID_TIME_BIT   (1 << 31)

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

#define TIME_DOW_MASK   (0x07 << TIME_DOW_S)

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

#define TIME_DOW_S   20

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

#define TIME_HOUR_MASK   (0x3f << TIME_HOUR_S)

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

#define TIME_HOUR_S   14

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

#define TIME_MIN_MASK   (0x7f << TIME_MIN_S)

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

#define TIME_MIN_S   7

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

#define TIME_SEC_MASK   0x7f

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

#define VT8500_RTC_AS   0x08 /* Alarm set */

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

#define VT8500_RTC_CL   0x20 /* Calibration */

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

#define VT8500_RTC_CR   0x0c /* Control */

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

#define VT8500_RTC_CR_24H   (1 << 1) /* 24h time format */

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

#define VT8500_RTC_CR_CALIB   (1 << 4) /* Enable calibration */

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

#define VT8500_RTC_CR_ENABLE   (1 << 0) /* Enable RTC */

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

#define VT8500_RTC_CR_SM_ENABLE   (1 << 2) /* Enable periodic irqs */

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

#define VT8500_RTC_CR_SM_SEC   (1 << 3) /* 0: 1Hz/60, 1: 1Hz */

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

#define VT8500_RTC_DR   0x14 /* Date read */

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

#define VT8500_RTC_DS   0x04 /* Date set */

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

#define VT8500_RTC_IS   0x24 /* Interrupt status */

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

#define VT8500_RTC_IS_ALARM   (1 << 0) /* Alarm interrupt status */

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

#define VT8500_RTC_ST   0x28 /* Status */

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

#define VT8500_RTC_TR   0x10 /* Time read */

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

#define VT8500_RTC_TS   0x00 /* Time set */

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

#define VT8500_RTC_WS   0x18 /* Write status */

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

Function Documentation

MODULE_ALIAS ( "platform:vt8500-rtc )
MODULE_AUTHOR ( "Alexey Charkov <[email protected]>"  )
MODULE_DESCRIPTION ( "VIA VT8500 SoC Realtime Clock Driver (RTC)"  )
MODULE_LICENSE ( "GPL v2 )
module_platform_driver ( vt8500_rtc_driver  )