#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>
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
static int debug;
module_param(debug, int, 0);
MODULE_PARM_DESC(…) …;
struct bt866 { … };
static inline struct bt866 *to_bt866(struct v4l2_subdev *sd)
{ … }
static int bt866_write(struct bt866 *encoder, u8 subaddr, u8 data)
{ … }
static int bt866_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
{ … }
static int bt866_s_routing(struct v4l2_subdev *sd,
u32 input, u32 output, u32 config)
{ … }
#if 0
val = encoder->reg[0xdc];
if (*iarg)
val |= 1;
else
val &= ~1;
bt866_write(client, 0xdc, val);
#endif
static const struct v4l2_subdev_video_ops bt866_video_ops = …;
static const struct v4l2_subdev_ops bt866_ops = …;
static int bt866_probe(struct i2c_client *client)
{ … }
static void bt866_remove(struct i2c_client *client)
{ … }
static const struct i2c_device_id bt866_id[] = …;
MODULE_DEVICE_TABLE(i2c, bt866_id);
static struct i2c_driver bt866_driver = …;
module_i2c_driver(…) …;