STRUCT IIO_BACKEND_OPS(9)
π NAME π
okay so bestie, welcome to the Kernel API Manual, section 9. This page is all about struct iio_backend_ops β the operations structure for an iio_backend. Think of it as the group chat of function pointers that tells your backend what it can do. π
β¨
β¨ SYNOPSIS β¨
here's the whole struct, copied exactly, no skips, no cap:
struct iio_backend_ops {
int (*enable)(struct iio_backend *back);
void (*disable)(struct iio_backend *back);
int (*chan_enable)(struct iio_backend *back, unsigned int chan);
int (*chan_disable)(struct iio_backend *back, unsigned int chan);
int (*data_format_set)(struct iio_backend *back, unsigned int chan,
const struct iio_backend_data_fmt *data);
int (*data_source_set)(struct iio_backend *back, unsigned int chan,
enum iio_backend_data_source data);
int (*data_source_get)(struct iio_backend *back, unsigned int chan,
enum iio_backend_data_source *data);
int (*set_sample_rate)(struct iio_backend *back, unsigned int chan,
u64 sample_rate_hz);
int (*test_pattern_set)(struct iio_backend *back, unsigned int chan,
enum iio_backend_test_pattern pattern);
int (*chan_status)(struct iio_backend *back, unsigned int chan, bool
*error);
int (*iodelay_set)(struct iio_backend *back, unsigned int chan,
unsigned int taps);
int (*data_sample_trigger)(struct iio_backend *back, enum
iio_backend_sample_trigger trigger);
struct iio_buffer *(*request_buffer)(struct iio_backend *back,
struct iio_dev *indio_dev);
void (*free_buffer)(struct iio_backend *back, struct iio_buffer
*buffer);
int (*extend_chan_spec)(struct iio_backend *back, struct
iio_chan_spec *chan);
int (*ext_info_set)(struct iio_backend *back, uintptr_t private,
const struct iio_chan_spec *chan, const char *buf, size_t len);
int (*ext_info_get)(struct iio_backend *back, uintptr_t private,
const struct iio_chan_spec *chan, char *buf);
int (*interface_type_get)(struct iio_backend *back, enum
iio_backend_interface_type *type);
int (*data_size_set)(struct iio_backend *back, unsigned int size);
int (*oversampling_ratio_set)(struct iio_backend *back, unsigned int
chan, unsigned int ratio);
int (*read_raw)(struct iio_backend *back, struct iio_chan_spec const
*chan, int *val, int *val2, long mask);
int (*debugfs_print_chan_status)(struct iio_backend *back, unsigned
int chan, char *buf, size_t len);
int (*debugfs_reg_access)(struct iio_backend *back, unsigned int
reg, unsigned int writeval, unsigned int *readval);
int (*filter_type_set)(struct iio_backend *back, enum
iio_backend_filter_type type);
int (*interface_data_align)(struct iio_backend *back, u32
timeout_us);
int (*num_lanes_set)(struct iio_backend *back, unsigned int
num_lanes);
int (*ddr_enable)(struct iio_backend *back);
int (*ddr_disable)(struct iio_backend *back);
int (*data_stream_enable)(struct iio_backend *back);
int (*data_stream_disable)(struct iio_backend *back);
int (*data_transfer_addr)(struct iio_backend *back, u32 address);
};
π«Ά Members π«Ά
enableβ Enable backend. yes bestie, turn it on. β¨disableβ Disable backend. turn it off, respectfully. πchan_enableβ Enable one channel. one channel gets the sparkle. πchan_disableβ Disable one channel. one channel gets the nap. π΄data_format_setβ Configure the data format for a specific channel. format vibes only. π¦data_source_setβ Configure the data source for a specific channel. source: slay. πΈdata_source_getβ Data source getter for a specific channel. getter, not setter, iykyk. πset_sample_rateβ Configure the sampling rate for a specific channel. rate check. βtest_pattern_setβ Configure a test pattern. test pattern era. π₯chan_statusβ Get the channel status. status check, bestie. πiodelay_setβ Set digital I/O delay. delay, but make it digital. πdata_sample_triggerβ Control when to sample data. timing is everything. β°request_bufferβ Request an IIO buffer. buffer request, coming right up. π«Άfree_bufferβ Free an IIO buffer. release it back to the universe. π¦extend_chan_specβ Extend an IIO channel. extend the icon. πext_info_setβ Extended info setter. setter behavior. β¨ext_info_getβ Extended info getter. getter behavior. πΈinterface_type_getβ Interface type. type reveal. πdata_size_setβ Data size. size matters, periodt. πoversampling_ratio_setβ Set Oversampling ratio. ratio set, no cap. βread_rawβ Read a channel attribute from a backend device. raw read energy. π₯debugfs_print_chan_statusβ Print channel status into a buffer. print it, bestie. πdebugfs_reg_accessβ Read or write register value of backend. reg access moment. πfilter_type_setβ Set filter type. filter type, iconic. π¦interface_data_alignβ Perform the data alignment process. alignment process, fr fr. πnum_lanes_setβ Set the number of lanes enabled. lane count, slay. β¨ddr_enableβ Enable interface DDR (Double Data Rate) mode. DDR goes on. πddr_disableβ Disable interface DDR (Double Data Rate) mode. DDR goes off. πdata_stream_enableβ Enable data stream. stream on. πΈdata_stream_disableβ Disable data stream. stream off. πdata_transfer_addrβ Set data address. address set, periodt. β
π SEE ALSO π
go check these out, they're iconic:
- Kernel file
./include/linux/iio/backend.h IIO_BACKEND_EX_INFO(9)struct iio_backend_data_fmt(9)enum iio_backend_capabilities(9)struct iio_backend_info(9)
okay bye bestie β source/version is ./include/linux/iio, dated October 2026. mwah! πβ¨π
π¦ 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