diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-11-25 11:16:13 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-29 14:53:42 -0500 |
commit | 0ec202d183b4e3d3e4d06612a29e25466889c328 (patch) | |
tree | 2e5dd6bf2b3bd4d5936391dbad02bfd1013f4182 /drivers/media/video/em28xx/em28xx-cards.c | |
parent | 2a29a0d770ef6f24a8fd7806655c826d45888cba (diff) |
V4L/DVB (9759): em28xx: move gpio tables to the top of em28xx-cards
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-cards.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-cards.c | 141 |
1 files changed, 72 insertions, 69 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index 1ade8c427c56..9b921fd846eb 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c | |||
@@ -51,6 +51,78 @@ struct em28xx_hash_table { | |||
51 | unsigned int tuner; | 51 | unsigned int tuner; |
52 | }; | 52 | }; |
53 | 53 | ||
54 | /* | ||
55 | * Reset sequences for analog/digital modes | ||
56 | */ | ||
57 | |||
58 | /* Reset for the most [analog] boards */ | ||
59 | static struct em28xx_reg_seq default_analog[] = { | ||
60 | {EM28XX_R08_GPIO, 0x6d, ~EM_GPIO_4, 10}, | ||
61 | { -1, -1, -1, -1}, | ||
62 | }; | ||
63 | |||
64 | /* Reset for the most [digital] boards */ | ||
65 | static struct em28xx_reg_seq default_digital[] = { | ||
66 | {EM28XX_R08_GPIO, 0x6e, ~EM_GPIO_4, 10}, | ||
67 | { -1, -1, -1, -1}, | ||
68 | }; | ||
69 | |||
70 | /* Board Hauppauge WinTV HVR 900 analog */ | ||
71 | static struct em28xx_reg_seq hauppauge_wintv_hvr_900_analog[] = { | ||
72 | {EM28XX_R08_GPIO, 0x2d, ~EM_GPIO_4, 10}, | ||
73 | {0x05, 0xff, 0x10, 10}, | ||
74 | { -1, -1, -1, -1}, | ||
75 | }; | ||
76 | |||
77 | /* Board Hauppauge WinTV HVR 900 digital */ | ||
78 | static struct em28xx_reg_seq hauppauge_wintv_hvr_900_digital[] = { | ||
79 | {EM28XX_R08_GPIO, 0x2e, ~EM_GPIO_4, 10}, | ||
80 | {EM2880_R04_GPO, 0x04, 0x0f, 10}, | ||
81 | {EM2880_R04_GPO, 0x0c, 0x0f, 10}, | ||
82 | { -1, -1, -1, -1}, | ||
83 | }; | ||
84 | |||
85 | /* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */ | ||
86 | static struct em28xx_reg_seq em2880_msi_digivox_ad_analog[] = { | ||
87 | {EM28XX_R08_GPIO, 0x69, ~EM_GPIO_4, 10}, | ||
88 | { -1, -1, -1, -1}, | ||
89 | }; | ||
90 | |||
91 | /* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */ | ||
92 | static struct em28xx_reg_seq em2880_msi_digivox_ad_digital[] = { | ||
93 | {EM28XX_R08_GPIO, 0x6a, ~EM_GPIO_4, 10}, | ||
94 | { -1, -1, -1, -1}, | ||
95 | }; | ||
96 | |||
97 | /* Board - EM2870 Kworld 355u | ||
98 | Analog - No input analog */ | ||
99 | static struct em28xx_reg_seq em2870_kworld_355u_digital[] = { | ||
100 | {EM2880_R04_GPO, 0x01, 0xff, 10}, | ||
101 | { -1, -1, -1, -1}, | ||
102 | }; | ||
103 | |||
104 | /* Callback for the most boards */ | ||
105 | static struct em28xx_reg_seq default_callback[] = { | ||
106 | {EM28XX_R08_GPIO, EM_GPIO_4, EM_GPIO_4, 10}, | ||
107 | {EM28XX_R08_GPIO, 0, EM_GPIO_4, 10}, | ||
108 | {EM28XX_R08_GPIO, EM_GPIO_4, EM_GPIO_4, 10}, | ||
109 | { -1, -1, -1, -1}, | ||
110 | }; | ||
111 | |||
112 | /* Pinnacle PCTV HD Mini (80e) GPIOs | ||
113 | 0-5: not used | ||
114 | 6: demod reset, active low | ||
115 | 7: LED on, active high */ | ||
116 | static struct em28xx_reg_seq em2874_pinnacle_80e_digital[] = { | ||
117 | {EM28XX_R06_I2C_CLK, 0x45, 0xff, 10}, /*400 KHz*/ | ||
118 | {EM2874_R80_GPIO, 0x80, 0xff, 100},/*Demod reset*/ | ||
119 | {EM2874_R80_GPIO, 0xc0, 0xff, 10}, | ||
120 | { -1, -1, -1, -1}, | ||
121 | }; | ||
122 | |||
123 | /* | ||
124 | * Board definitions | ||
125 | */ | ||
54 | struct em28xx_board em28xx_boards[] = { | 126 | struct em28xx_board em28xx_boards[] = { |
55 | [EM2750_BOARD_UNKNOWN] = { | 127 | [EM2750_BOARD_UNKNOWN] = { |
56 | .name = "Unknown EM2750/EM2751 webcam grabber", | 128 | .name = "Unknown EM2750/EM2751 webcam grabber", |
@@ -1149,75 +1221,6 @@ struct usb_device_id em28xx_id_table [] = { | |||
1149 | MODULE_DEVICE_TABLE(usb, em28xx_id_table); | 1221 | MODULE_DEVICE_TABLE(usb, em28xx_id_table); |
1150 | 1222 | ||
1151 | /* | 1223 | /* |
1152 | * Reset sequences for analog/digital modes | ||
1153 | */ | ||
1154 | |||
1155 | /* Reset for the most [analog] boards */ | ||
1156 | static struct em28xx_reg_seq default_analog[] = { | ||
1157 | {EM28XX_R08_GPIO, 0x6d, ~EM_GPIO_4, 10}, | ||
1158 | { -1, -1, -1, -1}, | ||
1159 | }; | ||
1160 | |||
1161 | /* Reset for the most [digital] boards */ | ||
1162 | static struct em28xx_reg_seq default_digital[] = { | ||
1163 | {EM28XX_R08_GPIO, 0x6e, ~EM_GPIO_4, 10}, | ||
1164 | { -1, -1, -1, -1}, | ||
1165 | }; | ||
1166 | |||
1167 | /* Board Hauppauge WinTV HVR 900 analog */ | ||
1168 | static struct em28xx_reg_seq hauppauge_wintv_hvr_900_analog[] = { | ||
1169 | {EM28XX_R08_GPIO, 0x2d, ~EM_GPIO_4, 10}, | ||
1170 | {0x05, 0xff, 0x10, 10}, | ||
1171 | { -1, -1, -1, -1}, | ||
1172 | }; | ||
1173 | |||
1174 | /* Board Hauppauge WinTV HVR 900 digital */ | ||
1175 | static struct em28xx_reg_seq hauppauge_wintv_hvr_900_digital[] = { | ||
1176 | {EM28XX_R08_GPIO, 0x2e, ~EM_GPIO_4, 10}, | ||
1177 | {EM2880_R04_GPO, 0x04, 0x0f, 10}, | ||
1178 | {EM2880_R04_GPO, 0x0c, 0x0f, 10}, | ||
1179 | { -1, -1, -1, -1}, | ||
1180 | }; | ||
1181 | |||
1182 | /* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */ | ||
1183 | static struct em28xx_reg_seq em2880_msi_digivox_ad_analog[] = { | ||
1184 | {EM28XX_R08_GPIO, 0x69, ~EM_GPIO_4, 10}, | ||
1185 | { -1, -1, -1, -1}, | ||
1186 | }; | ||
1187 | |||
1188 | /* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */ | ||
1189 | static struct em28xx_reg_seq em2880_msi_digivox_ad_digital[] = { | ||
1190 | {EM28XX_R08_GPIO, 0x6a, ~EM_GPIO_4, 10}, | ||
1191 | { -1, -1, -1, -1}, | ||
1192 | }; | ||
1193 | |||
1194 | /* Board - EM2870 Kworld 355u | ||
1195 | Analog - No input analog */ | ||
1196 | static struct em28xx_reg_seq em2870_kworld_355u_digital[] = { | ||
1197 | {EM2880_R04_GPO, 0x01, 0xff, 10}, | ||
1198 | { -1, -1, -1, -1}, | ||
1199 | }; | ||
1200 | |||
1201 | /* Callback for the most boards */ | ||
1202 | static struct em28xx_reg_seq default_callback[] = { | ||
1203 | {EM28XX_R08_GPIO, EM_GPIO_4, EM_GPIO_4, 10}, | ||
1204 | {EM28XX_R08_GPIO, 0, EM_GPIO_4, 10}, | ||
1205 | {EM28XX_R08_GPIO, EM_GPIO_4, EM_GPIO_4, 10}, | ||
1206 | { -1, -1, -1, -1}, | ||
1207 | }; | ||
1208 | |||
1209 | /* Pinnacle PCTV HD Mini (80e) GPIOs | ||
1210 | 0-5: not used | ||
1211 | 6: demod reset, active low | ||
1212 | 7: LED on, active high */ | ||
1213 | static struct em28xx_reg_seq em2874_pinnacle_80e_digital[] = { | ||
1214 | {EM28XX_R06_I2C_CLK, 0x45, 0xff, 10}, /*400 KHz*/ | ||
1215 | {EM2874_R80_GPIO, 0x80, 0xff, 100},/*Demod reset*/ | ||
1216 | {EM2874_R80_GPIO, 0xc0, 0xff, 10}, | ||
1217 | { -1, -1, -1, -1}, | ||
1218 | }; | ||
1219 | |||
1220 | /* | ||
1221 | * EEPROM hash table for devices with generic USB IDs | 1224 | * EEPROM hash table for devices with generic USB IDs |
1222 | */ | 1225 | */ |
1223 | static struct em28xx_hash_table em28xx_eeprom_hash [] = { | 1226 | static struct em28xx_hash_table em28xx_eeprom_hash [] = { |