Commit 2fa2002f authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

media: dw2102: use the newer dvb-usb macros for USB device

In order to make the drivers under dvb-usb more homogeneous,
use the new macro, and rename some PIDs.

Link: https://lore.kernel.org/linux-media/828998ef3f0843bab4e84780e42f8f0802f57be7.1648499509.git.mchehab@kernel.orgSigned-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 4a307b4a
......@@ -1771,10 +1771,10 @@ enum dw2102_table_entry {
PROF_7500,
GENIATECH_SU3000,
HAUPPAUGE_MAX_S2,
TERRATEC_CINERGY_S2,
TERRATEC_CINERGY_S2_R1,
TEVII_S480_1,
TEVII_S480_2,
X3M_SPC1400HD,
GENIATECH_X3M_SPC1400HD,
TEVII_S421,
TEVII_S632,
TERRATEC_CINERGY_S2_R2,
......@@ -1784,7 +1784,7 @@ enum dw2102_table_entry {
TERRATEC_CINERGY_S2_2,
GOTVIEW_SAT_HD,
GENIATECH_T220,
TECHNOTREND_S2_4600,
TECHNOTREND_CONNECT_S2_4600,
TEVII_S482_1,
TEVII_S482_2,
TERRATEC_CINERGY_S2_BOX,
......@@ -1792,42 +1792,36 @@ enum dw2102_table_entry {
};
static struct usb_device_id dw2102_table[] = {
[CYPRESS_DW2102] = {USB_DEVICE(USB_VID_CYPRESS, USB_PID_DW2102)},
[CYPRESS_DW2101] = {USB_DEVICE(USB_VID_CYPRESS, USB_PID_DW2101)},
[CYPRESS_DW2104] = {USB_DEVICE(USB_VID_CYPRESS, USB_PID_DW2104)},
[TEVII_S650] = {USB_DEVICE(USB_VID_TEVII, USB_PID_TEVII_S650)},
[TERRATEC_CINERGY_S] = {USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_S)},
[CYPRESS_DW3101] = {USB_DEVICE(USB_VID_CYPRESS, USB_PID_DW3101)},
[TEVII_S630] = {USB_DEVICE(USB_VID_TEVII, USB_PID_TEVII_S630)},
[PROF_1100] = {USB_DEVICE(USB_VID_PROF_1, USB_PID_PROF_1100)},
[TEVII_S660] = {USB_DEVICE(USB_VID_TEVII, USB_PID_TEVII_S660)},
[PROF_7500] = {USB_DEVICE(USB_VID_PROF_2, USB_PID_PROF_7500)},
[GENIATECH_SU3000] = {USB_DEVICE(USB_VID_GTEK, USB_PID_GENIATECH_SU3000)},
[HAUPPAUGE_MAX_S2] = {USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_MAX_S2)},
[TERRATEC_CINERGY_S2] = {USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_S2_R1)},
[TEVII_S480_1] = {USB_DEVICE(USB_VID_TEVII, USB_PID_TEVII_S480_1)},
[TEVII_S480_2] = {USB_DEVICE(USB_VID_TEVII, USB_PID_TEVII_S480_2)},
[X3M_SPC1400HD] = {USB_DEVICE(USB_VID_GTEK, USB_PID_GENIATECH_X3M_SPC1400HD)},
[TEVII_S421] = {USB_DEVICE(USB_VID_TEVII, USB_PID_TEVII_S421)},
[TEVII_S632] = {USB_DEVICE(USB_VID_TEVII, USB_PID_TEVII_S632)},
[TERRATEC_CINERGY_S2_R2] = {USB_DEVICE(USB_VID_TERRATEC,
USB_PID_TERRATEC_CINERGY_S2_R2)},
[TERRATEC_CINERGY_S2_R3] = {USB_DEVICE(USB_VID_TERRATEC,
USB_PID_TERRATEC_CINERGY_S2_R3)},
[TERRATEC_CINERGY_S2_R4] = {USB_DEVICE(USB_VID_TERRATEC,
USB_PID_TERRATEC_CINERGY_S2_R4)},
[TERRATEC_CINERGY_S2_1] = {USB_DEVICE(USB_VID_TERRATEC_2,
USB_PID_TERRATEC_CINERGY_S2_1)},
[TERRATEC_CINERGY_S2_2] = {USB_DEVICE(USB_VID_TERRATEC_2,
USB_PID_TERRATEC_CINERGY_S2_2)},
[GOTVIEW_SAT_HD] = {USB_DEVICE(USB_VID_GOTVIEW, USB_PID_GOTVIEW_SAT_HD)},
[GENIATECH_T220] = {USB_DEVICE(USB_VID_GTEK, USB_PID_GENIATECH_T220)},
[TECHNOTREND_S2_4600] = {USB_DEVICE(USB_VID_TECHNOTREND,
USB_PID_TECHNOTREND_CONNECT_S2_4600)},
[TEVII_S482_1] = {USB_DEVICE(USB_VID_TEVII, USB_PID_TTEVII_S482_1)},
[TEVII_S482_2] = {USB_DEVICE(USB_VID_TEVII, USB_PID_TTEVII_S482_2)},
[TERRATEC_CINERGY_S2_BOX] = {USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_S2_BOX)},
[TEVII_S662] = {USB_DEVICE(USB_VID_TEVII, USB_PID_TEVII_S662)},
DVB_USB_DEV(CYPRESS, CYPRESS_DW2102),
DVB_USB_DEV(CYPRESS, CYPRESS_DW2101),
DVB_USB_DEV(CYPRESS, CYPRESS_DW2104),
DVB_USB_DEV(TEVII, TEVII_S650),
DVB_USB_DEV(TERRATEC, TERRATEC_CINERGY_S),
DVB_USB_DEV(CYPRESS, CYPRESS_DW3101),
DVB_USB_DEV(TEVII, TEVII_S630),
DVB_USB_DEV(PROF_1, PROF_1100),
DVB_USB_DEV(TEVII, TEVII_S660),
DVB_USB_DEV(PROF_2, PROF_7500),
DVB_USB_DEV(GTEK, GENIATECH_SU3000),
DVB_USB_DEV(HAUPPAUGE, HAUPPAUGE_MAX_S2),
DVB_USB_DEV(TERRATEC, TERRATEC_CINERGY_S2_R1),
DVB_USB_DEV(TEVII, TEVII_S480_1),
DVB_USB_DEV(TEVII, TEVII_S480_2),
DVB_USB_DEV(GTEK, GENIATECH_X3M_SPC1400HD),
DVB_USB_DEV(TEVII, TEVII_S421),
DVB_USB_DEV(TEVII, TEVII_S632),
DVB_USB_DEV(TERRATEC, TERRATEC_CINERGY_S2_R2),
DVB_USB_DEV(TERRATEC, TERRATEC_CINERGY_S2_R3),
DVB_USB_DEV(TERRATEC, TERRATEC_CINERGY_S2_R4),
DVB_USB_DEV(TERRATEC_2, TERRATEC_CINERGY_S2_1),
DVB_USB_DEV(TERRATEC_2, TERRATEC_CINERGY_S2_2),
DVB_USB_DEV(GOTVIEW, GOTVIEW_SAT_HD),
DVB_USB_DEV(GTEK, GENIATECH_T220),
DVB_USB_DEV(TECHNOTREND, TECHNOTREND_CONNECT_S2_4600),
DVB_USB_DEV(TEVII, TEVII_S482_1),
DVB_USB_DEV(TEVII, TEVII_S482_2),
DVB_USB_DEV(TERRATEC, TERRATEC_CINERGY_S2_BOX),
DVB_USB_DEV(TEVII, TEVII_S662),
{ }
};
......@@ -1889,18 +1883,18 @@ static int dw2102_load_firmware(struct usb_device *dev,
case USB_PID_TEVII_S650:
dw2104_properties.rc.core.rc_codes = RC_MAP_TEVII_NEC;
fallthrough;
case USB_PID_DW2104:
case USB_PID_CYPRESS_DW2104:
reset = 1;
dw210x_op_rw(dev, 0xc4, 0x0000, 0, &reset, 1,
DW210X_WRITE_MSG);
fallthrough;
case USB_PID_DW3101:
case USB_PID_CYPRESS_DW3101:
reset = 0;
dw210x_op_rw(dev, 0xbf, 0x0040, 0, &reset, 0,
DW210X_WRITE_MSG);
break;
case USB_PID_TERRATEC_CINERGY_S:
case USB_PID_DW2102:
case USB_PID_CYPRESS_DW2102:
dw210x_op_rw(dev, 0xbf, 0x0040, 0, &reset, 0,
DW210X_WRITE_MSG);
dw210x_op_rw(dev, 0xb9, 0x0000, 0, &reset16[0], 2,
......@@ -2350,11 +2344,11 @@ static struct dvb_usb_device_properties su3000_properties = {
{ NULL },
},
{ "Terratec Cinergy S2 USB HD",
{ &dw2102_table[TERRATEC_CINERGY_S2], NULL },
{ &dw2102_table[TERRATEC_CINERGY_S2_R1], NULL },
{ NULL },
},
{ "X3M TV SPC1400HD PCI",
{ &dw2102_table[X3M_SPC1400HD], NULL },
{ &dw2102_table[GENIATECH_X3M_SPC1400HD], NULL },
{ NULL },
},
{ "Terratec Cinergy S2 USB HD Rev.2",
......@@ -2525,7 +2519,7 @@ static struct dvb_usb_device_properties tt_s2_4600_properties = {
.num_device_descs = 5,
.devices = {
{ "TechnoTrend TT-connect S2-4600",
{ &dw2102_table[TECHNOTREND_S2_4600], NULL },
{ &dw2102_table[TECHNOTREND_CONNECT_S2_4600], NULL },
{ NULL },
},
{ "TeVii S482 (tuner 1)",
......
......@@ -160,6 +160,10 @@
#define USB_PID_CPYTO_REDI_PC50A 0xa803
#define USB_PID_CREATIX_CTX1921 0x1921
#define USB_PID_CTVDIGDUAL_V2 0xe410
#define USB_PID_CYPRESS_DW2101 0x2101
#define USB_PID_CYPRESS_DW2102 0x2102
#define USB_PID_CYPRESS_DW2104 0x2104
#define USB_PID_CYPRESS_DW3101 0x3101
#define USB_PID_DELOCK_USB2_DVBT 0xb803
#define USB_PID_DIBCOM_ANCHOR_2135_COLD 0x2131
#define USB_PID_DIBCOM_HOOK_DEFAULT 0x0064
......@@ -211,10 +215,6 @@
#define USB_PID_DVICO_BLUEBIRD_LGZ201_WARM 0xdb01
#define USB_PID_DVICO_BLUEBIRD_TH7579_COLD 0xdb10
#define USB_PID_DVICO_BLUEBIRD_TH7579_WARM 0xdb11
#define USB_PID_DW2101 0x2101
#define USB_PID_DW2102 0x2102
#define USB_PID_DW2104 0x2104
#define USB_PID_DW3101 0x3101
#define USB_PID_E3C_EC168 0x1689
#define USB_PID_E3C_EC168_2 0xfffa
#define USB_PID_E3C_EC168_3 0xfffb
......@@ -394,6 +394,8 @@
#define USB_PID_TEVII_S421 0xd421
#define USB_PID_TEVII_S480_1 0xd481
#define USB_PID_TEVII_S480_2 0xd482
#define USB_PID_TEVII_S482_1 0xd483
#define USB_PID_TEVII_S482_2 0xd484
#define USB_PID_TEVII_S630 0xd630
#define USB_PID_TEVII_S632 0xd632
#define USB_PID_TEVII_S650 0xd650
......@@ -404,8 +406,6 @@
#define USB_PID_TINYTWIN_3 0x9016
#define USB_PID_TREKSTOR_DVBT 0x901b
#define USB_PID_TREKSTOR_TERRES_2_0 0xC803
#define USB_PID_TTEVII_S482_1 0xd483
#define USB_PID_TTEVII_S482_2 0xd484
#define USB_PID_TURBOX_DTT_2000 0xd3a4
#define USB_PID_TVWAY_PLUS 0x0002
#define USB_PID_TWINHAN_VP7020_COLD 0x3203
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment