#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/videodev2.h>
#include <media/i2c/adv7183.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
#include "adv7183_regs.h"
struct adv7183 { … };
static const unsigned char adv7183_init_regs[] = …;
static inline struct adv7183 *to_adv7183(struct v4l2_subdev *sd)
{ … }
static inline struct v4l2_subdev *to_sd(struct v4l2_ctrl *ctrl)
{ … }
static inline int adv7183_read(struct v4l2_subdev *sd, unsigned char reg)
{ … }
static inline int adv7183_write(struct v4l2_subdev *sd, unsigned char reg,
unsigned char value)
{ … }
static int adv7183_writeregs(struct v4l2_subdev *sd,
const unsigned char *regs, unsigned int num)
{ … }
static int adv7183_log_status(struct v4l2_subdev *sd)
{ … }
static int adv7183_g_std(struct v4l2_subdev *sd, v4l2_std_id *std)
{ … }
static int adv7183_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
{ … }
static int adv7183_reset(struct v4l2_subdev *sd, u32 val)
{ … }
static int adv7183_s_routing(struct v4l2_subdev *sd,
u32 input, u32 output, u32 config)
{ … }
static int adv7183_s_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static int adv7183_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
{ … }
static int adv7183_g_input_status(struct v4l2_subdev *sd, u32 *status)
{ … }
static int adv7183_enum_mbus_code(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_mbus_code_enum *code)
{ … }
static int adv7183_set_fmt(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *format)
{ … }
static int adv7183_get_fmt(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *format)
{ … }
static int adv7183_s_stream(struct v4l2_subdev *sd, int enable)
{ … }
#ifdef CONFIG_VIDEO_ADV_DEBUG
static int adv7183_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
{ … }
static int adv7183_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
{ … }
#endif
static const struct v4l2_ctrl_ops adv7183_ctrl_ops = …;
static const struct v4l2_subdev_core_ops adv7183_core_ops = …;
static const struct v4l2_subdev_video_ops adv7183_video_ops = …;
static const struct v4l2_subdev_pad_ops adv7183_pad_ops = …;
static const struct v4l2_subdev_ops adv7183_ops = …;
static int adv7183_probe(struct i2c_client *client)
{ … }
static void adv7183_remove(struct i2c_client *client)
{ … }
static const struct i2c_device_id adv7183_id[] = …;
MODULE_DEVICE_TABLE(i2c, adv7183_id);
static struct i2c_driver adv7183_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;