24 #include <linux/slab.h>
25 #include <linux/i2c.h>
26 #include <linux/module.h>
29 #define DRIVER_NAME "timb-radio"
41 static int timbradio_vidioc_querycap(
struct file *
file,
void *
priv,
51 static int timbradio_vidioc_g_tuner(
struct file *
file,
void *
priv,
58 static int timbradio_vidioc_s_tuner(
struct file *
file,
void *
priv,
65 static int timbradio_vidioc_g_input(
struct file *filp,
void *
priv,
72 static int timbradio_vidioc_s_input(
struct file *filp,
void *
priv,
78 static int timbradio_vidioc_g_audio(
struct file *
file,
void *
priv,
87 static int timbradio_vidioc_s_audio(
struct file *
file,
void *
priv,
93 static int timbradio_vidioc_s_frequency(
struct file *
file,
void *
priv,
100 static int timbradio_vidioc_g_frequency(
struct file *
file,
void *
priv,
107 static int timbradio_vidioc_queryctrl(
struct file *
file,
void *
priv,
114 static int timbradio_vidioc_g_ctrl(
struct file *
file,
void *
priv,
121 static int timbradio_vidioc_s_ctrl(
struct file *
file,
void *
priv,
129 .vidioc_querycap = timbradio_vidioc_querycap,
130 .vidioc_g_tuner = timbradio_vidioc_g_tuner,
131 .vidioc_s_tuner = timbradio_vidioc_s_tuner,
132 .vidioc_g_frequency = timbradio_vidioc_g_frequency,
133 .vidioc_s_frequency = timbradio_vidioc_s_frequency,
134 .vidioc_g_input = timbradio_vidioc_g_input,
135 .vidioc_s_input = timbradio_vidioc_s_input,
136 .vidioc_g_audio = timbradio_vidioc_g_audio,
137 .vidioc_s_audio = timbradio_vidioc_s_audio,
138 .vidioc_queryctrl = timbradio_vidioc_queryctrl,
139 .vidioc_g_ctrl = timbradio_vidioc_g_ctrl,
140 .vidioc_s_ctrl = timbradio_vidioc_s_ctrl
155 dev_err(&pdev->
dev,
"Platform data missing\n");
172 tr->
video_dev.ioctl_ops = &timbradio_ioctl_ops;
192 platform_set_drvdata(pdev, tr);
199 dev_err(&pdev->
dev,
"Failed to register: %d\n", err);
206 struct timbradio *tr = platform_get_drvdata(pdev);
221 .probe = timbradio_probe,