Lines Matching +full:read +full:- +full:to +full:- +full:read
1 /* SPDX-License-Identifier: GPL-2.0-only */
19 * struct iio_channel - everything needed for a consumer to use a channel
31 * iio_channel_get() - get description of all that is needed to access channel.
32 * @dev: Pointer to consumer device. Device name must match
34 * with which the desired provider to consumer mapping
36 * @consumer_channel: Unique name to identify the channel on the consumer
44 * iio_channel_release() - release channels obtained via iio_channel_get
45 * @chan: The channel to be released.
50 * devm_iio_channel_get() - Resource managed version of iio_channel_get().
51 * @dev: Pointer to consumer device. Device name must match
53 * with which the desired provider to consumer mapping
55 * @consumer_channel: Unique name to identify the channel on the consumer
59 * Returns a pointer to negative errno if it is not able to get the iio channel
68 * iio_channel_get_all() - get all channels associated with a client
69 * @dev: Pointer to consumer device.
73 * This function is used by fairly generic consumers to get all the
79 * iio_channel_release_all() - reverse iio_channel_get_all
80 * @chan: Array of channels to be released.
85 * devm_iio_channel_get_all() - Resource managed version of
87 * @dev: Pointer to consumer device.
89 * Returns a pointer to negative errno if it is not able to get the iio channel
93 * This function is used by fairly generic consumers to get all the
102 * fwnode_iio_channel_get_by_name() - get description of all that is needed to access channel.
103 * @fwnode: Pointer to consumer Firmware node
104 * @consumer_channel: Unique name to identify the channel on the consumer
112 * devm_fwnode_iio_channel_get_by_name() - Resource managed version of
114 * @dev: Pointer to consumer device.
115 * @fwnode: Pointer to consumer Firmware node
116 * @consumer_channel: Unique name to identify the channel on the consumer
120 * Returns a pointer to negative errno if it is not able to get the iio channel
132 * iio_channel_get_all_cb() - register callback for triggered capture
133 * @dev: Pointer to client device.
135 * @private: Private data passed to callback.
137 * NB right now we have no ability to mux data from multiple devices.
146 * iio_channel_cb_set_buffer_watermark() - set the buffer watermark.
151 * This function allows to configure the buffer watermark.
157 * iio_channel_release_all_cb() - release and unregister the callback.
163 * iio_channel_start_all_cb() - start the flow of data through callback.
169 * iio_channel_stop_all_cb() - stop the flow of data through the callback.
175 * iio_channel_cb_get_channels() - get access to the underlying channels.
179 * This function allows one to obtain information about the channels.
181 * primary aim is to allow drivers that are consuming a channel to query
188 * iio_channel_cb_get_iio_dev() - get access to the underlying device.
192 * This function allows one to obtain information about the device.
193 * The primary aim is to allow drivers that are consuming a device to query
200 * iio_read_channel_raw() - read from a given channel
202 * @val: Value read back.
205 * need the offset (default 0) and scale (default 1) to be applied
212 * iio_read_channel_average_raw() - read from a given channel
214 * @val: Value read back.
217 * need the offset (default 0) and scale (default 1) to be applied
220 * In opposit to the normal iio_read_channel_raw this function
226 * iio_read_channel_processed() - read processed value from a given channel
228 * @val: Value read back.
232 * This function will read a processed value from a channel. A processed value
241 * iio_read_channel_processed_scale() - read and scale a processed value
243 * @val: Value read back.
244 * @scale: Scale factor to apply during the conversion
248 * This function will read a processed value from a channel. This will work
250 * scale factor while attempting to minimize any precision loss.
256 * iio_write_channel_attribute() - Write values to the device attribute.
260 * @attribute: info attribute to be read.
268 * iio_read_channel_attribute() - Read values from the device attribute.
272 * @attribute: info attribute to be written.
282 * iio_write_channel_raw() - write to a given channel
286 * Note that for raw writes to iio channels, if the value provided is
288 * as (value / scale) - offset.
293 * iio_read_max_channel_raw() - read maximum available raw value from a given
296 * @val: Value read back.
299 * need the offset (default 0) and scale (default 1) to be applied
305 * iio_read_min_channel_raw() - read minimum available raw value from a given
308 * @val: Value read back.
311 * need the offset (default 0) and scale (default 1) to be applied
317 * iio_read_avail_channel_raw() - read available raw values from a given channel
319 * @vals: Available values read back.
328 * channels need the offset (default 0) and scale (default 1) to be applied
335 * iio_read_avail_channel_attribute() - read available channel attribute values
337 * @vals: Available values read back.
338 * @type: Type of values read back.
340 * @attribute: info attribute to be read back.
349 * iio_get_channel_type() - get the type of a channel
359 * iio_read_channel_offset() - read the offset value for a channel
361 * @val: First part of value read back.
362 * @val2: Second part of value read back.
372 * iio_read_channel_scale() - read the scale value for a channel
374 * @val: First part of value read back.
375 * @val2: Second part of value read back.
385 * iio_convert_raw_to_processed() - Converts a raw value to a processed value
387 * @raw: The raw IIO to convert
389 * @scale: Scale factor to apply during the conversion
393 * This function converts a raw value to processed value for a specific channel.
399 * The scale factor allows to increase the precession of the returned value. For
408 * iio_get_channel_ext_info_count() - get number of ext_info attributes
409 * connected to the channel.
417 * iio_read_channel_ext_info() - read ext_info attribute from a given channel
419 * @attr: The ext_info attribute to read.
420 * @buf: Where to store the attribute value. Assumed to hold
423 * Returns the number of bytes written to buf (perhaps w/o zero termination;
430 * iio_write_channel_ext_info() - write ext_info attribute from a given channel
432 * @attr: The ext_info attribute to read.
433 * @buf: The new attribute value. Strings needs to be zero-
445 * iio_read_channel_label() - read label for a given channel
447 * @buf: Where to store the attribute value. Assumed to hold
450 * Returns the number of bytes written to buf, or an error code.