Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
ptp_clock.c File Reference
#include <linux/bitops.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/posix-clock.h>
#include <linux/pps_kernel.h>
#include <linux/slab.h>
#include <linux/syscalls.h>
#include <linux/uaccess.h>
#include "ptp_private.h"

Go to the source code of this file.

Macros

#define PTP_MAX_ALARMS   4
 
#define PTP_MAX_CLOCKS   8
 
#define PTP_PPS_DEFAULTS   (PPS_CAPTUREASSERT | PPS_OFFSETASSERT)
 
#define PTP_PPS_EVENT   PPS_CAPTUREASSERT
 
#define PTP_PPS_MODE   (PTP_PPS_DEFAULTS | PPS_CANWAIT | PPS_TSFMT_TSPEC)
 

Functions

struct ptp_clockptp_clock_register (struct ptp_clock_info *info, struct device *parent)
 
 EXPORT_SYMBOL (ptp_clock_register)
 
int ptp_clock_unregister (struct ptp_clock *ptp)
 
 EXPORT_SYMBOL (ptp_clock_unregister)
 
void ptp_clock_event (struct ptp_clock *ptp, struct ptp_clock_event *event)
 
 EXPORT_SYMBOL (ptp_clock_event)
 
int ptp_clock_index (struct ptp_clock *ptp)
 
 EXPORT_SYMBOL (ptp_clock_index)
 
 subsys_initcall (ptp_init)
 
 module_exit (ptp_exit)
 
 MODULE_AUTHOR ("Richard Cochran <[email protected]>")
 
 MODULE_DESCRIPTION ("PTP clocks support")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define PTP_MAX_ALARMS   4

Definition at line 34 of file ptp_clock.c.

#define PTP_MAX_CLOCKS   8

Definition at line 35 of file ptp_clock.c.

#define PTP_PPS_DEFAULTS   (PPS_CAPTUREASSERT | PPS_OFFSETASSERT)

Definition at line 36 of file ptp_clock.c.

#define PTP_PPS_EVENT   PPS_CAPTUREASSERT

Definition at line 37 of file ptp_clock.c.

#define PTP_PPS_MODE   (PTP_PPS_DEFAULTS | PPS_CANWAIT | PPS_TSFMT_TSPEC)

Definition at line 38 of file ptp_clock.c.

Function Documentation

EXPORT_SYMBOL ( ptp_clock_register  )
EXPORT_SYMBOL ( ptp_clock_unregister  )
EXPORT_SYMBOL ( ptp_clock_event  )
EXPORT_SYMBOL ( ptp_clock_index  )
MODULE_AUTHOR ( "Richard Cochran <[email protected]>"  )
MODULE_DESCRIPTION ( "PTP clocks support )
module_exit ( ptp_exit  )
MODULE_LICENSE ( "GPL"  )

ptp_clock_event() - notify the PTP layer about an event

: The clock obtained from ptp_clock_register(). : Message structure describing the event.

Definition at line 288 of file ptp_clock.c.

int ptp_clock_index ( struct ptp_clock ptp)

ptp_clock_index() - obtain the device index of a PTP clock

: The clock obtained from ptp_clock_register().

Definition at line 315 of file ptp_clock.c.

struct ptp_clock* ptp_clock_register ( struct ptp_clock_info info,
struct device parent 
)
read

ptp_clock_register() - register a PTP hardware clock driver

: Structure describing the new clock. : Pointer to the parent device of the new clock.

Definition at line 185 of file ptp_clock.c.

int ptp_clock_unregister ( struct ptp_clock ptp)

ptp_clock_unregister() - unregister a PTP hardware clock driver

: The clock to remove from service.

Definition at line 272 of file ptp_clock.c.

subsys_initcall ( ptp_init  )