#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/videodev2.h>
#include <linux/i2c.h>
#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-event.h>
#define DRIVER_VERSION …
#define DRIVER_AUTHOR …
#define DRIVER_DESC …
#define PINFO(format, ...) …
#define PWARN(format, ...) …
#define PDEBUG(format, ...) …
#define FREQ_MIN …
#define FREQ_MAX …
#define FREQ_MUL …
#define TEA5764_MANID …
#define TEA5764_CHIPID …
#define TEA5764_INTREG_BLMSK …
#define TEA5764_INTREG_FRRMSK …
#define TEA5764_INTREG_LEVMSK …
#define TEA5764_INTREG_IFMSK …
#define TEA5764_INTREG_BLMFLAG …
#define TEA5764_INTREG_FRRFLAG …
#define TEA5764_INTREG_LEVFLAG …
#define TEA5764_INTREG_IFFLAG …
#define TEA5764_FRQSET_SUD …
#define TEA5764_FRQSET_SM …
#define TEA5764_TNCTRL_PUPD1 …
#define TEA5764_TNCTRL_PUPD0 …
#define TEA5764_TNCTRL_BLIM …
#define TEA5764_TNCTRL_SWPM …
#define TEA5764_TNCTRL_IFCTC …
#define TEA5764_TNCTRL_AFM …
#define TEA5764_TNCTRL_SMUTE …
#define TEA5764_TNCTRL_SNC …
#define TEA5764_TNCTRL_MU …
#define TEA5764_TNCTRL_SSL1 …
#define TEA5764_TNCTRL_SSL0 …
#define TEA5764_TNCTRL_HLSI …
#define TEA5764_TNCTRL_MST …
#define TEA5764_TNCTRL_SWP …
#define TEA5764_TNCTRL_DTC …
#define TEA5764_TNCTRL_AHLSI …
#define TEA5764_TUNCHK_LEVEL(x) …
#define TEA5764_TUNCHK_IFCNT(x) …
#define TEA5764_TUNCHK_TUNTO …
#define TEA5764_TUNCHK_LD …
#define TEA5764_TUNCHK_STEREO …
#define TEA5764_TESTREG_TRIGFR …
struct tea5764_regs { … } __attribute__ ((packed));
struct tea5764_write_regs { … } __attribute__ ((packed));
#ifdef CONFIG_RADIO_TEA5764_XTAL
#define RADIO_TEA5764_XTAL …
#else
#define RADIO_TEA5764_XTAL …
#endif
static int radio_nr = …;
static int use_xtal = …;
struct tea5764_device { … };
static int tea5764_i2c_read(struct tea5764_device *radio)
{ … }
static int tea5764_i2c_write(struct tea5764_device *radio)
{ … }
static void tea5764_power_up(struct tea5764_device *radio)
{ … }
static void tea5764_power_down(struct tea5764_device *radio)
{ … }
static void tea5764_set_freq(struct tea5764_device *radio, int freq)
{ … }
static int tea5764_get_freq(struct tea5764_device *radio)
{ … }
static void tea5764_tune(struct tea5764_device *radio, int freq)
{ … }
static void tea5764_set_audout_mode(struct tea5764_device *radio, int audmode)
{ … }
static int tea5764_get_audout_mode(struct tea5764_device *radio)
{ … }
static void tea5764_mute(struct tea5764_device *radio, int on)
{ … }
static int vidioc_querycap(struct file *file, void *priv,
struct v4l2_capability *v)
{ … }
static int vidioc_g_tuner(struct file *file, void *priv,
struct v4l2_tuner *v)
{ … }
static int vidioc_s_tuner(struct file *file, void *priv,
const struct v4l2_tuner *v)
{ … }
static int vidioc_s_frequency(struct file *file, void *priv,
const struct v4l2_frequency *f)
{ … }
static int vidioc_g_frequency(struct file *file, void *priv,
struct v4l2_frequency *f)
{ … }
static int tea5764_s_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static const struct v4l2_ctrl_ops tea5764_ctrl_ops = …;
static const struct v4l2_file_operations tea5764_fops = …;
static const struct v4l2_ioctl_ops tea5764_ioctl_ops = …;
static const struct video_device tea5764_radio_template = …;
static int tea5764_i2c_probe(struct i2c_client *client)
{ … }
static void tea5764_i2c_remove(struct i2c_client *client)
{ … }
static const struct i2c_device_id tea5764_id[] = …;
MODULE_DEVICE_TABLE(i2c, tea5764_id);
static struct i2c_driver tea5764_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…);
MODULE_DESCRIPTION(…);
MODULE_LICENSE(…) …;
MODULE_VERSION(…);
module_param(use_xtal, int, 0);
MODULE_PARM_DESC(…) …;
module_param(radio_nr, int, 0);
MODULE_PARM_DESC(…) …;