STRUCT IIO_BACKEND_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ 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