summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tuner-driver.h
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-08-21 01:24:42 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-09 22:07:34 -0300
commitdb8a695658cda21eacfa2a5e3b15e8964bfb93ef (patch)
treeac69f32af5b52f78ad65ad1125d330aa19c7bdda /drivers/media/video/tuner-driver.h
parent293197cd0f34eb6bfb5492a63a878575b69e9df4 (diff)
V4L/DVB (6127): tuner: kill i2c_client interface to tuner sub-drivers
To ease the conversion of the analog tuner sub-drivers into dvb_frontend style tuner modules, we must remove the i2c_client interface. dvb_frontend style tuner modules use i2c_transfer directly on the i2c_adapter. This change only alters the interface between tuner.ko and the tuner sub-drivers. The v4l2 / i2c_client interface to tuner.ko remains intact. This patch adds inline functions tuner_i2c_xfer_send, and tuner_i2c_xfer_recv, to replace i2c_master_send and i2c_master_recv inside the tuner sub-drivers. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Acked-by: Hans Verkuil <hverkuil@xs4all.nl> Acked-by: Mike Isely <isely@pobox.com> Acked-by: Steven Toth <stoth@hauppauge.com> Acked-by: Patrick Boettcher <pb@linuxtv.org> Acked-by: Jarod Wilson <jwilson@redhat.com> Acked-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/tuner-driver.h')
-rw-r--r--drivers/media/video/tuner-driver.h37
1 files changed, 20 insertions, 17 deletions
diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h
index 145045561a5..3cd1d446f2f 100644
--- a/drivers/media/video/tuner-driver.h
+++ b/drivers/media/video/tuner-driver.h
@@ -24,18 +24,21 @@
#include <linux/videodev2.h>
#include <linux/i2c.h>
+#include "tuner-i2c.h"
extern unsigned const int tuner_count;
+struct tuner;
+
struct tuner_operations {
- void (*set_tv_freq)(struct i2c_client *c, unsigned int freq);
- void (*set_radio_freq)(struct i2c_client *c, unsigned int freq);
- int (*has_signal)(struct i2c_client *c);
- int (*is_stereo)(struct i2c_client *c);
- int (*get_afc)(struct i2c_client *c);
- void (*tuner_status)(struct i2c_client *c);
- void (*standby)(struct i2c_client *c);
- void (*release)(struct i2c_client *c);
+ void (*set_tv_freq)(struct tuner *t, unsigned int freq);
+ void (*set_radio_freq)(struct tuner *t, unsigned int freq);
+ int (*has_signal)(struct tuner *t);
+ int (*is_stereo)(struct tuner *t);
+ int (*get_afc)(struct tuner *t);
+ void (*tuner_status)(struct tuner *t);
+ void (*standby)(struct tuner *t);
+ void (*release)(struct tuner *t);
};
struct tuner {
@@ -66,20 +69,20 @@ struct tuner {
/* ------------------------------------------------------------------------ */
-extern int default_tuner_init(struct i2c_client *c);
+extern int default_tuner_init(struct tuner *t);
-extern int tda9887_tuner_init(struct i2c_client *c);
+extern int tda9887_tuner_init(struct tuner *t);
-extern int microtune_init(struct i2c_client *c);
+extern int microtune_init(struct tuner *t);
-extern int tda8290_init(struct i2c_client *c);
-extern int tda8290_probe(struct i2c_client *c);
+extern int tda8290_init(struct tuner *t);
+extern int tda8290_probe(struct tuner *t);
-extern int tea5761_tuner_init(struct i2c_client *c);
-extern int tea5761_autodetection(struct i2c_client *c);
+extern int tea5761_tuner_init(struct tuner *t);
+extern int tea5761_autodetection(struct tuner *t);
-extern int tea5767_autodetection(struct i2c_client *c);
-extern int tea5767_tuner_init(struct i2c_client *c);
+extern int tea5767_autodetection(struct tuner *t);
+extern int tea5767_tuner_init(struct tuner *t);
/* ------------------------------------------------------------------------ */