diff options
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-cards.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-cards.c | 66 |
1 files changed, 62 insertions, 4 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index f7e9168157a5..24caa8512ba8 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c | |||
@@ -268,6 +268,20 @@ static struct em28xx_reg_seq dikom_dk300_digital[] = { | |||
268 | }; | 268 | }; |
269 | 269 | ||
270 | 270 | ||
271 | /* Reset for the most [digital] boards */ | ||
272 | static struct em28xx_reg_seq leadership_digital[] = { | ||
273 | {EM2874_R80_GPIO, 0x70, 0xff, 10}, | ||
274 | { -1, -1, -1, -1}, | ||
275 | }; | ||
276 | |||
277 | static struct em28xx_reg_seq leadership_reset[] = { | ||
278 | {EM2874_R80_GPIO, 0xf0, 0xff, 10}, | ||
279 | {EM2874_R80_GPIO, 0xb0, 0xff, 10}, | ||
280 | {EM2874_R80_GPIO, 0xf0, 0xff, 10}, | ||
281 | { -1, -1, -1, -1}, | ||
282 | }; | ||
283 | |||
284 | |||
271 | /* | 285 | /* |
272 | * Board definitions | 286 | * Board definitions |
273 | */ | 287 | */ |
@@ -1224,6 +1238,19 @@ struct em28xx_board em28xx_boards[] = { | |||
1224 | .vmux = SAA7115_COMPOSITE0, | 1238 | .vmux = SAA7115_COMPOSITE0, |
1225 | } }, | 1239 | } }, |
1226 | }, | 1240 | }, |
1241 | |||
1242 | [EM2874_LEADERSHIP_ISDBT] = { | ||
1243 | .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT | | ||
1244 | EM28XX_I2C_CLK_WAIT_ENABLE | | ||
1245 | EM28XX_I2C_FREQ_100_KHZ, | ||
1246 | .xclk = EM28XX_XCLK_FREQUENCY_10MHZ, | ||
1247 | .name = "EM2874 Leadership ISDBT", | ||
1248 | .tuner_type = TUNER_ABSENT, | ||
1249 | .tuner_gpio = leadership_reset, | ||
1250 | .dvb_gpio = leadership_digital, | ||
1251 | .has_dvb = 1, | ||
1252 | }, | ||
1253 | |||
1227 | [EM2880_BOARD_MSI_DIGIVOX_AD] = { | 1254 | [EM2880_BOARD_MSI_DIGIVOX_AD] = { |
1228 | .name = "MSI DigiVox A/D", | 1255 | .name = "MSI DigiVox A/D", |
1229 | .valid = EM28XX_BOARD_NOT_VALIDATED, | 1256 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
@@ -1754,6 +1781,8 @@ struct usb_device_id em28xx_id_table[] = { | |||
1754 | .driver_info = EM2820_BOARD_UNKNOWN }, | 1781 | .driver_info = EM2820_BOARD_UNKNOWN }, |
1755 | { USB_DEVICE(0xeb1a, 0x2868), | 1782 | { USB_DEVICE(0xeb1a, 0x2868), |
1756 | .driver_info = EM2820_BOARD_UNKNOWN }, | 1783 | .driver_info = EM2820_BOARD_UNKNOWN }, |
1784 | { USB_DEVICE(0xeb1a, 0x2875), | ||
1785 | .driver_info = EM2820_BOARD_UNKNOWN }, | ||
1757 | { USB_DEVICE(0xeb1a, 0xe300), | 1786 | { USB_DEVICE(0xeb1a, 0xe300), |
1758 | .driver_info = EM2861_BOARD_KWORLD_PVRTV_300U }, | 1787 | .driver_info = EM2861_BOARD_KWORLD_PVRTV_300U }, |
1759 | { USB_DEVICE(0xeb1a, 0xe303), | 1788 | { USB_DEVICE(0xeb1a, 0xe303), |
@@ -1873,6 +1902,7 @@ static struct em28xx_hash_table em28xx_i2c_hash[] = { | |||
1873 | {0x77800080, EM2860_BOARD_TVP5150_REFERENCE_DESIGN, TUNER_ABSENT}, | 1902 | {0x77800080, EM2860_BOARD_TVP5150_REFERENCE_DESIGN, TUNER_ABSENT}, |
1874 | {0xc51200e3, EM2820_BOARD_GADMEI_TVR200, TUNER_LG_PAL_NEW_TAPC}, | 1903 | {0xc51200e3, EM2820_BOARD_GADMEI_TVR200, TUNER_LG_PAL_NEW_TAPC}, |
1875 | {0x4ba50080, EM2861_BOARD_GADMEI_UTV330PLUS, TUNER_TNF_5335MF}, | 1904 | {0x4ba50080, EM2861_BOARD_GADMEI_UTV330PLUS, TUNER_TNF_5335MF}, |
1905 | {0x6b800080, EM2874_LEADERSHIP_ISDBT, TUNER_ABSENT}, | ||
1876 | }; | 1906 | }; |
1877 | 1907 | ||
1878 | /* I2C possible address to saa7115, tvp5150, msp3400, tvaudio */ | 1908 | /* I2C possible address to saa7115, tvp5150, msp3400, tvaudio */ |
@@ -2430,8 +2460,36 @@ void em28xx_card_setup(struct em28xx *dev) | |||
2430 | dev->board.is_webcam = 0; | 2460 | dev->board.is_webcam = 0; |
2431 | else | 2461 | else |
2432 | dev->progressive = 1; | 2462 | dev->progressive = 1; |
2433 | } else | 2463 | } |
2434 | em28xx_set_model(dev); | 2464 | |
2465 | if (!dev->board.is_webcam) { | ||
2466 | switch (dev->model) { | ||
2467 | case EM2820_BOARD_UNKNOWN: | ||
2468 | case EM2800_BOARD_UNKNOWN: | ||
2469 | /* | ||
2470 | * The K-WORLD DVB-T 310U is detected as an MSI Digivox AD. | ||
2471 | * | ||
2472 | * This occurs because they share identical USB vendor and | ||
2473 | * product IDs. | ||
2474 | * | ||
2475 | * What we do here is look up the EEPROM hash of the K-WORLD | ||
2476 | * and if it is found then we decide that we do not have | ||
2477 | * a DIGIVOX and reset the device to the K-WORLD instead. | ||
2478 | * | ||
2479 | * This solution is only valid if they do not share eeprom | ||
2480 | * hash identities which has not been determined as yet. | ||
2481 | */ | ||
2482 | if (em28xx_hint_board(dev) < 0) | ||
2483 | em28xx_errdev("Board not discovered\n"); | ||
2484 | else { | ||
2485 | em28xx_set_model(dev); | ||
2486 | em28xx_pre_card_setup(dev); | ||
2487 | } | ||
2488 | break; | ||
2489 | default: | ||
2490 | em28xx_set_model(dev); | ||
2491 | } | ||
2492 | } | ||
2435 | 2493 | ||
2436 | em28xx_info("Identified as %s (card=%d)\n", | 2494 | em28xx_info("Identified as %s (card=%d)\n", |
2437 | dev->board.name, dev->model); | 2495 | dev->board.name, dev->model); |
@@ -2749,8 +2807,8 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev, | |||
2749 | em28xx_pre_card_setup(dev); | 2807 | em28xx_pre_card_setup(dev); |
2750 | 2808 | ||
2751 | if (!dev->board.is_em2800) { | 2809 | if (!dev->board.is_em2800) { |
2752 | /* Sets I2C speed to 100 KHz */ | 2810 | /* Resets I2C speed */ |
2753 | retval = em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, 0x40); | 2811 | em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, dev->board.i2c_speed); |
2754 | if (retval < 0) { | 2812 | if (retval < 0) { |
2755 | em28xx_errdev("%s: em28xx_write_regs_req failed!" | 2813 | em28xx_errdev("%s: em28xx_write_regs_req failed!" |
2756 | " retval [%d]\n", | 2814 | " retval [%d]\n", |