#ifndef _IIO_BACKEND_H_
#define _IIO_BACKEND_H_
#include <linux/types.h>
#include <linux/iio/iio.h>
struct iio_chan_spec;
struct fwnode_handle;
struct iio_backend;
struct device;
struct iio_dev;
enum iio_backend_data_type { … };
enum iio_backend_data_source { … };
#define iio_backend_debugfs_ptr(ptr) …
#define IIO_BACKEND_EX_INFO(_name, _shared, _what) …
struct iio_backend_data_fmt { … };
enum iio_backend_test_pattern { … };
enum iio_backend_sample_trigger { … };
struct iio_backend_ops { … };
struct iio_backend_info { … };
int iio_backend_chan_enable(struct iio_backend *back, unsigned int chan);
int iio_backend_chan_disable(struct iio_backend *back, unsigned int chan);
int devm_iio_backend_enable(struct device *dev, struct iio_backend *back);
int iio_backend_enable(struct iio_backend *back);
void iio_backend_disable(struct iio_backend *back);
int iio_backend_data_format_set(struct iio_backend *back, unsigned int chan,
const struct iio_backend_data_fmt *data);
int iio_backend_data_source_set(struct iio_backend *back, unsigned int chan,
enum iio_backend_data_source data);
int iio_backend_set_sampling_freq(struct iio_backend *back, unsigned int chan,
u64 sample_rate_hz);
int iio_backend_test_pattern_set(struct iio_backend *back,
unsigned int chan,
enum iio_backend_test_pattern pattern);
int iio_backend_chan_status(struct iio_backend *back, unsigned int chan,
bool *error);
int iio_backend_iodelay_set(struct iio_backend *back, unsigned int lane,
unsigned int taps);
int iio_backend_data_sample_trigger(struct iio_backend *back,
enum iio_backend_sample_trigger trigger);
int devm_iio_backend_request_buffer(struct device *dev,
struct iio_backend *back,
struct iio_dev *indio_dev);
ssize_t iio_backend_ext_info_set(struct iio_dev *indio_dev, uintptr_t private,
const struct iio_chan_spec *chan,
const char *buf, size_t len);
ssize_t iio_backend_ext_info_get(struct iio_dev *indio_dev, uintptr_t private,
const struct iio_chan_spec *chan, char *buf);
int iio_backend_read_raw(struct iio_backend *back,
struct iio_chan_spec const *chan, int *val, int *val2,
long mask);
int iio_backend_extend_chan_spec(struct iio_backend *back,
struct iio_chan_spec *chan);
void *iio_backend_get_priv(const struct iio_backend *conv);
struct iio_backend *devm_iio_backend_get(struct device *dev, const char *name);
struct iio_backend *devm_iio_backend_fwnode_get(struct device *dev,
const char *name,
struct fwnode_handle *fwnode);
struct iio_backend *
__devm_iio_backend_get_from_fwnode_lookup(struct device *dev,
struct fwnode_handle *fwnode);
int devm_iio_backend_register(struct device *dev,
const struct iio_backend_info *info, void *priv);
static inline int iio_backend_read_scale(struct iio_backend *back,
struct iio_chan_spec const *chan,
int *val, int *val2)
{ … }
static inline int iio_backend_read_offset(struct iio_backend *back,
struct iio_chan_spec const *chan,
int *val, int *val2)
{ … }
ssize_t iio_backend_debugfs_print_chan_status(struct iio_backend *back,
unsigned int chan, char *buf,
size_t len);
void iio_backend_debugfs_add(struct iio_backend *back,
struct iio_dev *indio_dev);
#endif