Skip to content

Commit 263cf5e

Browse files
committed
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: Jonathan Cameron <jic23@kernel.org> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
1 parent 78c9981 commit 263cf5e

1 file changed

Lines changed: 63 additions & 37 deletions

File tree

‎include/linux/iio/buffer.h‎

Lines changed: 63 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -74,45 +74,71 @@ struct iio_buffer_access_funcs {
7474

7575
/**
7676
* struct iio_buffer - general buffer structure
77-
* @length: [DEVICE] number of datums in buffer
78-
* @bytes_per_datum: [DEVICE] size of individual datum including timestamp
79-
* @scan_el_attrs: [DRIVER] control of scan elements if that scan mode
80-
* control method is used
81-
* @scan_mask: [INTERN] bitmask used in masking scan mode elements
82-
* @scan_timestamp: [INTERN] does the scan mode include a timestamp
83-
* @access: [DRIVER] buffer access functions associated with the
84-
* implementation.
85-
* @scan_el_dev_attr_list:[INTERN] list of scan element related attributes.
86-
* @buffer_group: [INTERN] attributes of the buffer group
87-
* @scan_el_group: [DRIVER] attribute group for those attributes not
88-
* created from the iio_chan_info array.
89-
* @pollq: [INTERN] wait queue to allow for polling on the buffer.
90-
* @stufftoread: [INTERN] flag to indicate new data.
91-
* @attrs: [INTERN] standard attributes of the buffer
92-
* @demux_list: [INTERN] list of operations required to demux the scan.
93-
* @demux_bounce: [INTERN] buffer for doing gather from incoming scan.
94-
* @buffer_list: [INTERN] entry in the devices list of current buffers.
95-
* @ref: [INTERN] reference count of the buffer.
96-
* @watermark: [INTERN] number of datums to wait for poll/read.
77+
*
78+
* Note that the internals of this structure should only be of interest to
79+
* those writing new buffer implementations.
9780
*/
9881
struct iio_buffer {
99-
int length;
100-
int bytes_per_datum;
101-
struct attribute_group *scan_el_attrs;
102-
long *scan_mask;
103-
bool scan_timestamp;
104-
const struct iio_buffer_access_funcs *access;
105-
struct list_head scan_el_dev_attr_list;
106-
struct attribute_group buffer_group;
107-
struct attribute_group scan_el_group;
108-
wait_queue_head_t pollq;
109-
bool stufftoread;
110-
const struct attribute **attrs;
111-
struct list_head demux_list;
112-
void *demux_bounce;
113-
struct list_head buffer_list;
114-
struct kref ref;
115-
unsigned int watermark;
82+
/** @length: Number of datums in buffer. */
83+
int length;
84+
85+
/** @bytes_per_datum: Size of individual datum including timestamp. */
86+
int bytes_per_datum;
87+
88+
/**
89+
* @access: Buffer access functions associated with the
90+
* implementation.
91+
*/
92+
const struct iio_buffer_access_funcs *access;
93+
94+
/** @scan_mask: Bitmask used in masking scan mode elements. */
95+
long *scan_mask;
96+
97+
/** @demux_list: List of operations required to demux the scan. */
98+
struct list_head demux_list;
99+
100+
/** @pollq: Wait queue to allow for polling on the buffer. */
101+
wait_queue_head_t pollq;
102+
103+
/** @watermark: Number of datums to wait for poll/read. */
104+
unsigned int watermark;
105+
106+
/* private: */
107+
/*
108+
* @scan_el_attrs: Control of scan elements if that scan mode
109+
* control method is used.
110+
*/
111+
struct attribute_group *scan_el_attrs;
112+
113+
/* @scan_timestamp: Does the scan mode include a timestamp. */
114+
bool scan_timestamp;
115+
116+
/* @scan_el_dev_attr_list: List of scan element related attributes. */
117+
struct list_head scan_el_dev_attr_list;
118+
119+
/* @buffer_group: Attributes of the buffer group. */
120+
struct attribute_group buffer_group;
121+
122+
/*
123+
* @scan_el_group: Attribute group for those attributes not
124+
* created from the iio_chan_info array.
125+
*/
126+
struct attribute_group scan_el_group;
127+
128+
/* @stufftoread: Flag to indicate new data. */
129+
bool stufftoread;
130+
131+
/* @attrs: Standard attributes of the buffer. */
132+
const struct attribute **attrs;
133+
134+
/* @demux_bounce: Buffer for doing gather from incoming scan. */
135+
void *demux_bounce;
136+
137+
/* @buffer_list: Entry in the devices list of current buffers. */
138+
struct list_head buffer_list;
139+
140+
/* @ref: Reference count of the buffer. */
141+
struct kref ref;
116142
};
117143

118144
/**

0 commit comments

Comments
 (0)