Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
sysfs.h File Reference

Go to the source code of this file.

Data Structures

struct  iio_dev_attr
 
struct  iio_const_attr
 

Macros

#define to_iio_dev_attr(_dev_attr)   container_of(_dev_attr, struct iio_dev_attr, dev_attr)
 
#define to_iio_const_attr(_dev_attr)   container_of(_dev_attr, struct iio_const_attr, dev_attr)
 
#define IIO_ATTR(_name, _mode, _show, _store, _addr)
 
#define IIO_DEVICE_ATTR(_name, _mode, _show, _store, _addr)
 
#define IIO_DEVICE_ATTR_NAMED(_vname, _name, _mode, _show, _store, _addr)
 
#define IIO_CONST_ATTR(_name, _string)
 
#define IIO_CONST_ATTR_NAMED(_vname, _name, _string)
 
#define IIO_DEV_ATTR_RESET(_store)   IIO_DEVICE_ATTR(reset, S_IWUSR, NULL, _store, 0)
 
#define IIO_DEV_ATTR_SAMP_FREQ(_mode, _show, _store)   IIO_DEVICE_ATTR(sampling_frequency, _mode, _show, _store, 0)
 
#define IIO_DEV_ATTR_SAMP_FREQ_AVAIL(_show)   IIO_DEVICE_ATTR(sampling_frequency_available, S_IRUGO, _show, NULL, 0)
 
#define IIO_CONST_ATTR_SAMP_FREQ_AVAIL(_string)   IIO_CONST_ATTR(sampling_frequency_available, _string)
 
#define IIO_DEV_ATTR_TEMP_RAW(_show)   IIO_DEVICE_ATTR(in_temp_raw, S_IRUGO, _show, NULL, 0)
 
#define IIO_CONST_ATTR_TEMP_OFFSET(_string)   IIO_CONST_ATTR(in_temp_offset, _string)
 
#define IIO_CONST_ATTR_TEMP_SCALE(_string)   IIO_CONST_ATTR(in_temp_scale, _string)
 

Functions

ssize_t iio_read_const_attr (struct device *dev, struct device_attribute *attr, char *len)
 

Macro Definition Documentation

#define IIO_ATTR (   _name,
  _mode,
  _show,
  _store,
  _addr 
)
Value:
{ .dev_attr = __ATTR(_name, _mode, _show, _store), \
.address = _addr }

Definition at line 53 of file sysfs.h.

#define IIO_CONST_ATTR (   _name,
  _string 
)
Value:
struct iio_const_attr iio_const_attr_##_name \
= { .string = _string, \
.dev_attr = __ATTR(_name, S_IRUGO, iio_read_const_attr, NULL)}

Definition at line 65 of file sysfs.h.

#define IIO_CONST_ATTR_NAMED (   _vname,
  _name,
  _string 
)
Value:
struct iio_const_attr iio_const_attr_##_vname \
= { .string = _string, \
.dev_attr = __ATTR(_name, S_IRUGO, iio_read_const_attr, NULL)}

Definition at line 70 of file sysfs.h.

#define IIO_CONST_ATTR_SAMP_FREQ_AVAIL (   _string)    IIO_CONST_ATTR(sampling_frequency_available, _string)

IIO_CONST_ATTR_SAMP_FREQ_AVAIL - list available sampling frequencies : frequency string for the attribute

Constant version

Definition at line 105 of file sysfs.h.

#define IIO_CONST_ATTR_TEMP_OFFSET (   _string)    IIO_CONST_ATTR(in_temp_offset, _string)

Definition at line 111 of file sysfs.h.

#define IIO_CONST_ATTR_TEMP_SCALE (   _string)    IIO_CONST_ATTR(in_temp_scale, _string)

Definition at line 114 of file sysfs.h.

#define IIO_DEV_ATTR_RESET (   _store)    IIO_DEVICE_ATTR(reset, S_IWUSR, NULL, _store, 0)

IIO_DEV_ATTR_RESET: resets the device

Definition at line 79 of file sysfs.h.

#define IIO_DEV_ATTR_SAMP_FREQ (   _mode,
  _show,
  _store 
)    IIO_DEVICE_ATTR(sampling_frequency, _mode, _show, _store, 0)

IIO_DEV_ATTR_SAMP_FREQ - sets any internal clock frequency : sysfs file mode/permissions : output method for the attribute : input method for the attribute

Definition at line 88 of file sysfs.h.

#define IIO_DEV_ATTR_SAMP_FREQ_AVAIL (   _show)    IIO_DEVICE_ATTR(sampling_frequency_available, S_IRUGO, _show, NULL, 0)

IIO_DEV_ATTR_SAMP_FREQ_AVAIL - list available sampling frequencies : output method for the attribute

May be mode dependent on some devices

Definition at line 97 of file sysfs.h.

#define IIO_DEV_ATTR_TEMP_RAW (   _show)    IIO_DEVICE_ATTR(in_temp_raw, S_IRUGO, _show, NULL, 0)

Definition at line 108 of file sysfs.h.

#define IIO_DEVICE_ATTR (   _name,
  _mode,
  _show,
  _store,
  _addr 
)
Value:
struct iio_dev_attr iio_dev_attr_##_name \
= IIO_ATTR(_name, _mode, _show, _store, _addr)

Definition at line 57 of file sysfs.h.

#define IIO_DEVICE_ATTR_NAMED (   _vname,
  _name,
  _mode,
  _show,
  _store,
  _addr 
)
Value:
struct iio_dev_attr iio_dev_attr_##_vname \
= IIO_ATTR(_name, _mode, _show, _store, _addr)

Definition at line 61 of file sysfs.h.

#define to_iio_const_attr (   _dev_attr)    container_of(_dev_attr, struct iio_const_attr, dev_attr)

Definition at line 48 of file sysfs.h.

#define to_iio_dev_attr (   _dev_attr)    container_of(_dev_attr, struct iio_dev_attr, dev_attr)

Definition at line 30 of file sysfs.h.

Function Documentation

ssize_t iio_read_const_attr ( struct device dev,
struct device_attribute attr,
char len 
)

Definition at line 117 of file industrialio-core.c.