#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/i2c.h>
#include <linux/videodev2.h>
#include <linux/slab.h>
#include <media/v4l2-device.h>
#include <media/i2c/upd64031a.h>
#define GR_MODE_MASK …
#define DIRECT_3DYCS_CONNECT_MASK …
#define SYNC_CIRCUIT_MASK …
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
static int debug;
module_param(debug, int, 0644);
MODULE_PARM_DESC(…) …;
enum { … };
struct upd64031a_state { … };
static inline struct upd64031a_state *to_state(struct v4l2_subdev *sd)
{ … }
static u8 upd64031a_init[] = …;
static u8 upd64031a_read(struct v4l2_subdev *sd, u8 reg)
{ … }
static void upd64031a_write(struct v4l2_subdev *sd, u8 reg, u8 val)
{ … }
static int upd64031a_s_frequency(struct v4l2_subdev *sd, const struct v4l2_frequency *freq)
{ … }
static int upd64031a_s_routing(struct v4l2_subdev *sd,
u32 input, u32 output, u32 config)
{ … }
static int upd64031a_log_status(struct v4l2_subdev *sd)
{ … }
#ifdef CONFIG_VIDEO_ADV_DEBUG
static int upd64031a_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
{ … }
static int upd64031a_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
{ … }
#endif
static const struct v4l2_subdev_core_ops upd64031a_core_ops = …;
static const struct v4l2_subdev_tuner_ops upd64031a_tuner_ops = …;
static const struct v4l2_subdev_video_ops upd64031a_video_ops = …;
static const struct v4l2_subdev_ops upd64031a_ops = …;
static int upd64031a_probe(struct i2c_client *client)
{ … }
static void upd64031a_remove(struct i2c_client *client)
{ … }
static const struct i2c_device_id upd64031a_id[] = …;
MODULE_DEVICE_TABLE(i2c, upd64031a_id);
static struct i2c_driver upd64031a_driver = …;
module_i2c_driver(…) …;