#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <media/i2c/ths7303.h>
#include <media/v4l2-device.h>
#define THS7303_CHANNEL_1 …
#define THS7303_CHANNEL_2 …
#define THS7303_CHANNEL_3 …
struct ths7303_state { … };
enum ths7303_filter_mode { … };
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
static inline struct ths7303_state *to_state(struct v4l2_subdev *sd)
{ … }
static int ths7303_read(struct v4l2_subdev *sd, u8 reg)
{ … }
static int ths7303_write(struct v4l2_subdev *sd, u8 reg, u8 val)
{ … }
static int ths7303_setval(struct v4l2_subdev *sd,
enum ths7303_filter_mode mode)
{ … }
static int ths7303_s_std_output(struct v4l2_subdev *sd, v4l2_std_id norm)
{ … }
static int ths7303_config(struct v4l2_subdev *sd)
{ … }
static int ths7303_s_stream(struct v4l2_subdev *sd, int enable)
{ … }
static int ths7303_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
struct v4l2_dv_timings *dv_timings)
{ … }
static const struct v4l2_subdev_video_ops ths7303_video_ops = …;
#ifdef CONFIG_VIDEO_ADV_DEBUG
static int ths7303_g_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
{ … }
static int ths7303_s_register(struct v4l2_subdev *sd,
const struct v4l2_dbg_register *reg)
{ … }
#endif
static const char * const stc_lpf_sel_txt[4] = …;
static const char * const in_mux_sel_txt[2] = …;
static const char * const lpf_freq_sel_txt[4] = …;
static const char * const in_bias_sel_dis_cont_txt[8] = …;
static void ths7303_log_channel_status(struct v4l2_subdev *sd, u8 reg)
{ … }
static int ths7303_log_status(struct v4l2_subdev *sd)
{ … }
static const struct v4l2_subdev_core_ops ths7303_core_ops = …;
static const struct v4l2_subdev_pad_ops ths7303_pad_ops = …;
static const struct v4l2_subdev_ops ths7303_ops = …;
static int ths7303_probe(struct i2c_client *client)
{ … }
static void ths7303_remove(struct i2c_client *client)
{ … }
static const struct i2c_device_id ths7303_id[] = …;
MODULE_DEVICE_TABLE(i2c, ths7303_id);
static struct i2c_driver ths7303_driver = …;
module_i2c_driver(…) …;