Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
clockevents.c File Reference
#include <linux/clockchips.h>
#include <linux/hrtimer.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/notifier.h>
#include <linux/smp.h>
#include "tick-internal.h"

Go to the source code of this file.


u64 clockevent_delta2ns (unsigned long latch, struct clock_event_device *evt)
 EXPORT_SYMBOL_GPL (clockevent_delta2ns)
void clockevents_set_mode (struct clock_event_device *dev, enum clock_event_mode mode)
void clockevents_shutdown (struct clock_event_device *dev)
int clockevents_program_event (struct clock_event_device *dev, ktime_t expires, bool force)
int clockevents_register_notifier (struct notifier_block *nb)
void clockevents_register_device (struct clock_event_device *dev)
 EXPORT_SYMBOL_GPL (clockevents_register_device)
void clockevents_config (struct clock_event_device *dev, u32 freq)
void clockevents_config_and_register (struct clock_event_device *dev, u32 freq, unsigned long min_delta, unsigned long max_delta)
int clockevents_update_freq (struct clock_event_device *dev, u32 freq)
void clockevents_handle_noop (struct clock_event_device *dev)
void clockevents_exchange_device (struct clock_event_device *old, struct clock_event_device *new)
void clockevents_suspend (void)
void clockevents_resume (void)

Function Documentation

u64 clockevent_delta2ns ( unsigned long  latch,
struct clock_event_device *  evt 

clockevents_delta2ns - Convert a latch value (device ticks) to nanoseconds : value to convert : pointer to clock event device descriptor

Math helper, returns latch value converted to nanoseconds (bound checked)

Definition at line 40 of file clockevents.c.

void clockevents_config ( struct clock_event_device *  dev,
u32  freq 

Definition at line 300 of file clockevents.c.

void clockevents_config_and_register ( struct clock_event_device *  dev,
u32  freq,
unsigned long  min_delta,
unsigned long  max_delta 

clockevents_config_and_register - Configure and register a clock event device : device to register : The clock frequency : The minimum clock ticks to program in oneshot mode : The maximum clock ticks to program in oneshot mode

min/max_delta can be 0 for devices which do not support oneshot mode.

Definition at line 333 of file clockevents.c.

void clockevents_exchange_device ( struct clock_event_device *  old,
struct clock_event_device *  new 

clockevents_exchange_device - release and request clock devices : device to release (can be NULL) : device to request (can be NULL)

Called from the notifier chain. clockevents_lock is held already

Definition at line 377 of file clockevents.c.

void clockevents_handle_noop ( struct clock_event_device *  dev)

Definition at line 366 of file clockevents.c.

int clockevents_program_event ( struct clock_event_device *  dev,
ktime_t  expires,
bool  force 

clockevents_program_event - Reprogram the clock event device. : device to program : absolute expiry time (monotonic clock) : program minimum delay if expires can not be set

Returns 0 on success, -ETIME when the event is in the past.

Definition at line 201 of file clockevents.c.

void clockevents_register_device ( struct clock_event_device *  dev)

clockevents_register_device - register a clock event device : device to register

Definition at line 280 of file clockevents.c.

int clockevents_register_notifier ( struct notifier_block nb)

clockevents_register_notifier - register a clock events change listener

Definition at line 238 of file clockevents.c.

void clockevents_resume ( void  )

clockevents_resume - resume clock devices

Definition at line 415 of file clockevents.c.

void clockevents_set_mode ( struct clock_event_device *  dev,
enum clock_event_mode  mode 

clockevents_set_mode - set the operating mode of a clock event device : device to modify : new mode

Must be called with interrupts disabled !

Definition at line 66 of file clockevents.c.

void clockevents_shutdown ( struct clock_event_device *  dev)

clockevents_shutdown - shutdown the device and clear next_event : device to shutdown

Definition at line 90 of file clockevents.c.

void clockevents_suspend ( void  )

clockevents_suspend - suspend clock devices

Definition at line 403 of file clockevents.c.

int clockevents_update_freq ( struct clock_event_device *  dev,
u32  freq 

clockevents_update_freq - Update frequency and reprogram a clock event device. : device to modify : new device frequency

Reconfigure and reprogram a clock event device in oneshot mode. Must be called on the cpu for which the device delivers per cpu timer events with interrupts disabled! Returns 0 on success, -ETIME when the event is in the past.

Definition at line 353 of file clockevents.c.

EXPORT_SYMBOL_GPL ( clockevent_delta2ns  )
EXPORT_SYMBOL_GPL ( clockevents_register_device  )