Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions
fsl_gtm.h File Reference
#include <linux/types.h>

Go to the source code of this file.

Data Structures

struct  gtm_timer
 

Functions

struct gtm_timergtm_get_timer16 (void)
 
struct gtm_timergtm_get_specific_timer16 (struct gtm *gtm, unsigned int timer)
 
void gtm_put_timer16 (struct gtm_timer *tmr)
 
int gtm_set_timer16 (struct gtm_timer *tmr, unsigned long usec, bool reload)
 
int gtm_set_exact_timer16 (struct gtm_timer *tmr, u16 usec, bool reload)
 
void gtm_stop_timer16 (struct gtm_timer *tmr)
 
void gtm_ack_timer16 (struct gtm_timer *tmr, u16 events)
 

Function Documentation

void gtm_ack_timer16 ( struct gtm_timer tmr,
u16  events 
)

gtm_ack_timer16 - acknowledge timer event (free-run timers only) : pointer to the gtm_timer structure obtained from gtm_get_timer : events mask to ack Context: any

Thus function used to acknowledge timer interrupt event, use it inside the interrupt handler.

Definition at line 328 of file fsl_gtm.c.

struct gtm_timer* gtm_get_specific_timer16 ( struct gtm gtm,
unsigned int  timer 
)
read

gtm_get_specific_timer - request specific GTM timer : specific GTM, pass here GTM's device_node->data : specific timer number, Timer1 is 0. Context: non-IRQ

This function reserves GTM timer for later use. It returns gtm_timer structure to use with the rest of GTM API, you should use timer->irq to manage timer interrupt.

Definition at line 124 of file fsl_gtm.c.

struct gtm_timer* gtm_get_timer16 ( void  )
read

gtm_get_timer - request GTM timer to use it with the rest of GTM API Context: non-IRQ

This function reserves GTM timer for later use. It returns gtm_timer structure to use with the rest of GTM API, you should use timer->irq to manage timer interrupt.

Definition at line 89 of file fsl_gtm.c.

void gtm_put_timer16 ( struct gtm_timer tmr)

gtm_put_timer16 - release 16 bits GTM timer : pointer to the gtm_timer structure obtained from gtm_get_timer Context: any

This function releases GTM timer so others may request it.

Definition at line 153 of file fsl_gtm.c.

int gtm_set_exact_timer16 ( struct gtm_timer tmr,
u16  usec,
bool  reload 
)

gtm_set_exact_utimer16 - (re)set 16 bits timer : pointer to the gtm_timer structure obtained from gtm_get_timer : timer interval in microseconds : if set, the timer will reset upon expiry rather than continue running free. Context: any

This function (re)sets GTM timer so that it counts up to the requested interval value, and fires the interrupt when the value is reached. If reload flag was set, timer will also reset itself upon reference value, otherwise it continues to increment.

The exact bit in the function name states that this function will not crop precision of the "usec" argument, thus usec is limited to 16 bits (single timer width).

Definition at line 281 of file fsl_gtm.c.

int gtm_set_timer16 ( struct gtm_timer tmr,
unsigned long  usec,
bool  reload 
)

gtm_set_timer16 - (re)set 16 bit timer with arbitrary precision : pointer to the gtm_timer structure obtained from gtm_get_timer : timer interval in microseconds : if set, the timer will reset upon expiry rather than continue running free. Context: any

This function (re)sets the GTM timer so that it counts up to the requested interval value, and fires the interrupt when the value is reached. This function will reduce the precision of the timer as needed in order for the requested timeout to fit in a 16-bit register.

Definition at line 245 of file fsl_gtm.c.

void gtm_stop_timer16 ( struct gtm_timer tmr)

gtm_stop_timer16 - stop single timer : pointer to the gtm_timer structure obtained from gtm_get_timer Context: any

This function simply stops the GTM timer.

Definition at line 304 of file fsl_gtm.c.