From cbdc80ed8f59e204c031b52ea7e44f419029f75b Mon Sep 17 00:00:00 2001
From: Antti Palosaari <crope@iki.fi>
Date: Sun, 21 Jan 2007 15:56:10 -0300
Subject: V4L/DVB (5137): Dvb: add new qt1010 tuner module

QT1010:
- old qt1010-code totally rewritten and put in own kernel module
- same enhancements as my earlier QT1010 125kHz patch
- tuner initialization
- register 1f calculation
- register 20 calculation
- register 25 calculation

m920x: (MSI Megasky)
- use new QT1010 module instead of old code

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---
 drivers/media/dvb/dvb-usb/m920x.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

(limited to 'drivers/media/dvb/dvb-usb/m920x.c')

diff --git a/drivers/media/dvb/dvb-usb/m920x.c b/drivers/media/dvb/dvb-usb/m920x.c
index d47245e9fe7..fd9d19b9cf2 100644
--- a/drivers/media/dvb/dvb-usb/m920x.c
+++ b/drivers/media/dvb/dvb-usb/m920x.c
@@ -383,6 +383,17 @@ static int m9206_firmware_download(struct usb_device *udev, const struct firmwar
 	return ret;
 }
 
+static struct qt1010_config megasky_qt1010_config = {
+	.i2c_address = 0xc4
+};
+
+static int megasky_tuner_attach(struct dvb_usb_adapter *adap)
+{
+	return dvb_attach(qt1010_attach,
+			  adap->fe, &adap->dev->i2c_adap,
+			  &megasky_qt1010_config) == NULL ? -ENODEV : 0;
+}
+
 /* DVB USB Driver stuff */
 static struct dvb_usb_device_properties megasky_properties;
 
@@ -442,7 +453,7 @@ static struct dvb_usb_device_properties megasky_properties = {
 		.pid_filter_ctrl  = m9206_pid_filter_ctrl,
 
 		.frontend_attach  = megasky_frontend_attach,
-		.tuner_attach     = qt1010_tuner_attach,
+		.tuner_attach     = megasky_tuner_attach,
 
 		.stream = {
 			.type = USB_BULK,
-- 
cgit v1.2.3-70-g09d2