diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dib0700_devices.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c index 9891ca0924a3..0cfccc24b190 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_devices.c +++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c | |||
@@ -1181,11 +1181,16 @@ static int dib0700_xc5000_tuner_callback(void *priv, int component, | |||
1181 | { | 1181 | { |
1182 | struct dvb_usb_adapter *adap = priv; | 1182 | struct dvb_usb_adapter *adap = priv; |
1183 | 1183 | ||
1184 | /* Reset the tuner */ | 1184 | if (command == XC5000_TUNER_RESET) { |
1185 | dib0700_set_gpio(adap->dev, GPIO1, GPIO_OUT, 0); | 1185 | /* Reset the tuner */ |
1186 | msleep(330); /* from Windows USB trace */ | 1186 | dib0700_set_gpio(adap->dev, GPIO1, GPIO_OUT, 0); |
1187 | dib0700_set_gpio(adap->dev, GPIO1, GPIO_OUT, 1); | 1187 | msleep(330); /* from Windows USB trace */ |
1188 | msleep(330); /* from Windows USB trace */ | 1188 | dib0700_set_gpio(adap->dev, GPIO1, GPIO_OUT, 1); |
1189 | msleep(330); /* from Windows USB trace */ | ||
1190 | } else { | ||
1191 | err("xc5000: unknown tuner callback command: %d\n", command); | ||
1192 | return -EINVAL; | ||
1193 | } | ||
1189 | 1194 | ||
1190 | return 0; | 1195 | return 0; |
1191 | } | 1196 | } |
@@ -1197,12 +1202,12 @@ static struct xc5000_config s5h1411_xc5000_tunerconfig = { | |||
1197 | 1202 | ||
1198 | static int xc5000_tuner_attach(struct dvb_usb_adapter *adap) | 1203 | static int xc5000_tuner_attach(struct dvb_usb_adapter *adap) |
1199 | { | 1204 | { |
1205 | /* FIXME: generalize & move to common area */ | ||
1206 | adap->fe->callback = dib0700_xc5000_tuner_callback; | ||
1207 | |||
1200 | return dvb_attach(xc5000_attach, adap->fe, &adap->dev->i2c_adap, | 1208 | return dvb_attach(xc5000_attach, adap->fe, &adap->dev->i2c_adap, |
1201 | &s5h1411_xc5000_tunerconfig) | 1209 | &s5h1411_xc5000_tunerconfig) |
1202 | == NULL ? -ENODEV : 0; | 1210 | == NULL ? -ENODEV : 0; |
1203 | |||
1204 | /* FIXME: generalize & move to common area */ | ||
1205 | adap->fe->callback = dib0700_xc5000_tuner_callback; | ||
1206 | } | 1211 | } |
1207 | 1212 | ||
1208 | /* DVB-USB and USB stuff follows */ | 1213 | /* DVB-USB and USB stuff follows */ |