#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/v4l2-dv-timings.h>
#include <media/v4l2-dv-timings.h>
#include <media/v4l2-async.h>
#include <media/v4l2-device.h>
#include "ths8200_regs.h"
static int debug;
module_param(debug, int, 0644);
MODULE_PARM_DESC(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
struct ths8200_state { … };
static const struct v4l2_dv_timings_cap ths8200_timings_cap = …;
static inline struct ths8200_state *to_state(struct v4l2_subdev *sd)
{ … }
static inline unsigned htotal(const struct v4l2_bt_timings *t)
{ … }
static inline unsigned vtotal(const struct v4l2_bt_timings *t)
{ … }
static int ths8200_read(struct v4l2_subdev *sd, u8 reg)
{ … }
static int ths8200_write(struct v4l2_subdev *sd, u8 reg, u8 val)
{ … }
static inline void
ths8200_write_and_or(struct v4l2_subdev *sd, u8 reg,
uint8_t clr_mask, uint8_t val_mask)
{ … }
#ifdef CONFIG_VIDEO_ADV_DEBUG
static int ths8200_g_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
{ … }
static int ths8200_s_register(struct v4l2_subdev *sd,
const struct v4l2_dbg_register *reg)
{ … }
#endif
static int ths8200_log_status(struct v4l2_subdev *sd)
{ … }
static int ths8200_s_power(struct v4l2_subdev *sd, int on)
{ … }
static const struct v4l2_subdev_core_ops ths8200_core_ops = …;
static int ths8200_s_stream(struct v4l2_subdev *sd, int enable)
{ … }
static void ths8200_core_init(struct v4l2_subdev *sd)
{ … }
static void ths8200_setup(struct v4l2_subdev *sd, struct v4l2_bt_timings *bt)
{ … }
static int ths8200_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
struct v4l2_dv_timings *timings)
{ … }
static int ths8200_g_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
struct v4l2_dv_timings *timings)
{ … }
static int ths8200_enum_dv_timings(struct v4l2_subdev *sd,
struct v4l2_enum_dv_timings *timings)
{ … }
static int ths8200_dv_timings_cap(struct v4l2_subdev *sd,
struct v4l2_dv_timings_cap *cap)
{ … }
static const struct v4l2_subdev_video_ops ths8200_video_ops = …;
static const struct v4l2_subdev_pad_ops ths8200_pad_ops = …;
static const struct v4l2_subdev_ops ths8200_ops = …;
static int ths8200_probe(struct i2c_client *client)
{ … }
static void ths8200_remove(struct i2c_client *client)
{ … }
static const struct i2c_device_id ths8200_id[] = …;
MODULE_DEVICE_TABLE(i2c, ths8200_id);
#if IS_ENABLED(CONFIG_OF)
static const struct of_device_id ths8200_of_match[] = …;
MODULE_DEVICE_TABLE(of, ths8200_of_match);
#endif
static struct i2c_driver ths8200_driver = …;
module_i2c_driver(…) …;