Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
interface.c File Reference
#include <linux/rtc.h>
#include <linux/sched.h>
#include <linux/module.h>
#include <linux/log2.h>
#include <linux/workqueue.h>

Go to the source code of this file.

Functions

int rtc_read_time (struct rtc_device *rtc, struct rtc_time *tm)
 
 EXPORT_SYMBOL_GPL (rtc_read_time)
 
int rtc_set_time (struct rtc_device *rtc, struct rtc_time *tm)
 
 EXPORT_SYMBOL_GPL (rtc_set_time)
 
int rtc_set_mmss (struct rtc_device *rtc, unsigned long secs)
 
 EXPORT_SYMBOL_GPL (rtc_set_mmss)
 
int __rtc_read_alarm (struct rtc_device *rtc, struct rtc_wkalrm *alarm)
 
int rtc_read_alarm (struct rtc_device *rtc, struct rtc_wkalrm *alarm)
 
 EXPORT_SYMBOL_GPL (rtc_read_alarm)
 
int rtc_set_alarm (struct rtc_device *rtc, struct rtc_wkalrm *alarm)
 
 EXPORT_SYMBOL_GPL (rtc_set_alarm)
 
int rtc_initialize_alarm (struct rtc_device *rtc, struct rtc_wkalrm *alarm)
 
 EXPORT_SYMBOL_GPL (rtc_initialize_alarm)
 
int rtc_alarm_irq_enable (struct rtc_device *rtc, unsigned int enabled)
 
 EXPORT_SYMBOL_GPL (rtc_alarm_irq_enable)
 
int rtc_update_irq_enable (struct rtc_device *rtc, unsigned int enabled)
 
 EXPORT_SYMBOL_GPL (rtc_update_irq_enable)
 
void rtc_handle_legacy_irq (struct rtc_device *rtc, int num, int mode)
 
enum hrtimer_restart rtc_pie_update_irq (struct hrtimer *timer)
 
void rtc_update_irq (struct rtc_device *rtc, unsigned long num, unsigned long events)
 
 EXPORT_SYMBOL_GPL (rtc_update_irq)
 
struct rtc_devicertc_class_open (char *name)
 
 EXPORT_SYMBOL_GPL (rtc_class_open)
 
void rtc_class_close (struct rtc_device *rtc)
 
 EXPORT_SYMBOL_GPL (rtc_class_close)
 
int rtc_irq_register (struct rtc_device *rtc, struct rtc_task *task)
 
 EXPORT_SYMBOL_GPL (rtc_irq_register)
 
void rtc_irq_unregister (struct rtc_device *rtc, struct rtc_task *task)
 
 EXPORT_SYMBOL_GPL (rtc_irq_unregister)
 
int rtc_irq_set_state (struct rtc_device *rtc, struct rtc_task *task, int enabled)
 
 EXPORT_SYMBOL_GPL (rtc_irq_set_state)
 
int rtc_irq_set_freq (struct rtc_device *rtc, struct rtc_task *task, int freq)
 
 EXPORT_SYMBOL_GPL (rtc_irq_set_freq)
 
void rtc_timer_do_work (struct work_struct *work)
 
void rtc_timer_init (struct rtc_timer *timer, void(*f)(void *p), void *data)
 
int rtc_timer_start (struct rtc_device *rtc, struct rtc_timer *timer, ktime_t expires, ktime_t period)
 
int rtc_timer_cancel (struct rtc_device *rtc, struct rtc_timer *timer)
 

Function Documentation

int __rtc_read_alarm ( struct rtc_device rtc,
struct rtc_wkalrm alarm 
)

Definition at line 145 of file interface.c.

EXPORT_SYMBOL_GPL ( rtc_read_time  )
EXPORT_SYMBOL_GPL ( rtc_set_time  )
EXPORT_SYMBOL_GPL ( rtc_set_mmss  )
EXPORT_SYMBOL_GPL ( rtc_read_alarm  )
EXPORT_SYMBOL_GPL ( rtc_set_alarm  )
EXPORT_SYMBOL_GPL ( rtc_initialize_alarm  )
EXPORT_SYMBOL_GPL ( rtc_alarm_irq_enable  )
EXPORT_SYMBOL_GPL ( rtc_update_irq_enable  )
EXPORT_SYMBOL_GPL ( rtc_update_irq  )
EXPORT_SYMBOL_GPL ( rtc_class_open  )
EXPORT_SYMBOL_GPL ( rtc_class_close  )
EXPORT_SYMBOL_GPL ( rtc_irq_register  )
EXPORT_SYMBOL_GPL ( rtc_irq_unregister  )
EXPORT_SYMBOL_GPL ( rtc_irq_set_state  )
EXPORT_SYMBOL_GPL ( rtc_irq_set_freq  )
int rtc_alarm_irq_enable ( struct rtc_device rtc,
unsigned int  enabled 
)

