diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-12-07 19:01:15 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:03:24 -0500 |
commit | d9009201207c4bdce9b95a0bd903b3f087e8eda1 (patch) | |
tree | 86801fb674777c7a4693622363ac18a7a7896ec1 /drivers/media/video/ivtv/ivtv-cards.c | |
parent | 9d1a16a4fc39bd908d85e0b7ce167048200d2d2b (diff) |
V4L/DVB (6765): ivtv: convert to bus-based i2c API
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-cards.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-cards.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/drivers/media/video/ivtv/ivtv-cards.c b/drivers/media/video/ivtv/ivtv-cards.c index 715285e6008..26322e93399 100644 --- a/drivers/media/video/ivtv/ivtv-cards.c +++ b/drivers/media/video/ivtv/ivtv-cards.c | |||
@@ -40,6 +40,27 @@ | |||
40 | #define MSP_MONO MSP_INPUT(MSP_IN_MONO, MSP_IN_TUNER1, \ | 40 | #define MSP_MONO MSP_INPUT(MSP_IN_MONO, MSP_IN_TUNER1, \ |
41 | MSP_DSP_IN_SCART, MSP_DSP_IN_SCART) | 41 | MSP_DSP_IN_SCART, MSP_DSP_IN_SCART) |
42 | 42 | ||
43 | /* usual i2c tuner addresses to probe */ | ||
44 | static struct ivtv_card_tuner_i2c ivtv_i2c_std = { | ||
45 | .radio = { I2C_CLIENT_END }, | ||
46 | .demod = { 0x43, I2C_CLIENT_END }, | ||
47 | .tv = { 0x61, 0x60, I2C_CLIENT_END }, | ||
48 | }; | ||
49 | |||
50 | /* as above, but with possible radio tuner */ | ||
51 | static struct ivtv_card_tuner_i2c ivtv_i2c_radio = { | ||
52 | .radio = { 0x60, I2C_CLIENT_END }, | ||
53 | .demod = { 0x43, I2C_CLIENT_END }, | ||
54 | .tv = { 0x61, I2C_CLIENT_END }, | ||
55 | }; | ||
56 | |||
57 | /* using the tda8290+75a combo */ | ||
58 | static struct ivtv_card_tuner_i2c ivtv_i2c_tda8290 = { | ||
59 | .radio = { I2C_CLIENT_END }, | ||
60 | .demod = { I2C_CLIENT_END }, | ||
61 | .tv = { 0x4b, I2C_CLIENT_END }, | ||
62 | }; | ||
63 | |||
43 | /********************** card configuration *******************************/ | 64 | /********************** card configuration *******************************/ |
44 | 65 | ||
45 | /* Please add new PCI IDs to: http://pci-ids.ucw.cz/iii | 66 | /* Please add new PCI IDs to: http://pci-ids.ucw.cz/iii |
@@ -73,6 +94,7 @@ static const struct ivtv_card ivtv_card_pvr250 = { | |||
73 | { IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 }, | 94 | { IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 }, |
74 | }, | 95 | }, |
75 | .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 }, | 96 | .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 }, |
97 | .i2c = &ivtv_i2c_std, | ||
76 | }; | 98 | }; |
77 | 99 | ||
78 | /* ------------------------------------------------------------------------- */ | 100 | /* ------------------------------------------------------------------------- */ |
@@ -127,6 +149,7 @@ static const struct ivtv_card ivtv_card_pvr350 = { | |||
127 | { IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 }, | 149 | { IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 }, |
128 | }, | 150 | }, |
129 | .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 }, | 151 | .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 }, |
152 | .i2c = &ivtv_i2c_std, | ||
130 | }; | 153 | }; |
131 | 154 | ||
132 | /* PVR-350 V1 boards have a different audio tuner input and use a | 155 | /* PVR-350 V1 boards have a different audio tuner input and use a |
@@ -158,6 +181,7 @@ static const struct ivtv_card ivtv_card_pvr350_v1 = { | |||
158 | { IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 }, | 181 | { IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 }, |
159 | }, | 182 | }, |
160 | .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 }, | 183 | .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 }, |
184 | .i2c = &ivtv_i2c_std, | ||
161 | }; | 185 | }; |
162 | 186 | ||
163 | /* ------------------------------------------------------------------------- */ | 187 | /* ------------------------------------------------------------------------- */ |
@@ -193,6 +217,7 @@ static const struct ivtv_card ivtv_card_pvr150 = { | |||
193 | CX25840_AUDIO_SERIAL, WM8775_AIN4 }, | 217 | CX25840_AUDIO_SERIAL, WM8775_AIN4 }, |
194 | /* apparently needed for the IR blaster */ | 218 | /* apparently needed for the IR blaster */ |
195 | .gpio_init = { .direction = 0x1f01, .initial_value = 0x26f3 }, | 219 | .gpio_init = { .direction = 0x1f01, .initial_value = 0x26f3 }, |
220 | .i2c = &ivtv_i2c_std, | ||
196 | }; | 221 | }; |
197 | 222 | ||
198 | /* ------------------------------------------------------------------------- */ | 223 | /* ------------------------------------------------------------------------- */ |
@@ -235,6 +260,7 @@ static const struct ivtv_card ivtv_card_m179 = { | |||
235 | { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_NTSC }, | 260 | { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_NTSC }, |
236 | }, | 261 | }, |
237 | .pci_list = ivtv_pci_m179, | 262 | .pci_list = ivtv_pci_m179, |
263 | .i2c = &ivtv_i2c_std, | ||
238 | }; | 264 | }; |
239 | 265 | ||
240 | /* ------------------------------------------------------------------------- */ | 266 | /* ------------------------------------------------------------------------- */ |
@@ -276,6 +302,7 @@ static const struct ivtv_card ivtv_card_mpg600 = { | |||
276 | { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 }, | 302 | { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 }, |
277 | }, | 303 | }, |
278 | .pci_list = ivtv_pci_mpg600, | 304 | .pci_list = ivtv_pci_mpg600, |
305 | .i2c = &ivtv_i2c_std, | ||
279 | }; | 306 | }; |
280 | 307 | ||
281 | /* ------------------------------------------------------------------------- */ | 308 | /* ------------------------------------------------------------------------- */ |
@@ -316,6 +343,7 @@ static const struct ivtv_card ivtv_card_mpg160 = { | |||
316 | { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 }, | 343 | { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 }, |
317 | }, | 344 | }, |
318 | .pci_list = ivtv_pci_mpg160, | 345 | .pci_list = ivtv_pci_mpg160, |
346 | .i2c = &ivtv_i2c_std, | ||
319 | }; | 347 | }; |
320 | 348 | ||
321 | /* ------------------------------------------------------------------------- */ | 349 | /* ------------------------------------------------------------------------- */ |
@@ -351,6 +379,7 @@ static const struct ivtv_card ivtv_card_pg600 = { | |||
351 | { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 }, | 379 | { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 }, |
352 | }, | 380 | }, |
353 | .pci_list = ivtv_pci_pg600, | 381 | .pci_list = ivtv_pci_pg600, |
382 | .i2c = &ivtv_i2c_std, | ||
354 | }; | 383 | }; |
355 | 384 | ||
356 | /* ------------------------------------------------------------------------- */ | 385 | /* ------------------------------------------------------------------------- */ |
@@ -394,6 +423,7 @@ static const struct ivtv_card ivtv_card_avc2410 = { | |||
394 | { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 }, | 423 | { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 }, |
395 | }, | 424 | }, |
396 | .pci_list = ivtv_pci_avc2410, | 425 | .pci_list = ivtv_pci_avc2410, |
426 | .i2c = &ivtv_i2c_std, | ||
397 | }; | 427 | }; |
398 | 428 | ||
399 | /* ------------------------------------------------------------------------- */ | 429 | /* ------------------------------------------------------------------------- */ |
@@ -464,6 +494,7 @@ static const struct ivtv_card ivtv_card_tg5000tv = { | |||
464 | { .std = V4L2_STD_525_60, .tuner = TUNER_PHILIPS_FQ1286 }, | 494 | { .std = V4L2_STD_525_60, .tuner = TUNER_PHILIPS_FQ1286 }, |
465 | }, | 495 | }, |
466 | .pci_list = ivtv_pci_tg5000tv, | 496 | .pci_list = ivtv_pci_tg5000tv, |
497 | .i2c = &ivtv_i2c_std, | ||
467 | }; | 498 | }; |
468 | 499 | ||
469 | /* ------------------------------------------------------------------------- */ | 500 | /* ------------------------------------------------------------------------- */ |
@@ -494,6 +525,7 @@ static const struct ivtv_card ivtv_card_va2000 = { | |||
494 | { .std = V4L2_STD_525_60, .tuner = TUNER_PHILIPS_FQ1286 }, | 525 | { .std = V4L2_STD_525_60, .tuner = TUNER_PHILIPS_FQ1286 }, |
495 | }, | 526 | }, |
496 | .pci_list = ivtv_pci_va2000, | 527 | .pci_list = ivtv_pci_va2000, |
528 | .i2c = &ivtv_i2c_std, | ||
497 | }; | 529 | }; |
498 | 530 | ||
499 | /* ------------------------------------------------------------------------- */ | 531 | /* ------------------------------------------------------------------------- */ |
@@ -538,6 +570,7 @@ static const struct ivtv_card ivtv_card_cx23416gyc = { | |||
538 | { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 }, | 570 | { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 }, |
539 | }, | 571 | }, |
540 | .pci_list = ivtv_pci_cx23416gyc, | 572 | .pci_list = ivtv_pci_cx23416gyc, |
573 | .i2c = &ivtv_i2c_std, | ||
541 | }; | 574 | }; |
542 | 575 | ||
543 | static const struct ivtv_card ivtv_card_cx23416gyc_nogr = { | 576 | static const struct ivtv_card ivtv_card_cx23416gyc_nogr = { |
@@ -568,6 +601,7 @@ static const struct ivtv_card ivtv_card_cx23416gyc_nogr = { | |||
568 | { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 }, | 601 | { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 }, |
569 | { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 }, | 602 | { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 }, |
570 | }, | 603 | }, |
604 | .i2c = &ivtv_i2c_std, | ||
571 | }; | 605 | }; |
572 | 606 | ||
573 | static const struct ivtv_card ivtv_card_cx23416gyc_nogrycs = { | 607 | static const struct ivtv_card ivtv_card_cx23416gyc_nogrycs = { |
@@ -597,6 +631,7 @@ static const struct ivtv_card ivtv_card_cx23416gyc_nogrycs = { | |||
597 | { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 }, | 631 | { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 }, |
598 | { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 }, | 632 | { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 }, |
599 | }, | 633 | }, |
634 | .i2c = &ivtv_i2c_std, | ||
600 | }; | 635 | }; |
601 | 636 | ||
602 | /* ------------------------------------------------------------------------- */ | 637 | /* ------------------------------------------------------------------------- */ |
@@ -636,6 +671,7 @@ static const struct ivtv_card ivtv_card_gv_mvprx = { | |||
636 | { .std = V4L2_STD_525_60, .tuner = TUNER_PANASONIC_VP27 }, | 671 | { .std = V4L2_STD_525_60, .tuner = TUNER_PANASONIC_VP27 }, |
637 | }, | 672 | }, |
638 | .pci_list = ivtv_pci_gv_mvprx, | 673 | .pci_list = ivtv_pci_gv_mvprx, |
674 | .i2c = &ivtv_i2c_std, | ||
639 | }; | 675 | }; |
640 | 676 | ||
641 | /* ------------------------------------------------------------------------- */ | 677 | /* ------------------------------------------------------------------------- */ |
@@ -672,6 +708,7 @@ static const struct ivtv_card ivtv_card_gv_mvprx2e = { | |||
672 | { .std = V4L2_STD_525_60, .tuner = TUNER_PANASONIC_VP27 }, | 708 | { .std = V4L2_STD_525_60, .tuner = TUNER_PANASONIC_VP27 }, |
673 | }, | 709 | }, |
674 | .pci_list = ivtv_pci_gv_mvprx2e, | 710 | .pci_list = ivtv_pci_gv_mvprx2e, |
711 | .i2c = &ivtv_i2c_std, | ||
675 | }; | 712 | }; |
676 | 713 | ||
677 | /* ------------------------------------------------------------------------- */ | 714 | /* ------------------------------------------------------------------------- */ |
@@ -706,6 +743,7 @@ static const struct ivtv_card ivtv_card_gotview_pci_dvd = { | |||
706 | { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 }, | 743 | { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 }, |
707 | }, | 744 | }, |
708 | .pci_list = ivtv_pci_gotview_pci_dvd, | 745 | .pci_list = ivtv_pci_gotview_pci_dvd, |
746 | .i2c = &ivtv_i2c_std, | ||
709 | }; | 747 | }; |
710 | 748 | ||
711 | /* ------------------------------------------------------------------------- */ | 749 | /* ------------------------------------------------------------------------- */ |
@@ -744,6 +782,7 @@ static const struct ivtv_card ivtv_card_gotview_pci_dvd2 = { | |||
744 | { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 }, | 782 | { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 }, |
745 | }, | 783 | }, |
746 | .pci_list = ivtv_pci_gotview_pci_dvd2, | 784 | .pci_list = ivtv_pci_gotview_pci_dvd2, |
785 | .i2c = &ivtv_i2c_std, | ||
747 | }; | 786 | }; |
748 | 787 | ||
749 | /* ------------------------------------------------------------------------- */ | 788 | /* ------------------------------------------------------------------------- */ |
@@ -779,6 +818,7 @@ static const struct ivtv_card ivtv_card_yuan_mpc622 = { | |||
779 | { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_TDA8290 }, | 818 | { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_TDA8290 }, |
780 | }, | 819 | }, |
781 | .pci_list = ivtv_pci_yuan_mpc622, | 820 | .pci_list = ivtv_pci_yuan_mpc622, |
821 | .i2c = &ivtv_i2c_tda8290, | ||
782 | }; | 822 | }; |
783 | 823 | ||
784 | /* ------------------------------------------------------------------------- */ | 824 | /* ------------------------------------------------------------------------- */ |
@@ -820,6 +860,7 @@ static const struct ivtv_card ivtv_card_dctmvtvp1 = { | |||
820 | { .std = V4L2_STD_525_60, .tuner = TUNER_PHILIPS_FQ1286 }, | 860 | { .std = V4L2_STD_525_60, .tuner = TUNER_PHILIPS_FQ1286 }, |
821 | }, | 861 | }, |
822 | .pci_list = ivtv_pci_dctmvtvp1, | 862 | .pci_list = ivtv_pci_dctmvtvp1, |
863 | .i2c = &ivtv_i2c_std, | ||
823 | }; | 864 | }; |
824 | 865 | ||
825 | /* ------------------------------------------------------------------------- */ | 866 | /* ------------------------------------------------------------------------- */ |
@@ -852,6 +893,7 @@ static const struct ivtv_card ivtv_card_pg600v2 = { | |||
852 | { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 }, | 893 | { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 }, |
853 | }, | 894 | }, |
854 | .pci_list = ivtv_pci_pg600v2, | 895 | .pci_list = ivtv_pci_pg600v2, |
896 | .i2c = &ivtv_i2c_std, | ||
855 | }; | 897 | }; |
856 | 898 | ||
857 | /* ------------------------------------------------------------------------- */ | 899 | /* ------------------------------------------------------------------------- */ |
@@ -883,6 +925,7 @@ static const struct ivtv_card ivtv_card_club3d = { | |||
883 | { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 }, | 925 | { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 }, |
884 | }, | 926 | }, |
885 | .pci_list = ivtv_pci_club3d, | 927 | .pci_list = ivtv_pci_club3d, |
928 | .i2c = &ivtv_i2c_std, | ||
886 | }; | 929 | }; |
887 | 930 | ||
888 | /* ------------------------------------------------------------------------- */ | 931 | /* ------------------------------------------------------------------------- */ |
@@ -914,6 +957,7 @@ static const struct ivtv_card ivtv_card_avertv_mce116 = { | |||
914 | { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 }, | 957 | { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 }, |
915 | }, | 958 | }, |
916 | .pci_list = ivtv_pci_avertv_mce116, | 959 | .pci_list = ivtv_pci_avertv_mce116, |
960 | .i2c = &ivtv_i2c_std, | ||
917 | }; | 961 | }; |
918 | 962 | ||
919 | /* ------------------------------------------------------------------------- */ | 963 | /* ------------------------------------------------------------------------- */ |
@@ -952,6 +996,7 @@ static const struct ivtv_card ivtv_card_aver_pvr150 = { | |||
952 | { .std = V4L2_STD_525_60, .tuner = TUNER_TCL_2002N }, | 996 | { .std = V4L2_STD_525_60, .tuner = TUNER_TCL_2002N }, |
953 | }, | 997 | }, |
954 | .pci_list = ivtv_pci_aver_pvr150, | 998 | .pci_list = ivtv_pci_aver_pvr150, |
999 | .i2c = &ivtv_i2c_radio, | ||
955 | }; | 1000 | }; |
956 | 1001 | ||
957 | /* ------------------------------------------------------------------------- */ | 1002 | /* ------------------------------------------------------------------------- */ |
@@ -979,6 +1024,7 @@ static const struct ivtv_card ivtv_card_aver_ezmaker = { | |||
979 | { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 0 }, | 1024 | { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 0 }, |
980 | }, | 1025 | }, |
981 | .gpio_init = { .direction = 0x4000, .initial_value = 0x4000 }, | 1026 | .gpio_init = { .direction = 0x4000, .initial_value = 0x4000 }, |
1027 | /* Does not have a tuner */ | ||
982 | .pci_list = ivtv_pci_aver_ezmaker, | 1028 | .pci_list = ivtv_pci_aver_ezmaker, |
983 | }; | 1029 | }; |
984 | 1030 | ||
@@ -1018,6 +1064,7 @@ static const struct ivtv_card ivtv_card_asus_falcon2 = { | |||
1018 | { .std = V4L2_STD_525_60, .tuner = TUNER_PHILIPS_FM1236_MK3 }, | 1064 | { .std = V4L2_STD_525_60, .tuner = TUNER_PHILIPS_FM1236_MK3 }, |
1019 | }, | 1065 | }, |
1020 | .pci_list = ivtv_pci_asus_falcon2, | 1066 | .pci_list = ivtv_pci_asus_falcon2, |
1067 | .i2c = &ivtv_i2c_std, | ||
1021 | }; | 1068 | }; |
1022 | 1069 | ||
1023 | static const struct ivtv_card *ivtv_card_list[] = { | 1070 | static const struct ivtv_card *ivtv_card_list[] = { |