aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/dvb-usb/dib0700_devices.c36
1 files changed, 34 insertions, 2 deletions
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c
index e5c2bd2b2be8..3ab45aedbdfb 100644
--- a/drivers/media/dvb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c
@@ -3105,6 +3105,38 @@ static int stk7070pd_frontend_attach1(struct dvb_usb_adapter *adap)
3105 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; 3105 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0;
3106} 3106}
3107 3107
3108/**
3109 * novatd_frontend_attach - Nova-TD specific attach
3110 *
3111 * Nova-TD has GPIO0, 1 and 2 for LEDs. So do not fiddle with them except for
3112 * information purposes.
3113 */
3114static int novatd_frontend_attach(struct dvb_usb_adapter *adap)
3115{
3116 struct dvb_usb_device *dev = adap->dev;
3117
3118 if (adap->id == 0) {
3119 stk7070pd_init(dev);
3120
3121 /* turn the power LED on, the other two off (just in case) */
3122 dib0700_set_gpio(dev, GPIO0, GPIO_OUT, 0);
3123 dib0700_set_gpio(dev, GPIO1, GPIO_OUT, 0);
3124 dib0700_set_gpio(dev, GPIO2, GPIO_OUT, 1);
3125
3126 if (dib7000p_i2c_enumeration(&dev->i2c_adap, 2, 18,
3127 stk7070pd_dib7000p_config) != 0) {
3128 err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n",
3129 __func__);
3130 return -ENODEV;
3131 }
3132 }
3133
3134 adap->fe_adap[0].fe = dvb_attach(dib7000p_attach, &dev->i2c_adap,
3135 adap->id == 0 ? 0x80 : 0x82,
3136 &stk7070pd_dib7000p_config[adap->id]);
3137 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0;
3138}
3139
3108/* S5H1411 */ 3140/* S5H1411 */
3109static struct s5h1411_config pinnacle_801e_config = { 3141static struct s5h1411_config pinnacle_801e_config = {
3110 .output_mode = S5H1411_PARALLEL_OUTPUT, 3142 .output_mode = S5H1411_PARALLEL_OUTPUT,
@@ -3876,7 +3908,7 @@ struct dvb_usb_device_properties dib0700_devices[] = {
3876 .pid_filter_count = 32, 3908 .pid_filter_count = 32,
3877 .pid_filter = stk70x0p_pid_filter, 3909 .pid_filter = stk70x0p_pid_filter,
3878 .pid_filter_ctrl = stk70x0p_pid_filter_ctrl, 3910 .pid_filter_ctrl = stk70x0p_pid_filter_ctrl,
3879 .frontend_attach = stk7070pd_frontend_attach0, 3911 .frontend_attach = novatd_frontend_attach,
3880 .tuner_attach = dib7070p_tuner_attach, 3912 .tuner_attach = dib7070p_tuner_attach,
3881 3913
3882 DIB0700_DEFAULT_STREAMING_CONFIG(0x02), 3914 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
@@ -3889,7 +3921,7 @@ struct dvb_usb_device_properties dib0700_devices[] = {
3889 .pid_filter_count = 32, 3921 .pid_filter_count = 32,
3890 .pid_filter = stk70x0p_pid_filter, 3922 .pid_filter = stk70x0p_pid_filter,
3891 .pid_filter_ctrl = stk70x0p_pid_filter_ctrl, 3923 .pid_filter_ctrl = stk70x0p_pid_filter_ctrl,
3892 .frontend_attach = stk7070pd_frontend_attach1, 3924 .frontend_attach = novatd_frontend_attach,
3893 .tuner_attach = dib7070p_tuner_attach, 3925 .tuner_attach = dib7070p_tuner_attach,
3894 3926
3895 DIB0700_DEFAULT_STREAMING_CONFIG(0x03), 3927 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),