Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions
industrialio-buffer.c File Reference
#include <linux/kernel.h>
#include <linux/export.h>
#include <linux/device.h>
#include <linux/fs.h>
#include <linux/cdev.h>
#include <linux/slab.h>
#include <linux/poll.h>
#include <linux/iio/iio.h>
#include "iio_core.h"
#include <linux/iio/sysfs.h>
#include <linux/iio/buffer.h>

Go to the source code of this file.

Data Structures

struct  iio_demux_table
 

Functions

ssize_t iio_buffer_read_first_n_outer (struct file *filp, char __user *buf, size_t n, loff_t *f_ps)
 
unsigned int iio_buffer_poll (struct file *filp, struct poll_table_struct *wait)
 
void iio_buffer_init (struct iio_buffer *buffer)
 
 EXPORT_SYMBOL (iio_buffer_init)
 
int iio_buffer_register (struct iio_dev *indio_dev, const struct iio_chan_spec *channels, int num_channels)
 
 EXPORT_SYMBOL (iio_buffer_register)
 
void iio_buffer_unregister (struct iio_dev *indio_dev)
 
 EXPORT_SYMBOL (iio_buffer_unregister)
 
ssize_t iio_buffer_read_length (struct device *dev, struct device_attribute *attr, char *buf)
 
 EXPORT_SYMBOL (iio_buffer_read_length)
 
ssize_t iio_buffer_write_length (struct device *dev, struct device_attribute *attr, const char *buf, size_t len)
 
 EXPORT_SYMBOL (iio_buffer_write_length)
 
ssize_t iio_buffer_store_enable (struct device *dev, struct device_attribute *attr, const char *buf, size_t len)
 
 EXPORT_SYMBOL (iio_buffer_store_enable)
 
ssize_t iio_buffer_show_enable (struct device *dev, struct device_attribute *attr, char *buf)
 
 EXPORT_SYMBOL (iio_buffer_show_enable)
 
int iio_sw_buffer_preenable (struct iio_dev *indio_dev)
 
 EXPORT_SYMBOL (iio_sw_buffer_preenable)
 
bool iio_validate_scan_mask_onehot (struct iio_dev *indio_dev, const unsigned long *mask)
 
 EXPORT_SYMBOL_GPL (iio_validate_scan_mask_onehot)
 
int iio_scan_mask_set (struct iio_dev *indio_dev, struct iio_buffer *buffer, int bit)
 
 EXPORT_SYMBOL_GPL (iio_scan_mask_set)
 
int iio_scan_mask_query (struct iio_dev *indio_dev, struct iio_buffer *buffer, int bit)
 
 EXPORT_SYMBOL_GPL (iio_scan_mask_query)
 
int iio_push_to_buffer (struct iio_buffer *buffer, unsigned char *data)
 
 EXPORT_SYMBOL_GPL (iio_push_to_buffer)
 
int iio_update_demux (struct iio_dev *indio_dev)
 
 EXPORT_SYMBOL_GPL (iio_update_demux)
 

Function Documentation

EXPORT_SYMBOL ( iio_buffer_init  )
EXPORT_SYMBOL ( iio_buffer_register  )
EXPORT_SYMBOL ( iio_buffer_unregister  )
EXPORT_SYMBOL ( iio_buffer_read_length  )
EXPORT_SYMBOL ( iio_buffer_write_length  )
EXPORT_SYMBOL ( iio_buffer_store_enable  )
EXPORT_SYMBOL ( iio_buffer_show_enable  )
EXPORT_SYMBOL ( iio_sw_buffer_preenable  )
EXPORT_SYMBOL_GPL ( iio_validate_scan_mask_onehot  )
EXPORT_SYMBOL_GPL ( iio_scan_mask_set  )
EXPORT_SYMBOL_GPL ( iio_scan_mask_query  )
EXPORT_SYMBOL_GPL ( iio_push_to_buffer  )
EXPORT_SYMBOL_GPL ( iio_update_demux  )
void iio_buffer_init ( struct iio_buffer *  buffer)

Definition at line 67 of file industrialio-buffer.c.

unsigned int iio_buffer_poll ( struct file filp,
struct poll_table_struct wait 
)

iio_buffer_poll() - poll the buffer to find out if it has data

Definition at line 54 of file industrialio-buffer.c.

ssize_t iio_buffer_read_first_n_outer ( struct file filp,
char __user buf,
size_t  n,
loff_t *  f_ps 
)

iio_buffer_read_first_n_outer() - chrdev read for buffer access

This function relies on all buffer implementations having an iio_buffer as their first element.

Definition at line 40 of file industrialio-buffer.c.

ssize_t iio_buffer_read_length ( struct device dev,
struct device_attribute attr,
char buf 
)

Definition at line 354 of file industrialio-buffer.c.

int iio_buffer_register ( struct iio_dev indio_dev,
const struct iio_chan_spec channels,
int  num_channels 
)

Definition at line 266 of file industrialio-buffer.c.

ssize_t iio_buffer_show_enable ( struct device dev,
struct device_attribute attr,
char buf 
)

Definition at line 491 of file industrialio-buffer.c.

ssize_t iio_buffer_store_enable ( struct device dev,
struct device_attribute attr,
const char buf,
size_t  len 
)

Definition at line 401 of file industrialio-buffer.c.

void iio_buffer_unregister ( struct iio_dev indio_dev)

Definition at line 346 of file industrialio-buffer.c.

ssize_t iio_buffer_write_length ( struct device dev,
struct device_attribute attr,
const char buf,
size_t  len 
)

Definition at line 369 of file industrialio-buffer.c.

int iio_push_to_buffer ( struct iio_buffer *  buffer,
unsigned char data 
)

Definition at line 685 of file industrialio-buffer.c.

int iio_scan_mask_query ( struct iio_dev indio_dev,
struct iio_buffer *  buffer,
int  bit 
)

Definition at line 644 of file industrialio-buffer.c.

int iio_scan_mask_set ( struct iio_dev indio_dev,
struct iio_buffer *  buffer,
int  bit 
)

iio_scan_mask_set() - set particular bit in the scan mask : the buffer whose scan mask we are interested in : the bit to be set.

Definition at line 603 of file industrialio-buffer.c.

int iio_sw_buffer_preenable ( struct iio_dev indio_dev)

Definition at line 540 of file industrialio-buffer.c.

int iio_update_demux ( struct iio_dev indio_dev)

Definition at line 702 of file industrialio-buffer.c.

bool iio_validate_scan_mask_onehot ( struct iio_dev indio_dev,
const unsigned long mask 
)

iio_validate_scan_mask_onehot() - Validates that exactly one channel is selected : the iio device : scan mask to be checked

Return true if exactly one bit is set in the scan mask, false otherwise. It can be used for devices where only one channel can be active for sampling at a time.

Definition at line 582 of file industrialio-buffer.c.