#include <linux/module.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/ioctl.h>
#include <linux/uaccess.h>
#include <linux/i2c.h>
#include <linux/videodev2.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ctrls.h>
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
static bool debug;
module_param(debug, bool, 0644);
MODULE_PARM_DESC(…) …;
struct cs53l32a_state { … };
static inline struct cs53l32a_state *to_state(struct v4l2_subdev *sd)
{ … }
static inline struct v4l2_subdev *to_sd(struct v4l2_ctrl *ctrl)
{ … }
static int cs53l32a_write(struct v4l2_subdev *sd, u8 reg, u8 value)
{ … }
static int cs53l32a_read(struct v4l2_subdev *sd, u8 reg)
{ … }
static int cs53l32a_s_routing(struct v4l2_subdev *sd,
u32 input, u32 output, u32 config)
{ … }
static int cs53l32a_s_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static int cs53l32a_log_status(struct v4l2_subdev *sd)
{ … }
static const struct v4l2_ctrl_ops cs53l32a_ctrl_ops = …;
static const struct v4l2_subdev_core_ops cs53l32a_core_ops = …;
static const struct v4l2_subdev_audio_ops cs53l32a_audio_ops = …;
static const struct v4l2_subdev_ops cs53l32a_ops = …;
static int cs53l32a_probe(struct i2c_client *client)
{ … }
static void cs53l32a_remove(struct i2c_client *client)
{ … }
static const struct i2c_device_id cs53l32a_id[] = …;
MODULE_DEVICE_TABLE(i2c, cs53l32a_id);
static struct i2c_driver cs53l32a_driver = …;
module_i2c_driver(…) …;