Commit 263cf5e6 authored by Jonathan Cameron's avatar Jonathan Cameron

iio:buffer.h Reformat structure comments to be inline.

This should make it easier to see how the structure is split into
public and private parts - reflected in the generated documentation.

Deliberately use /* instead of /** for the private elements to avoid
warnings when kernel-doc script runs.
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
Reviewed-by: default avatarLars-Peter Clausen <lars@metafoo.de>
parent 78c9981f
...@@ -74,45 +74,71 @@ struct iio_buffer_access_funcs { ...@@ -74,45 +74,71 @@ struct iio_buffer_access_funcs {
/** /**
* struct iio_buffer - general buffer structure * struct iio_buffer - general buffer structure
* @length: [DEVICE] number of datums in buffer *
* @bytes_per_datum: [DEVICE] size of individual datum including timestamp * Note that the internals of this structure should only be of interest to
* @scan_el_attrs: [DRIVER] control of scan elements if that scan mode * those writing new buffer implementations.
* control method is used
* @scan_mask: [INTERN] bitmask used in masking scan mode elements
* @scan_timestamp: [INTERN] does the scan mode include a timestamp
* @access: [DRIVER] buffer access functions associated with the
* implementation.
* @scan_el_dev_attr_list:[INTERN] list of scan element related attributes.
* @buffer_group: [INTERN] attributes of the buffer group
* @scan_el_group: [DRIVER] attribute group for those attributes not
* created from the iio_chan_info array.
* @pollq: [INTERN] wait queue to allow for polling on the buffer.
* @stufftoread: [INTERN] flag to indicate new data.
* @attrs: [INTERN] standard attributes of the buffer
* @demux_list: [INTERN] list of operations required to demux the scan.
* @demux_bounce: [INTERN] buffer for doing gather from incoming scan.
* @buffer_list: [INTERN] entry in the devices list of current buffers.
* @ref: [INTERN] reference count of the buffer.
* @watermark: [INTERN] number of datums to wait for poll/read.
*/ */
struct iio_buffer { struct iio_buffer {
/** @length: Number of datums in buffer. */
int length; int length;
/** @bytes_per_datum: Size of individual datum including timestamp. */
int bytes_per_datum; int bytes_per_datum;
struct attribute_group *scan_el_attrs;
/**
* @access: Buffer access functions associated with the
* implementation.
*/
const struct iio_buffer_access_funcs *access;
/** @scan_mask: Bitmask used in masking scan mode elements. */
long *scan_mask; long *scan_mask;
/** @demux_list: List of operations required to demux the scan. */
struct list_head demux_list;
/** @pollq: Wait queue to allow for polling on the buffer. */
wait_queue_head_t pollq;
/** @watermark: Number of datums to wait for poll/read. */
unsigned int watermark;
/* private: */
/*
* @scan_el_attrs: Control of scan elements if that scan mode
* control method is used.
*/
struct attribute_group *scan_el_attrs;
/* @scan_timestamp: Does the scan mode include a timestamp. */
bool scan_timestamp; bool scan_timestamp;
const struct iio_buffer_access_funcs *access;
/* @scan_el_dev_attr_list: List of scan element related attributes. */
struct list_head scan_el_dev_attr_list; struct list_head scan_el_dev_attr_list;
/* @buffer_group: Attributes of the buffer group. */
struct attribute_group buffer_group; struct attribute_group buffer_group;
/*
* @scan_el_group: Attribute group for those attributes not
* created from the iio_chan_info array.
*/
struct attribute_group scan_el_group; struct attribute_group scan_el_group;
wait_queue_head_t pollq;
/* @stufftoread: Flag to indicate new data. */
bool stufftoread; bool stufftoread;
/* @attrs: Standard attributes of the buffer. */
const struct attribute **attrs; const struct attribute **attrs;
struct list_head demux_list;
/* @demux_bounce: Buffer for doing gather from incoming scan. */
void *demux_bounce; void *demux_bounce;
/* @buffer_list: Entry in the devices list of current buffers. */
struct list_head buffer_list; struct list_head buffer_list;
/* @ref: Reference count of the buffer. */
struct kref ref; struct kref ref;
unsigned int watermark;
}; };
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment