#ifndef INV_ICM42600_BUFFER_H_
#define INV_ICM42600_BUFFER_H_
#include <linux/kernel.h>
#include <linux/bits.h>
struct inv_icm42600_state;
#define INV_ICM42600_SENSOR_GYRO …
#define INV_ICM42600_SENSOR_ACCEL …
#define INV_ICM42600_SENSOR_TEMP …
struct inv_icm42600_fifo { … };
struct inv_icm42600_fifo_sensor_data { … } __packed;
#define INV_ICM42600_FIFO_DATA_INVALID …
static inline int16_t inv_icm42600_fifo_get_sensor_data(__be16 d)
{ … }
static inline bool
inv_icm42600_fifo_is_data_valid(const struct inv_icm42600_fifo_sensor_data *s)
{ … }
ssize_t inv_icm42600_fifo_decode_packet(const void *packet, const void **accel,
const void **gyro, const int8_t **temp,
const void **timestamp, unsigned int *odr);
extern const struct iio_buffer_setup_ops inv_icm42600_buffer_ops;
int inv_icm42600_buffer_init(struct inv_icm42600_state *st);
void inv_icm42600_buffer_update_fifo_period(struct inv_icm42600_state *st);
int inv_icm42600_buffer_set_fifo_en(struct inv_icm42600_state *st,
unsigned int fifo_en);
int inv_icm42600_buffer_update_watermark(struct inv_icm42600_state *st);
int inv_icm42600_buffer_fifo_read(struct inv_icm42600_state *st,
unsigned int max);
int inv_icm42600_buffer_fifo_parse(struct inv_icm42600_state *st);
int inv_icm42600_buffer_hwfifo_flush(struct inv_icm42600_state *st,
unsigned int count);
#endif