Lines Matching +full:iio +full:- +full:consumer
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Industrial I/O in kernel consumer interface
11 #include <linux/iio/types.h>
19 * struct iio_channel - everything needed for a consumer to use a channel
22 * @data: Data about the channel used by consumer.
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
38 * the consumer. E.g. 'battery_voltage'
44 * iio_channel_release() - release channels obtained via iio_channel_get
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
57 * the consumer. E.g. 'battery_voltage'
59 * Returns a pointer to negative errno if it is not able to get the iio channel
60 * otherwise returns valid pointer for iio channel.
62 * The allocated iio channel is automatically released when the device is
68 * iio_channel_get_all() - get all channels associated with a client
69 * @dev: Pointer to consumer device.
74 * channels registered as having this consumer.
79 * iio_channel_release_all() - reverse iio_channel_get_all
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
94 * channels registered as having this consumer.
96 * The allocated iio channels are automatically released when the device is
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
106 * the consumer. E.g. 'battery_voltage'
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
118 * the consumer. E.g. 'battery_voltage'
120 * Returns a pointer to negative errno if it is not able to get the iio channel
121 * otherwise returns valid pointer for iio channel.
123 * The allocated iio channel is automatically released when the device is
132 * iio_channel_get_all_cb() - register callback for triggered capture
146 * iio_channel_cb_set_buffer_watermark() - set 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.
188 * iio_channel_cb_get_iio_dev() - get access to the underlying device.
200 * iio_read_channel_raw() - read from a given channel
204 * Note, if standard units are required, raw reads from iio channels
212 * iio_read_channel_average_raw() - read from a given channel
216 * Note, if standard units are required, raw reads from iio channels
226 * iio_read_channel_processed() - read processed value from a given channel
241 * iio_read_channel_processed_scale() - read and scale a processed value
256 * iio_write_channel_attribute() - Write values to the device attribute.
268 * iio_read_channel_attribute() - Read values from the device attribute.
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
298 * Note, if standard units are required, raw reads from iio channels
305 * iio_read_min_channel_raw() - read minimum available raw value from a given
310 * Note, if standard units are required, raw reads from iio channels
317 * iio_read_avail_channel_raw() - read available raw values from a given channel
327 * Note, if standard units are required, raw available values from iio
335 * iio_read_avail_channel_attribute() - read available channel attribute values
349 * iio_get_channel_type() - get the type of a channel
359 * iio_read_channel_offset() - read the offset value for a channel
372 * iio_read_channel_scale() - read the scale value for a channel
385 * iio_convert_raw_to_processed() - Converts a raw value to a processed value
387 * @raw: The raw IIO to convert
397 * according with the IIO specification.
400 * a scale factor of 1 the function will return the result in the normal IIO
408 * iio_get_channel_ext_info_count() - get number of ext_info attributes
417 * iio_read_channel_ext_info() - read ext_info attribute from a given channel
430 * iio_write_channel_ext_info() - write ext_info attribute from a given channel
433 * @buf: The new attribute value. Strings needs to be zero-
445 * iio_read_channel_label() - read label for a given channel