diff options
Diffstat (limited to 'drivers/media/dvb/dvb-usb/gl861.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/gl861.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/drivers/media/dvb/dvb-usb/gl861.c b/drivers/media/dvb/dvb-usb/gl861.c index 7dbfc7927880..200ba13d1d19 100644 --- a/drivers/media/dvb/dvb-usb/gl861.c +++ b/drivers/media/dvb/dvb-usb/gl861.c | |||
@@ -116,6 +116,29 @@ static int gl861_frontend_attach(struct dvb_usb_adapter *adap) | |||
116 | return -EIO; | 116 | return -EIO; |
117 | } | 117 | } |
118 | 118 | ||
119 | static struct qt1010_config gl861_qt1010_config = { | ||
120 | .i2c_address = 0xc4 | ||
121 | }; | ||
122 | |||
123 | static int gl861_tuner_attach(struct dvb_usb_adapter *adap) | ||
124 | { | ||
125 | /* TODO FIXME; probably I2C gate. | ||
126 | QT1010 tuner does not respond before we write 0x1a to ZL10353 demodulator | ||
127 | register 0x62. This ought to be done somewhere in demodulator initialization. | ||
128 | This solution is temporary hack. */ | ||
129 | u8 buf[2] = { 0x62, 0x1a }; | ||
130 | struct i2c_msg msg = { | ||
131 | .addr = gl861_zl10353_config.demod_address, .flags = 0, .buf = buf, .len = 2 | ||
132 | }; | ||
133 | if (i2c_transfer(&adap->dev->i2c_adap, &msg, 1) != 1) { | ||
134 | printk(KERN_WARNING "gl861 tuner attach failed\n"); | ||
135 | return -EREMOTEIO; | ||
136 | } | ||
137 | return dvb_attach(qt1010_attach, | ||
138 | adap->fe, &adap->dev->i2c_adap, | ||
139 | &gl861_qt1010_config) == NULL ? -ENODEV : 0; | ||
140 | } | ||
141 | |||
119 | /* DVB USB Driver stuff */ | 142 | /* DVB USB Driver stuff */ |
120 | static struct dvb_usb_device_properties gl861_properties; | 143 | static struct dvb_usb_device_properties gl861_properties; |
121 | 144 | ||
@@ -161,7 +184,7 @@ static struct dvb_usb_device_properties gl861_properties = { | |||
161 | .adapter = {{ | 184 | .adapter = {{ |
162 | 185 | ||
163 | .frontend_attach = gl861_frontend_attach, | 186 | .frontend_attach = gl861_frontend_attach, |
164 | .tuner_attach = qt1010_tuner_attach, | 187 | .tuner_attach = gl861_tuner_attach, |
165 | 188 | ||
166 | .stream = { | 189 | .stream = { |
167 | .type = USB_BULK, | 190 | .type = USB_BULK, |