Definition at line 418 of file interface.c.

void rtc_class_close ( struct rtc_device rtc)

Definition at line 619 of file interface.c.

struct rtc_device* rtc_class_open ( char name)
read

Definition at line 599 of file interface.c.

void rtc_handle_legacy_irq ( struct rtc_device rtc,
int  num,
int  mode 
)

rtc_handle_legacy_irq - AIE, UIE and PIE event hook : pointer to the rtc device

This function is called when an AIE, UIE or PIE mode interrupt has occurred (or been emulated).

Triggers the registered irq_task function callback.

Definition at line 506 of file interface.c.

int rtc_initialize_alarm ( struct rtc_device rtc,
struct rtc_wkalrm alarm 
)

Definition at line 384 of file interface.c.

int rtc_irq_register ( struct rtc_device rtc,
struct rtc_task task 
)

Definition at line 626 of file interface.c.

int rtc_irq_set_freq ( struct rtc_device rtc,
struct rtc_task task,
int  freq 
)

rtc_irq_set_freq - set 2^N Hz periodic IRQ frequency for IRQ : the rtc device : currently registered with rtc_irq_register() : positive frequency with which task->func() will be called Context: any

Note that rtc_irq_set_state() is used to enable or disable the periodic IRQs.

Definition at line 726 of file interface.c.

int rtc_irq_set_state ( struct rtc_device rtc,
struct rtc_task task,
int  enabled 
)

rtc_irq_set_state - enable/disable 2^N Hz periodic IRQs : the rtc device : currently registered with rtc_irq_register() : true to enable periodic IRQs Context: any

Note that rtc_irq_set_freq() should previously have been used to specify the desired frequency of periodic IRQ task->func() callbacks.

Definition at line 692 of file interface.c.

void rtc_irq_unregister ( struct rtc_device rtc,
struct rtc_task task 
)

Definition at line 650 of file interface.c.

enum hrtimer_restart rtc_pie_update_irq ( struct hrtimer timer)

rtc_pie_update_irq - PIE mode hrtimer hook : pointer to the pie mode hrtimer

This function is used to emulate PIE mode interrupts using an hrtimer. This function is called when the periodic hrtimer expires.

Definition at line 560 of file interface.c.

int rtc_read_alarm ( struct rtc_device rtc,
struct rtc_wkalrm alarm 
)

Definition at line 304 of file interface.c.

int rtc_read_time ( struct rtc_device rtc,
struct rtc_time tm 
)

Definition at line 37 of file interface.c.

int rtc_set_alarm ( struct rtc_device rtc,
struct rtc_wkalrm alarm 
)

Definition at line 359 of file interface.c.

int rtc_set_mmss ( struct rtc_device rtc,
unsigned long  secs 
)

Definition at line 82 of file interface.c.

int rtc_set_time ( struct rtc_device rtc,
struct rtc_time tm 
)

Definition at line 51 of file interface.c.

int rtc_timer_cancel ( struct rtc_device rtc,
struct rtc_timer timer 
)

Definition at line 933 of file interface.c.

void rtc_timer_do_work ( struct work_struct work)

rtc_timer_do_work - Expires rtc timers rtc device timer being removed.

Expires rtc timers. Reprograms next alarm event if needed. Called via worktask.

Serializes access to timerqueue via ops_lock mutex

Definition at line 836 of file interface.c.

void rtc_timer_init ( struct rtc_timer timer,
void(*)(void *p f,
void data 
)

Definition at line 894 of file interface.c.

int rtc_timer_start ( struct rtc_device rtc,
struct rtc_timer timer,
ktime_t  expires,
ktime_t  period 
)

Definition at line 910 of file interface.c.

void rtc_update_irq ( struct rtc_device rtc,
unsigned long  num,
unsigned long  events 
)

rtc_update_irq - Triggered when a RTC interrupt occurs. : the rtc device : how many irqs are being reported (usually one) : mask of RTC_IRQF with one or more of RTC_PF, RTC_AF, RTC_UF Context: any

Definition at line 582 of file interface.c.

int rtc_update_irq_enable ( struct rtc_device rtc,
unsigned int  enabled 
)

Definition at line 445 of file interface.c.