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

Go to the source code of this file.

Macros

#define BIT_RTC_CTRL_REG_STOP_RTC_M   0x01
 
#define BIT_RTC_CTRL_REG_ROUND_30S_M   0x02
 
#define BIT_RTC_CTRL_REG_AUTO_COMP_M   0x04
 
#define BIT_RTC_CTRL_REG_MODE_12_24_M   0x08
 
#define BIT_RTC_CTRL_REG_TEST_MODE_M   0x10
 
#define BIT_RTC_CTRL_REG_SET_32_COUNTER_M   0x20
 
#define BIT_RTC_CTRL_REG_GET_TIME_M   0x40
 
#define BIT_RTC_CTRL_REG_RTC_V_OPT   0x80
 
#define BIT_RTC_STATUS_REG_RUN_M   0x02
 
#define BIT_RTC_STATUS_REG_1S_EVENT_M   0x04
 
#define BIT_RTC_STATUS_REG_1M_EVENT_M   0x08
 
#define BIT_RTC_STATUS_REG_1H_EVENT_M   0x10
 
#define BIT_RTC_STATUS_REG_1D_EVENT_M   0x20
 
#define BIT_RTC_STATUS_REG_ALARM_M   0x40
 
#define BIT_RTC_STATUS_REG_POWER_UP_M   0x80
 
#define BIT_RTC_INTERRUPTS_REG_EVERY_M   0x03
 
#define BIT_RTC_INTERRUPTS_REG_IT_TIMER_M   0x04
 
#define BIT_RTC_INTERRUPTS_REG_IT_ALARM_M   0x08
 
#define ALL_TIME_REGS   6
 
#define twl_rtc_suspend   NULL
 
#define twl_rtc_resume   NULL
 

Enumerations

enum  {
  REG_SECONDS_REG = 0, REG_MINUTES_REG, REG_HOURS_REG, REG_DAYS_REG,
  REG_MONTHS_REG, REG_YEARS_REG, REG_WEEKS_REG, REG_ALARM_SECONDS_REG,
  REG_ALARM_MINUTES_REG, REG_ALARM_HOURS_REG, REG_ALARM_DAYS_REG, REG_ALARM_MONTHS_REG,
  REG_ALARM_YEARS_REG, REG_RTC_CTRL_REG, REG_RTC_STATUS_REG, REG_RTC_INTERRUPTS_REG,
  REG_RTC_COMP_LSB_REG, REG_RTC_COMP_MSB_REG
}
 

Functions

 MODULE_DEVICE_TABLE (of, twl_rtc_of_match)
 
 MODULE_ALIAS ("platform:twl_rtc")
 
 module_init (twl_rtc_init)
 
 module_exit (twl_rtc_exit)
 
 MODULE_AUTHOR ("Texas Instruments, MontaVista Software")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define ALL_TIME_REGS   6

Definition at line 133 of file rtc-twl.c.

#define BIT_RTC_CTRL_REG_AUTO_COMP_M   0x04

Definition at line 110 of file rtc-twl.c.

#define BIT_RTC_CTRL_REG_GET_TIME_M   0x40

Definition at line 114 of file rtc-twl.c.

#define BIT_RTC_CTRL_REG_MODE_12_24_M   0x08

Definition at line 111 of file rtc-twl.c.

#define BIT_RTC_CTRL_REG_ROUND_30S_M   0x02

Definition at line 109 of file rtc-twl.c.

#define BIT_RTC_CTRL_REG_RTC_V_OPT   0x80

Definition at line 115 of file rtc-twl.c.

#define BIT_RTC_CTRL_REG_SET_32_COUNTER_M   0x20

Definition at line 113 of file rtc-twl.c.

#define BIT_RTC_CTRL_REG_STOP_RTC_M   0x01

Definition at line 108 of file rtc-twl.c.

#define BIT_RTC_CTRL_REG_TEST_MODE_M   0x10

Definition at line 112 of file rtc-twl.c.

#define BIT_RTC_INTERRUPTS_REG_EVERY_M   0x03

Definition at line 127 of file rtc-twl.c.

#define BIT_RTC_INTERRUPTS_REG_IT_ALARM_M   0x08

Definition at line 129 of file rtc-twl.c.

#define BIT_RTC_INTERRUPTS_REG_IT_TIMER_M   0x04

Definition at line 128 of file rtc-twl.c.

#define BIT_RTC_STATUS_REG_1D_EVENT_M   0x20

Definition at line 122 of file rtc-twl.c.

#define BIT_RTC_STATUS_REG_1H_EVENT_M   0x10

Definition at line 121 of file rtc-twl.c.

#define BIT_RTC_STATUS_REG_1M_EVENT_M   0x08

Definition at line 120 of file rtc-twl.c.

#define BIT_RTC_STATUS_REG_1S_EVENT_M   0x04

Definition at line 119 of file rtc-twl.c.

#define BIT_RTC_STATUS_REG_ALARM_M   0x40

Definition at line 123 of file rtc-twl.c.

#define BIT_RTC_STATUS_REG_POWER_UP_M   0x80

Definition at line 124 of file rtc-twl.c.

#define BIT_RTC_STATUS_REG_RUN_M   0x02

Definition at line 118 of file rtc-twl.c.

#define twl_rtc_resume   NULL

Definition at line 588 of file rtc-twl.c.

#define twl_rtc_suspend   NULL

Definition at line 587 of file rtc-twl.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
REG_SECONDS_REG 
REG_MINUTES_REG 
REG_HOURS_REG 
REG_DAYS_REG 
REG_MONTHS_REG 
REG_YEARS_REG 
REG_WEEKS_REG 
REG_ALARM_SECONDS_REG 
REG_ALARM_MINUTES_REG 
REG_ALARM_HOURS_REG 
REG_ALARM_DAYS_REG 
REG_ALARM_MONTHS_REG 
REG_ALARM_YEARS_REG 
REG_RTC_CTRL_REG 
REG_RTC_STATUS_REG 
REG_RTC_INTERRUPTS_REG 
REG_RTC_COMP_LSB_REG 
REG_RTC_COMP_MSB_REG 

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

Function Documentation

MODULE_ALIAS ( "platform:twl_rtc"  )
MODULE_AUTHOR ( "Texas  Instruments,
MontaVista Software"   
)
MODULE_DEVICE_TABLE ( of  ,
twl_rtc_of_match   
)
module_exit ( twl_rtc_exit  )
module_init ( twl_rtc_init  )
MODULE_LICENSE ( "GPL"  )