Lines Matching +full:attribute +full:- +full:set
1 /* SPDX-License-Identifier: GPL-2.0-only */
39 * struct iio_chan_spec_ext_info - Extended channel info attribute
40 * @name: Info attribute name
41 * @shared: Whether this attribute is shared between all channels.
42 * @read: Read callback for this info attribute, may be NULL.
43 * @write: Write callback for this info attribute, may be NULL.
58 * struct iio_enum - Enum channel info attribute
61 * @set: Set callback function, may be NULL.
65 * Enum style attributes are those which have a set of strings which map to
68 * contains a list of all available items. The set callback will be called when
69 * the attribute is updated. The last parameter is the index to the newly
76 int (*set)(struct iio_dev *, const struct iio_chan_spec *, unsigned int); member
89 * IIO_ENUM() - Initialize enum extended channel attribute
90 * @_name: Attribute name
91 * @_shared: Whether the attribute is shared between all channels
106 * IIO_ENUM_AVAILABLE() - Initialize enum available extended channel attribute
107 * @_name: Attribute name ("_available" will be appended to the name)
108 * @_shared: Whether the attribute is shared between all channels
111 * Creates a read only attribute which lists all the available enum items in a
123 * struct iio_mount_matrix - iio mounting matrix
140 * IIO_MOUNT_MATRIX() - Initialize mount matrix extended channel attribute
141 * @_shared: Whether the attribute is shared between all channels
153 * struct iio_event_spec - specification for a channel event
157 * set in this mask will be registered per channel.
159 * set in this mask will be shared by channel type.
161 * set in this mask will be shared by channel type and
164 * set in this mask will be shared by all channels.
176 * struct iio_chan_spec - specification of a single channel
180 * channel then this is it. If modified is set then the
220 * have its name field set to NULL.
225 * iio_info->read_label() to override the label, which
227 * @datasheet_name: A name used in in-kernel mapping of channels. It should
230 * possible compound name (e.g. IND-INC).
232 * depends on the channel type. Modifier is set in
276 * iio_channel_has_info() - Checks whether a channel supports a info attribute
278 * @type: Type of the info attribute to be checked
281 * attribute type, false otherwise.
286 return (chan->info_mask_separate & BIT(type)) | in iio_channel_has_info()
287 (chan->info_mask_shared_by_type & BIT(type)) | in iio_channel_has_info()
288 (chan->info_mask_shared_by_dir & BIT(type)) | in iio_channel_has_info()
289 (chan->info_mask_shared_by_all & BIT(type)); in iio_channel_has_info()
293 * iio_channel_has_available() - Checks if a channel has an available attribute
295 * @type: Type of the available attribute to be checked
298 * given attribute type, false otherwise.
303 return (chan->info_mask_separate_available & BIT(type)) | in iio_channel_has_available()
304 (chan->info_mask_shared_by_type_available & BIT(type)) | in iio_channel_has_available()
305 (chan->info_mask_shared_by_dir_available & BIT(type)) | in iio_channel_has_available()
306 (chan->info_mask_shared_by_all_available & BIT(type)); in iio_channel_has_available()
311 .channel = -1, \
326 * on-demand reads.
327 * b) A new value after performing an on-demand read otherwise.
328 * On most devices, this is a single-shot read. On some devices with data
329 * streams without an 'on-demand' function, this might also be the 'last value'
337 * The core will ensure this mode is set when registering a triggered buffer
346 * The core will ensure this mode is set when registering a simple kfifo buffer
353 * The core will ensure this mode is set when registering a dmaengine buffer
362 * The core will ensure this mode is set when registering a triggered event.
395 * struct iio_info - constant information about device
424 * format/precision. If not set by the driver, write_raw
427 * @write_event_config: set if the event is enabled.
436 * When #iio-cells is greater than '0', the driver could
442 * @hwfifo_set_watermark: function pointer to set the current hardware
444 * Documentation/ABI/testing/sysfs-bus-iio for details on
529 * struct iio_buffer_setup_ops - buffer setup related callbacks
548 * struct iio_dev - industrial I/O device
563 * @scan_timestamp: [INTERN] set if any buffers have requested timestamp
610 * iio_device_register() - register a device with the IIO subsystem
618 * devm_iio_device_register - Resource-managed iio_device_register()
643 * iio_device_put() - reference counted deallocation of struct device
649 put_device(&indio_dev->dev); in iio_device_put()
656 * dev_to_iio_dev() - Get IIO device struct from a device struct
667 * iio_device_get() - increment reference count for the device
674 return indio_dev ? dev_to_iio_dev(get_device(&indio_dev->dev)) : NULL; in iio_device_get()
678 * iio_device_set_parent() - assign parent device to the IIO device object
695 indio_dev->dev.parent = parent; in iio_device_set_parent()
699 * iio_device_set_drvdata() - Set device driver data
708 dev_set_drvdata(&indio_dev->dev, data); in iio_device_set_drvdata()
712 * iio_device_get_drvdata() - Get device driver data
715 * Returns the data previously set with iio_device_set_drvdata()
719 return dev_get_drvdata(&indio_dev->dev); in iio_device_get_drvdata()
726 * them safe for use with non-coherent DMA.
734 return indio_dev->priv; in iio_priv()
747 * iio_get_debugfs_dentry() - helper function to get the debugfs_dentry
765 * IIO_DEGREE_TO_RAD() - Convert degree to rad
773 * IIO_RAD_TO_DEGREE() - Convert rad to degree
782 * IIO_G_TO_M_S_2() - Convert g to meter / second**2
790 * IIO_M_S_2_TO_G() - Convert meter / second**2 to g