#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/videodev2.h>
#include <linux/i2c.h>
#include <linux/delay.h>
#include <media/v4l2-common.h>
#include <media/v4l2-device.h>
#include "au8522.h"
#include "au8522_priv.h"
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
static int au8522_analog_debug;
module_param_named(analog_debug, au8522_analog_debug, int, 0644);
MODULE_PARM_DESC(…) …;
struct au8522_register_config { … };
static const struct au8522_register_config filter_coef[] = …;
#define NUM_FILTER_COEF …
static const struct au8522_register_config lpfilter_coef[] = …;
#define NUM_LPFILTER_COEF …
static inline struct au8522_state *to_state(struct v4l2_subdev *sd)
{ … }
static void setup_decoder_defaults(struct au8522_state *state, bool is_svideo)
{ … }
static void au8522_setup_cvbs_mode(struct au8522_state *state, u8 input_mode)
{ … }
static void au8522_setup_cvbs_tuner_mode(struct au8522_state *state,
u8 input_mode)
{ … }
static void au8522_setup_svideo_mode(struct au8522_state *state,
u8 input_mode)
{ … }
static void disable_audio_input(struct au8522_state *state)
{ … }
static void set_audio_input(struct au8522_state *state)
{ … }
static int au8522_s_ctrl(struct v4l2_ctrl *ctrl)
{ … }
#ifdef CONFIG_VIDEO_ADV_DEBUG
static int au8522_g_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
{ … }
static int au8522_s_register(struct v4l2_subdev *sd,
const struct v4l2_dbg_register *reg)
{ … }
#endif
static void au8522_video_set(struct au8522_state *state)
{ … }
static int au8522_s_stream(struct v4l2_subdev *sd, int enable)
{ … }
static int au8522_s_video_routing(struct v4l2_subdev *sd,
u32 input, u32 output, u32 config)
{ … }
static int au8522_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
{ … }
static int au8522_s_audio_routing(struct v4l2_subdev *sd,
u32 input, u32 output, u32 config)
{ … }
static int au8522_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
{ … }
static const struct v4l2_subdev_core_ops au8522_core_ops = …;
static const struct v4l2_subdev_tuner_ops au8522_tuner_ops = …;
static const struct v4l2_subdev_audio_ops au8522_audio_ops = …;
static const struct v4l2_subdev_video_ops au8522_video_ops = …;
static const struct v4l2_subdev_ops au8522_ops = …;
static const struct v4l2_ctrl_ops au8522_ctrl_ops = …;
static int au8522_probe(struct i2c_client *client)
{ … }
static void au8522_remove(struct i2c_client *client)
{ … }
static const struct i2c_device_id au8522_id[] = …;
MODULE_DEVICE_TABLE(i2c, au8522_id);
static struct i2c_driver au8522_driver = …;
module_i2c_driver(…) …;