Lines Matching +full:function +full:- +full:mask

1 /* SPDX-License-Identifier: GPL-2.0-only */
40 * struct iio_chan_spec_ext_info - Extended channel info attribute
59 * struct iio_enum - Enum channel info attribute
62 * @set: Set callback function, may be NULL.
63 * @get: Get callback function, may be NULL.
90 * IIO_ENUM() - Initialize enum extended channel attribute
107 * IIO_ENUM_AVAILABLE() - Initialize enum available extended channel attribute
124 * struct iio_mount_matrix - iio mounting matrix
141 * IIO_MOUNT_MATRIX() - Initialize mount matrix extended channel attribute
154 * struct iio_event_spec - specification for a channel event
157 * @mask_separate: Bit mask of enum iio_event_info values. Attributes
158 * set in this mask will be registered per channel.
159 * @mask_shared_by_type: Bit mask of enum iio_event_info values. Attributes
160 * set in this mask will be shared by channel type.
161 * @mask_shared_by_dir: Bit mask of enum iio_event_info values. Attributes
162 * set in this mask will be shared by channel type and
164 * @mask_shared_by_all: Bit mask of enum iio_event_info values. Attributes
165 * set in this mask will be shared by all channels.
177 * struct iio_scan_type - specification for channel data format in buffer
198 * struct iio_chan_spec - specification of a single channel
207 * @scan_type: struct describing the scan type - mutually exclusive
242 * iio_info->read_label() to override the label, which
244 * @datasheet_name: A name used in in-kernel mapping of channels. It should
247 * possible compound name (e.g. IND-INC).
294 * iio_channel_has_info() - Checks whether a channel supports a info attribute
304 return (chan->info_mask_separate & BIT(type)) | in iio_channel_has_info()
305 (chan->info_mask_shared_by_type & BIT(type)) | in iio_channel_has_info()
306 (chan->info_mask_shared_by_dir & BIT(type)) | in iio_channel_has_info()
307 (chan->info_mask_shared_by_all & BIT(type)); in iio_channel_has_info()
311 * iio_channel_has_available() - Checks if a channel has an available attribute
321 return (chan->info_mask_separate_available & BIT(type)) | in iio_channel_has_available()
322 (chan->info_mask_shared_by_type_available & BIT(type)) | in iio_channel_has_available()
323 (chan->info_mask_shared_by_dir_available & BIT(type)) | in iio_channel_has_available()
324 (chan->info_mask_shared_by_all_available & BIT(type)); in iio_channel_has_available()
329 .channel = -1, \
344 * on-demand reads.
345 * b) A new value after performing an on-demand read otherwise.
346 * On most devices, this is a single-shot read. On some devices with data
347 * streams without an 'on-demand' function, this might also be the 'last value'
353 * attach a poll function when enabling the buffer, which is indicated by the
358 * No poll function can be attached because there is no triggered infrastructure
363 * any poll function when enabling the buffer.
413 * struct iio_info - constant information about device
416 * @read_raw: function to request a value from the device.
417 * mask specifies which value. Note 0 means a reading of
421 * @read_raw_multi: function to return values from the device.
422 * mask specifies which value. Note 0 means a reading of
429 * @read_avail: function to return the available values from the device.
430 * mask specifies which value. Note 0 means the available
437 * @write_raw: function to write a value to the device.
439 * @read_label: function to request label name for a specified label,
441 * @write_raw_get_fmt: callback function to query the expected
448 * @read_event_label: function to request label name for a specified label,
450 * @validate_trigger: function to validate the trigger when the
455 * @update_scan_mode: function to configure device and scan buffer when
457 * @debugfs_reg_access: function to read or write register value of device
458 * @fwnode_xlate: fwnode based function pointer to obtain channel specifier index.
459 * @hwfifo_set_watermark: function pointer to set the current hardware
461 * Documentation/ABI/testing/sysfs-bus-iio for details on
463 * @hwfifo_flush_to_buffer: function pointer to flush the samples stored
465 * should not flush more than count samples. The function
478 long mask);
485 long mask);
492 long mask);
498 long mask);
506 long mask);
554 * struct iio_buffer_setup_ops - buffer setup related callbacks
555 * @preenable: [DRIVER] function to run prior to marking buffer enabled
556 * @postenable: [DRIVER] function to run after marking buffer enabled
557 * @predisable: [DRIVER] function to run prior to marking buffer
559 * @postdisable: [DRIVER] function to run after marking buffer disabled
560 * @validate_scan_mask: [DRIVER] function callback to check whether a given
561 * scan mask is valid for the device.
573 * struct iio_dev - industrial I/O device
587 * @masklength: [INTERN] the length of the mask established from
592 * @pollfunc: [DRIVER] function run on trigger being received
593 * @pollfunc_event: [DRIVER] function run on events trigger being received
637 * iio_device_register() - register a device with the IIO subsystem
645 * devm_iio_device_register - Resource-managed iio_device_register()
650 * function is automatically unregistered on driver detach. This function
651 * calls iio_device_register() internally. Refer to that function for more
684 * iio_device_claim_direct_scoped() - Scoped call to iio_device_claim_direct.
697 * iio_device_put() - reference counted deallocation of struct device
703 put_device(&indio_dev->dev); in iio_device_put()
710 * dev_to_iio_dev() - Get IIO device struct from a device struct
721 * iio_device_get() - increment reference count for the device
728 return indio_dev ? dev_to_iio_dev(get_device(&indio_dev->dev)) : NULL; in iio_device_get()
732 * iio_device_set_parent() - assign parent device to the IIO device object
749 indio_dev->dev.parent = parent; in iio_device_set_parent()
753 * iio_device_set_drvdata() - Set device driver data
762 dev_set_drvdata(&indio_dev->dev, data); in iio_device_set_drvdata()
766 * iio_device_get_drvdata() - Get device driver data
773 return dev_get_drvdata(&indio_dev->dev); in iio_device_get_drvdata()
780 * them safe for use with non-coherent DMA.
788 return indio_dev->priv; in iio_priv()
801 * iio_get_debugfs_dentry() - helper function to get the debugfs_dentry
814 * iio_device_suspend_triggering() - suspend trigger attached to an iio_dev
822 * iio_device_resume_triggering() - resume trigger attached to an iio_dev
844 * iio_get_current_scan_type - Get the current scan type for a channel
849 * directly without calling this function. Core IIO code and drivers that
850 * implement ext_scan_type in the channel spec should use this function to
861 if (chan->has_ext_scan_type) { in iio_get_current_scan_type()
862 ret = indio_dev->info->get_current_scan_type(indio_dev, chan); in iio_get_current_scan_type()
866 if (ret >= chan->num_ext_scan_type) in iio_get_current_scan_type()
867 return ERR_PTR(-EINVAL); in iio_get_current_scan_type()
869 return &chan->ext_scan_type[ret]; in iio_get_current_scan_type()
872 return &chan->scan_type; in iio_get_current_scan_type()
876 * iio_get_masklength - Get length of the channels mask
887 * iio_for_each_active_channel - Iterated over active channels
892 for_each_set_bit((chan), (indio_dev)->active_scan_mask, \
901 * IIO_DEGREE_TO_RAD() - Convert degree to rad
909 * IIO_RAD_TO_DEGREE() - Convert rad to degree
918 * IIO_G_TO_M_S_2() - Convert g to meter / second**2
926 * IIO_M_S_2_TO_G() - Convert meter / second**2 to g