#include <linux/kernel.h>
#include <linux/rmi.h>
#include <linux/input.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
#include <media/videobuf2-v4l2.h>
#include <media/videobuf2-vmalloc.h>
#include "rmi_driver.h"
#define F54_NAME …
#define F54_REPORT_DATA_OFFSET …
#define F54_FIFO_OFFSET …
#define F54_NUM_TX_OFFSET …
#define F54_NUM_RX_OFFSET …
#define F54_REPORT_DATA_SIZE …
#define F54_GET_REPORT …
#define F54_FORCE_CAL …
#define F54_CAP_BASELINE …
#define F54_CAP_IMAGE8 …
#define F54_CAP_IMAGE16 …
enum rmi_f54_report_type { … };
static const char * const rmi_f54_report_type_names[] = …;
struct f54_data { … };
static bool is_f54_report_type_valid(struct f54_data *f54,
enum rmi_f54_report_type reptype)
{ … }
static enum rmi_f54_report_type rmi_f54_get_reptype(struct f54_data *f54,
unsigned int i)
{ … }
static void rmi_f54_create_input_map(struct f54_data *f54)
{ … }
static int rmi_f54_request_report(struct rmi_function *fn, u8 report_type)
{ … }
static size_t rmi_f54_get_report_size(struct f54_data *f54)
{ … }
static int rmi_f54_get_pixel_fmt(enum rmi_f54_report_type reptype, u32 *pixfmt)
{ … }
static const struct v4l2_file_operations rmi_f54_video_fops = …;
static int rmi_f54_queue_setup(struct vb2_queue *q, unsigned int *nbuffers,
unsigned int *nplanes, unsigned int sizes[],
struct device *alloc_devs[])
{ … }
static void rmi_f54_buffer_queue(struct vb2_buffer *vb)
{ … }
static void rmi_f54_stop_streaming(struct vb2_queue *q)
{ … }
static const struct vb2_ops rmi_f54_queue_ops = …;
static const struct vb2_queue rmi_f54_queue = …;
static int rmi_f54_vidioc_querycap(struct file *file, void *priv,
struct v4l2_capability *cap)
{ … }
static int rmi_f54_vidioc_enum_input(struct file *file, void *priv,
struct v4l2_input *i)
{ … }
static int rmi_f54_set_input(struct f54_data *f54, unsigned int i)
{ … }
static int rmi_f54_vidioc_s_input(struct file *file, void *priv, unsigned int i)
{ … }
static int rmi_f54_vidioc_g_input(struct file *file, void *priv,
unsigned int *i)
{ … }
static int rmi_f54_vidioc_fmt(struct file *file, void *priv,
struct v4l2_format *f)
{ … }
static int rmi_f54_vidioc_enum_fmt(struct file *file, void *priv,
struct v4l2_fmtdesc *fmt)
{ … }
static int rmi_f54_vidioc_g_parm(struct file *file, void *fh,
struct v4l2_streamparm *a)
{ … }
static const struct v4l2_ioctl_ops rmi_f54_video_ioctl_ops = …;
static const struct video_device rmi_f54_video_device = …;
static void rmi_f54_work(struct work_struct *work)
{ … }
static int rmi_f54_config(struct rmi_function *fn)
{ … }
static int rmi_f54_detect(struct rmi_function *fn)
{ … }
static int rmi_f54_probe(struct rmi_function *fn)
{ … }
static void rmi_f54_remove(struct rmi_function *fn)
{ … }
struct rmi_function_handler rmi_f54_handler = …;