| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * PCTV 452e DVB driver |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * TT connect S2-3650-CI Common Interface support, MAC readout |
|---|
| 7 | 8 | * Copyright (C) 2008 Michael H. Schimek <mschimek@gmx.at> |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is free software; you can redistribute it and/or |
|---|
| 10 | | - * modify it under the terms of the GNU General Public License as |
|---|
| 11 | | - * published by the Free Software Foundation; either version 2 of |
|---|
| 12 | | - * the License, or (at your option) any later version. |
|---|
| 13 | 9 | */ |
|---|
| 14 | 10 | |
|---|
| 15 | 11 | /* dvb usb framework */ |
|---|
| .. | .. |
|---|
| 24 | 20 | #include "stb6100.h" |
|---|
| 25 | 21 | #include "stb6100_cfg.h" |
|---|
| 26 | 22 | /* FE Power */ |
|---|
| 23 | +#include "isl6423.h" |
|---|
| 27 | 24 | #include "lnbp22.h" |
|---|
| 28 | 25 | |
|---|
| 29 | 26 | #include <media/dvb_ca_en50221.h> |
|---|
| .. | .. |
|---|
| 85 | 82 | static struct stb0899_postproc pctv45e_postproc[] = { |
|---|
| 86 | 83 | { PCTV_LED_GPIO, STB0899_GPIOPULLUP }, |
|---|
| 87 | 84 | { 0, 0 } |
|---|
| 85 | +}; |
|---|
| 86 | + |
|---|
| 87 | +static struct isl6423_config pctv452e_isl6423_config = { |
|---|
| 88 | + .current_max = SEC_CURRENT_515m, |
|---|
| 89 | + .curlim = SEC_CURRENT_LIM_ON, |
|---|
| 90 | + .mod_extern = 1, |
|---|
| 91 | + .addr = 0x08, |
|---|
| 88 | 92 | }; |
|---|
| 89 | 93 | |
|---|
| 90 | 94 | /* |
|---|
| .. | .. |
|---|
| 528 | 532 | |
|---|
| 529 | 533 | rx = b0 + 5; |
|---|
| 530 | 534 | |
|---|
| 531 | | - /* hmm where shoud this should go? */ |
|---|
| 535 | + /* hmm where should this should go? */ |
|---|
| 532 | 536 | ret = usb_set_interface(d->udev, 0, ISOC_INTERFACE_ALTERNATIVE); |
|---|
| 533 | 537 | if (ret != 0) |
|---|
| 534 | 538 | info("%s: Warning set interface returned: %d\n", |
|---|
| 535 | 539 | __func__, ret); |
|---|
| 536 | 540 | |
|---|
| 537 | | - /* this is a one-time initialization, dont know where to put */ |
|---|
| 541 | + /* this is a one-time initialization, don't know where to put */ |
|---|
| 538 | 542 | b0[0] = 0xaa; |
|---|
| 539 | 543 | b0[1] = state->c++; |
|---|
| 540 | 544 | b0[2] = PCTV_CMD_RESET; |
|---|
| .. | .. |
|---|
| 913 | 917 | &a->dev->i2c_adap); |
|---|
| 914 | 918 | if (!a->fe_adap[0].fe) |
|---|
| 915 | 919 | return -ENODEV; |
|---|
| 916 | | - if ((dvb_attach(lnbp22_attach, a->fe_adap[0].fe, |
|---|
| 917 | | - &a->dev->i2c_adap)) == NULL) |
|---|
| 918 | | - err("Cannot attach lnbp22\n"); |
|---|
| 919 | 920 | |
|---|
| 920 | 921 | id = a->dev->desc->warm_ids[0]; |
|---|
| 921 | | - if (USB_VID_TECHNOTREND == id->idVendor |
|---|
| 922 | | - && USB_PID_TECHNOTREND_CONNECT_S2_3650_CI == id->idProduct) |
|---|
| 922 | + if (id->idVendor == USB_VID_TECHNOTREND && |
|---|
| 923 | + id->idProduct == USB_PID_TECHNOTREND_CONNECT_S2_3650_CI) { |
|---|
| 924 | + if (dvb_attach(lnbp22_attach, |
|---|
| 925 | + a->fe_adap[0].fe, |
|---|
| 926 | + &a->dev->i2c_adap) == NULL) { |
|---|
| 927 | + err("Cannot attach lnbp22\n"); |
|---|
| 928 | + } |
|---|
| 923 | 929 | /* Error ignored. */ |
|---|
| 924 | 930 | tt3650_ci_init(a); |
|---|
| 931 | + } else if (dvb_attach(isl6423_attach, |
|---|
| 932 | + a->fe_adap[0].fe, |
|---|
| 933 | + &a->dev->i2c_adap, |
|---|
| 934 | + &pctv452e_isl6423_config) == NULL) { |
|---|
| 935 | + err("Cannot attach isl6423\n"); |
|---|
| 936 | + } |
|---|
| 925 | 937 | |
|---|
| 926 | 938 | return 0; |
|---|
| 927 | 939 | } |
|---|