Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
ptp_sysfs.c File Reference
#include <linux/capability.h>
#include "ptp_private.h"

Go to the source code of this file.

Macros

#define PTP_SHOW_INT(name)
 
#define PTP_RO_ATTR(_var, _name)
 

Functions

 PTP_SHOW_INT (max_adj)
 
 PTP_SHOW_INT (n_alarm)
 
 PTP_SHOW_INT (n_ext_ts)
 
 PTP_SHOW_INT (n_per_out)
 
 PTP_SHOW_INT (pps)
 
int ptp_cleanup_sysfs (struct ptp_clock *ptp)
 
int ptp_populate_sysfs (struct ptp_clock *ptp)
 

Variables

struct device_attribute ptp_dev_attrs []
 

Macro Definition Documentation

#define PTP_RO_ATTR (   _var,
  _name 
)
Value:
{ \
.attr = { .name = __stringify(_name), .mode = 0444 }, \
.show = _var##_show, \
}

Definition at line 45 of file ptp_sysfs.c.

#define PTP_SHOW_INT (   name)
Value:
static ssize_t name##_show(struct device *dev, \
struct device_attribute *attr, char *page) \
{ \
return snprintf(page, PAGE_SIZE-1, "%d\n", ptp->info->name); \
}

Definition at line 31 of file ptp_sysfs.c.

Function Documentation

int ptp_cleanup_sysfs ( struct ptp_clock ptp)

Definition at line 176 of file ptp_sysfs.c.

int ptp_populate_sysfs ( struct ptp_clock ptp)

Definition at line 194 of file ptp_sysfs.c.

PTP_SHOW_INT ( max_adj  )
PTP_SHOW_INT ( n_alarm  )
PTP_SHOW_INT ( n_ext_ts  )
PTP_SHOW_INT ( n_per_out  )
PTP_SHOW_INT ( pps  )

Variable Documentation

struct device_attribute ptp_dev_attrs[]
Initial value:
= {
PTP_RO_ATTR(clock_name, clock_name),
PTP_RO_ATTR(max_adj, max_adjustment),
PTP_RO_ATTR(n_alarm, n_alarms),
PTP_RO_ATTR(n_ext_ts, n_external_timestamps),
PTP_RO_ATTR(n_per_out, n_periodic_outputs),
PTP_RO_ATTR(pps, pps_available),
}

Definition at line 50 of file ptp_sysfs.c.