STRUCT IIO_INFO(9)
struct iio_info(9) π
Okay so welcome to the Kernel API Manual page for struct iio_info(9), bestie β this is the main-character struct holding the constant information about device. No cap, thatβs literally the whole NAME vibe. π
πΈ NAME πΈ
struct iio_info β constant information about device. Thatβs it, thatβs the name, and it ate. π
β¨ SYNOPSIS β¨
struct iio_info {
const struct attribute_group *event_attrs;
const struct attribute_group *attrs;
int (*read_raw)(struct iio_dev *indio_dev, struct iio_chan_spec const *chan, int *val, int *val2, long mask);
int (*read_raw_multi)(struct iio_dev *indio_dev, struct iio_chan_spec const *chan, int max_len, int *vals, int *val_len, long mask);
int (*read_avail)(struct iio_dev *indio_dev, struct iio_chan_spec const *chan, const int **vals, int *type, int *length, long mask);
int (*write_raw)(struct iio_dev *indio_dev, struct iio_chan_spec const *chan, int val, int val2, long mask);
int (*read_label)(struct iio_dev *indio_dev, struct iio_chan_spec const *chan, char *label);
int (*write_raw_get_fmt)(struct iio_dev *indio_dev, struct iio_chan_spec const *chan, long mask);
int (*read_event_config)(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir);
int (*write_event_config)(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, bool state);
int (*read_event_value)(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, enum iio_event_info info, int *val, int *val2);
int (*write_event_value)(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, enum iio_event_info info, int val, int val2);
int (*read_event_label)(struct iio_dev *indio_dev, struct iio_chan_spec const *chan, enum iio_event_type type, enum iio_event_direction dir, char *label);
int (*validate_trigger)(struct iio_dev *indio_dev, struct iio_trigger *trig);
int (*get_current_scan_type)(const struct iio_dev *indio_dev, const struct iio_chan_spec *chan);
int (*update_scan_mode)(struct iio_dev *indio_dev, const unsigned long *scan_mask);
int (*debugfs_reg_access)(struct iio_dev *indio_dev, unsigned int reg, unsigned int writeval, unsigned int *readval);
int (*fwnode_xlate)(struct iio_dev *indio_dev, const struct fwnode_reference_args *iiospec);
int (*hwfifo_set_watermark)(struct iio_dev *indio_dev, unsigned int val);
int (*hwfifo_flush_to_buffer)(struct iio_dev *indio_dev, unsigned int count);
};
π Members π
event_attrsβ event control attributes. Cute little control panel vibes β¨attrsβ general purpose device attributes. The everyday essentials π«Άread_rawβ function to request a value from the device.maskspecifies which value. Note0means a reading of the channel in question. Return value will specify the type of value returned by the device.valandval2will contain the elements making up the returned value. πread_raw_multiβ function to return values from the device.maskspecifies which value. Note0means a reading of the channel in question. Return value will specify the type of value returned by the device.valspointer contain the elements making up the returned value.max_lenspecifies maximum number of elementsvalspointer can contain.val_lenis used to return length of valid elements invals. πread_availβ function to return the available values from the device.maskspecifies which value. Note0means the available values for the channel in question. Return value specifies if aIIO_AVAIL_LISTor aIIO_AVAIL_RANGEis returned invals. The type of thevalsare returned intypeand the number ofvalsis returned inlength. For ranges, there are always threevalsreturned; min, step and max. For lists, all possible values are enumerated. πβ¨write_rawβ function to write a value to the device. Parameters are the same as forread_raw. βοΈread_labelβ function to request label name for a specified label, for better channel identification. Slay, labels matter πwrite_raw_get_fmtβ callback function to query the expected format/precision. If not set by the driver,write_rawreturnsIIO_VAL_INT_PLUS_MICRO. π₯read_event_configβ find out if the event is enabled. π΅οΈββοΈwrite_event_configβ set if the event is enabled. βread_event_valueβ read a configuration value associated with the event. πwrite_event_valueβ write a configuration value for the event. ποΈread_event_labelβ function to request label name for a specified label, for better event identification. π·οΈvalidate_triggerβ function to validate the trigger when the current trigger gets changed. π¨get_current_scan_typeβ must be implemented by drivers that useext_scan_typein the channel spec to return the index of the currently active ext_scan type for a channel. πupdate_scan_modeβ function to configure device and scan buffer when channels have changed. πdebugfs_reg_accessβ function to read or write register value of device. π§fwnode_xlateβ fwnode based function pointer to obtain channel specifier index. π§hwfifo_set_watermarkβ function pointer to set the current hardware fifo watermark level; seehwfifo_*entries inDocumentation/ABI/testing/sysfs-bus-iiofor details on how the hardware fifo operates. π§hwfifo_flush_to_bufferβ function pointer to flush the samples stored in the hardware fifo to the device buffer. The driver should not flush more thancountsamples. The function must return the number of samples flushed,0if no samples were flushed or a negative integer if no samples were flushed and there was an error. π½β¨
π SEE ALSO π
Kernel file ./include/linux/iio/iio.h: struct iio_chan_spec_ext_info(9), struct iio_enum(9), IIO_ENUM(9), IIO_ENUM_AVAILABLE(9), struct iio_mount_matrix(9), IIO_MOUNT_MATRIX(9), struct iio_event_spec(9), IIO_SCAN_FORMAT_SIGNED_INT(9), IIO_SCAN_FORMAT_UNSIGNED_INT(9), IIO_SCAN_FORMAT_FLOAT(9), struct iio_scan_type(9), struct iio_chan_spec(9), iio_channel_has_info(9), iio_channel_has_available(9), struct iio_buffer_setup_ops(9), struct iio_dev(9), iio_device_register(9), devm_iio_device_register(9), iio_device_claim_direct(9), iio_device_release_direct(9), iio_device_try_claim_buffer_mode(9), iio_device_release_buffer_mode(9), IIO_DEV_ACQUIRE_DIRECT_MODE(9), IIO_DEV_ACQUIRE_FAILED(9), IIO_DEV_GUARD_CURRENT_MODE(9), iio_device_put(9), dev_to_iio_dev(9), iio_device_get(9), iio_device_set_parent(9), iio_device_set_drvdata(9), iio_device_get_drvdata(9), IIO_DECLARE_BUFFER_WITH_TS(9), IIO_DECLARE_DMA_BUFFER_WITH_TS(9), IIO_DECLARE_QUATERNION(9), iio_get_debugfs_dentry(9), iio_device_suspend_triggering(9), iio_device_resume_triggering(9), iio_get_current_scan_type(9), iio_get_masklength(9), iio_for_each_active_channel(9), IIO_DEGREE_TO_RAD(9), IIO_RAD_TO_DEGREE(9), IIO_G_TO_M_S_2(9), IIO_M_S_2_TO_G(9).
mwah π β source: ./include/linux/iio, version/date: October 2026, page: struct iio_info(9). Byeee, go read the kernel docs bestie π«Άπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms