diff options
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-cards.c')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-cards.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index c2d5a4d7228b..ee3f1b099145 100644 --- a/drivers/media/video/cx23885/cx23885-cards.c +++ b/drivers/media/video/cx23885/cx23885-cards.c | |||
@@ -244,6 +244,34 @@ static void hauppauge_eeprom(struct cx23885_dev *dev, u8 *eeprom_data) | |||
244 | dev->name, tv.model); | 244 | dev->name, tv.model); |
245 | } | 245 | } |
246 | 246 | ||
247 | /* Tuner callback function for cx23885 boards. Currently only needed | ||
248 | * for HVR1500Q, which has an xc5000 tuner. | ||
249 | */ | ||
250 | int cx23885_tuner_callback(void *i2c_bus, int command, int arg) | ||
251 | { | ||
252 | struct cx23885_i2c *bus = i2c_bus; | ||
253 | struct cx23885_dev *dev = bus->dev; | ||
254 | |||
255 | switch(dev->board) { | ||
256 | case CX23885_BOARD_HAUPPAUGE_HVR1500Q: | ||
257 | if(command == 0) { /* Tuner Reset Command from xc5000 */ | ||
258 | /* Drive the tuner into reset and out */ | ||
259 | cx_clear(GP0_IO, 0x00000004); | ||
260 | mdelay(200); | ||
261 | cx_set(GP0_IO, 0x00000004); | ||
262 | return 0; | ||
263 | } | ||
264 | else { | ||
265 | printk(KERN_ERR | ||
266 | "%s(): Unknow command.\n", __FUNCTION__); | ||
267 | return -EINVAL; | ||
268 | } | ||
269 | break; | ||
270 | } | ||
271 | |||
272 | return 0; /* Should never be here */ | ||
273 | } | ||
274 | EXPORT_SYMBOL(cx23885_tuner_callback); | ||
247 | void cx23885_gpio_setup(struct cx23885_dev *dev) | 275 | void cx23885_gpio_setup(struct cx23885_dev *dev) |
248 | { | 276 | { |
249 | switch(dev->board) { | 277 | switch(dev->board) { |