diff options
author | Sri Deevi <srinivasa.deevi@conexant.com> | 2009-03-10 20:16:26 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-04-06 20:44:04 -0400 |
commit | 6e4f574ba43511ac1cb860027275e08529c5a28f (patch) | |
tree | 6e710a1f93e12c001b2d8634d1a344690586a6ac /drivers/media/video/cx231xx/cx231xx-cards.c | |
parent | b9255176453086b2531c5559350bd5c92b771cc5 (diff) |
V4L/DVB (10958): cx231xx: some additional CodingStyle and minor fixes
changed the pcb-config.c/h to pcb-cfg.c/h for short names.
Signed-off-by: Srinivasa Deevi <srinivasa.deevi@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx231xx/cx231xx-cards.c')
-rw-r--r-- | drivers/media/video/cx231xx/cx231xx-cards.c | 248 |
1 files changed, 103 insertions, 145 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c index f18d0c11de7d..c12bb62021a9 100644 --- a/drivers/media/video/cx231xx/cx231xx-cards.c +++ b/drivers/media/video/cx231xx/cx231xx-cards.c | |||
@@ -61,127 +61,108 @@ static struct cx231xx_reg_seq RDE250_XCV_TUNER[] = { | |||
61 | * Board definitions | 61 | * Board definitions |
62 | */ | 62 | */ |
63 | struct cx231xx_board cx231xx_boards[] = { | 63 | struct cx231xx_board cx231xx_boards[] = { |
64 | |||
65 | [CX231XX_BOARD_UNKNOWN] = { | 64 | [CX231XX_BOARD_UNKNOWN] = { |
66 | .name = "Unknown CX231xx video grabber", | 65 | .name = "Unknown CX231xx video grabber", |
67 | .tuner_type = TUNER_ABSENT, | 66 | .tuner_type = TUNER_ABSENT, |
68 | .input = {{ | 67 | .input = {{ |
69 | .type = CX231XX_VMUX_TELEVISION, | 68 | .type = CX231XX_VMUX_TELEVISION, |
70 | .vmux = CX231XX_VIN_3_1, | 69 | .vmux = CX231XX_VIN_3_1, |
71 | .amux = CX231XX_AMUX_VIDEO, | 70 | .amux = CX231XX_AMUX_VIDEO, |
72 | .gpio = 0, | 71 | .gpio = 0, |
73 | }, { | 72 | }, { |
74 | .type = | 73 | .type = CX231XX_VMUX_COMPOSITE1, |
75 | CX231XX_VMUX_COMPOSITE1, | 74 | .vmux = CX231XX_VIN_2_1, |
76 | .vmux = CX231XX_VIN_2_1, | 75 | .amux = CX231XX_AMUX_LINE_IN, |
77 | .amux = CX231XX_AMUX_LINE_IN, | 76 | .gpio = 0, |
78 | .gpio = 0, | 77 | }, { |
79 | }, { | 78 | .type = CX231XX_VMUX_SVIDEO, |
80 | .type = | 79 | .vmux = CX231XX_VIN_1_1 | |
81 | CX231XX_VMUX_SVIDEO, | 80 | (CX231XX_VIN_1_2 << 8) | |
82 | .vmux = | 81 | CX25840_SVIDEO_ON, |
83 | CX231XX_VIN_1_1 | | 82 | .amux = CX231XX_AMUX_LINE_IN, |
84 | (CX231XX_VIN_1_2 << 8) | | 83 | .gpio = 0, |
85 | CX25840_SVIDEO_ON, | 84 | } |
86 | .amux = | 85 | }, |
87 | CX231XX_AMUX_LINE_IN, | 86 | }, |
88 | .gpio = 0, | ||
89 | } }, | ||
90 | }, | ||
91 | |||
92 | [CX231XX_BOARD_CNXT_RDE_250] = { | 87 | [CX231XX_BOARD_CNXT_RDE_250] = { |
93 | .name = "Conexant Hybrid TV - RDE250", | 88 | .name = "Conexant Hybrid TV - RDE250", |
94 | .valid = CX231XX_BOARD_VALIDATED, | 89 | .tuner_type = TUNER_XC5000, |
95 | .tuner_type = TUNER_XC5000, | 90 | .tuner_addr = 0x61, |
96 | .tuner_addr = 0x61, | 91 | .tuner_gpio = RDE250_XCV_TUNER, |
97 | .tuner_gpio = RDE250_XCV_TUNER, | 92 | .tuner_sif_gpio = 0x05, |
98 | .tuner_sif_gpio = 0x05, | 93 | .tuner_scl_gpio = 0x1a, |
99 | .tuner_scl_gpio = 0x1a, | 94 | .tuner_sda_gpio = 0x1b, |
100 | .tuner_sda_gpio = 0x1b, | 95 | .decoder = CX231XX_AVDECODER, |
101 | .decoder = CX231XX_AVDECODER, | 96 | .demod_xfer_mode = 0, |
102 | .demod_xfer_mode = 0, | 97 | .ctl_pin_status_mask = 0xFFFFFFC4, |
103 | .ctl_pin_status_mask = 0xFFFFFFC4, | 98 | .agc_analog_digital_select_gpio = 0x0c, |
104 | .agc_analog_digital_select_gpio = 0x0c, | 99 | .gpio_pin_status_mask = 0x4001000, |
105 | .gpio_pin_status_mask = 0x4001000, | 100 | .tuner_i2c_master = 1, |
106 | .tuner_i2c_master = 1, | 101 | .demod_i2c_master = 2, |
107 | .demod_i2c_master = 2, | 102 | .has_dvb = 1, |
108 | .has_dvb = 1, | 103 | .demod_addr = 0x02, |
109 | .demod_addr = 0x02, | 104 | .norm = V4L2_STD_PAL, |
110 | .norm = V4L2_STD_PAL, | 105 | |
111 | 106 | .input = {{ | |
112 | .input = {{ | 107 | .type = CX231XX_VMUX_TELEVISION, |
113 | .type = | 108 | .vmux = CX231XX_VIN_3_1, |
114 | CX231XX_VMUX_TELEVISION, | 109 | .amux = CX231XX_AMUX_VIDEO, |
115 | .vmux = CX231XX_VIN_3_1, | 110 | .gpio = 0, |
116 | .amux = CX231XX_AMUX_VIDEO, | 111 | }, { |
117 | .gpio = 0, | 112 | .type = CX231XX_VMUX_COMPOSITE1, |
118 | }, { | 113 | .vmux = CX231XX_VIN_2_1, |
119 | .type = | 114 | .amux = CX231XX_AMUX_LINE_IN, |
120 | CX231XX_VMUX_COMPOSITE1, | 115 | .gpio = 0, |
121 | .vmux = CX231XX_VIN_2_1, | 116 | }, { |
122 | .amux = | 117 | .type = CX231XX_VMUX_SVIDEO, |
123 | CX231XX_AMUX_LINE_IN, | 118 | .vmux = CX231XX_VIN_1_1 | |
124 | .gpio = 0, | 119 | (CX231XX_VIN_1_2 << 8) | |
125 | }, { | 120 | CX25840_SVIDEO_ON, |
126 | .type = | 121 | .amux = CX231XX_AMUX_LINE_IN, |
127 | CX231XX_VMUX_SVIDEO, | 122 | .gpio = 0, |
128 | .vmux = | 123 | } |
129 | CX231XX_VIN_1_1 | | 124 | }, |
130 | (CX231XX_VIN_1_2 << | 125 | }, |
131 | 8) | | ||
132 | CX25840_SVIDEO_ON, | ||
133 | .amux = | ||
134 | CX231XX_AMUX_LINE_IN, | ||
135 | .gpio = 0, | ||
136 | } }, | ||
137 | }, | ||
138 | 126 | ||
139 | [CX231XX_BOARD_CNXT_RDU_250] = { | 127 | [CX231XX_BOARD_CNXT_RDU_250] = { |
140 | .name = "Conexant Hybrid TV - RDU250", | 128 | .name = "Conexant Hybrid TV - RDU250", |
141 | .valid = CX231XX_BOARD_VALIDATED, | 129 | .tuner_type = TUNER_XC5000, |
142 | .tuner_type = TUNER_XC5000, | 130 | .tuner_addr = 0x61, |
143 | .tuner_addr = 0x61, | 131 | .tuner_gpio = RDE250_XCV_TUNER, |
144 | .tuner_gpio = RDE250_XCV_TUNER, | 132 | .tuner_sif_gpio = 0x05, |
145 | .tuner_sif_gpio = 0x05, | 133 | .tuner_scl_gpio = 0x1a, |
146 | .tuner_scl_gpio = 0x1a, | 134 | .tuner_sda_gpio = 0x1b, |
147 | .tuner_sda_gpio = 0x1b, | 135 | .decoder = CX231XX_AVDECODER, |
148 | .decoder = CX231XX_AVDECODER, | 136 | .demod_xfer_mode = 0, |
149 | .demod_xfer_mode = 0, | 137 | .ctl_pin_status_mask = 0xFFFFFFC4, |
150 | .ctl_pin_status_mask = 0xFFFFFFC4, | 138 | .agc_analog_digital_select_gpio = 0x0c, |
151 | .agc_analog_digital_select_gpio = 0x0c, | 139 | .gpio_pin_status_mask = 0x4001000, |
152 | .gpio_pin_status_mask = 0x4001000, | 140 | .tuner_i2c_master = 1, |
153 | .tuner_i2c_master = 1, | 141 | .demod_i2c_master = 2, |
154 | .demod_i2c_master = 2, | 142 | .has_dvb = 1, |
155 | .has_dvb = 1, | 143 | .demod_addr = 0x32, |
156 | .demod_addr = 0x32, | 144 | .norm = V4L2_STD_NTSC, |
157 | .norm = V4L2_STD_NTSC, | 145 | |
158 | 146 | .input = {{ | |
159 | .input = {{ | 147 | .type = CX231XX_VMUX_TELEVISION, |
160 | .type = | 148 | .vmux = CX231XX_VIN_3_1, |
161 | CX231XX_VMUX_TELEVISION, | 149 | .amux = CX231XX_AMUX_VIDEO, |
162 | .vmux = CX231XX_VIN_3_1, | 150 | .gpio = 0, |
163 | .amux = CX231XX_AMUX_VIDEO, | 151 | }, { |
164 | .gpio = 0, | 152 | .type = CX231XX_VMUX_COMPOSITE1, |
165 | }, { | 153 | .vmux = CX231XX_VIN_2_1, |
166 | .type = | 154 | .amux = CX231XX_AMUX_LINE_IN, |
167 | CX231XX_VMUX_COMPOSITE1, | 155 | .gpio = 0, |
168 | .vmux = CX231XX_VIN_2_1, | 156 | }, { |
169 | .amux = | 157 | .type = CX231XX_VMUX_SVIDEO, |
170 | CX231XX_AMUX_LINE_IN, | 158 | .vmux = CX231XX_VIN_1_1 | |
171 | .gpio = 0, | 159 | (CX231XX_VIN_1_2 << 8) | |
172 | }, { | 160 | CX25840_SVIDEO_ON, |
173 | .type = | 161 | .amux = CX231XX_AMUX_LINE_IN, |
174 | CX231XX_VMUX_SVIDEO, | 162 | .gpio = 0, |
175 | .vmux = | 163 | } |
176 | CX231XX_VIN_1_1 | | 164 | }, |
177 | (CX231XX_VIN_1_2 << | 165 | }, |
178 | 8) | | ||
179 | CX25840_SVIDEO_ON, | ||
180 | .amux = | ||
181 | CX231XX_AMUX_LINE_IN, | ||
182 | .gpio = 0, | ||
183 | } }, | ||
184 | }, | ||
185 | }; | 166 | }; |
186 | const unsigned int cx231xx_bcount = ARRAY_SIZE(cx231xx_boards); | 167 | const unsigned int cx231xx_bcount = ARRAY_SIZE(cx231xx_boards); |
187 | 168 | ||
@@ -243,25 +224,11 @@ void cx231xx_pre_card_setup(struct cx231xx *dev) | |||
243 | cx231xx_info("Identified as %s (card=%d)\n", | 224 | cx231xx_info("Identified as %s (card=%d)\n", |
244 | dev->board.name, dev->model); | 225 | dev->board.name, dev->model); |
245 | 226 | ||
246 | /* Do card specific if any */ | 227 | cx231xx_info("Precard: Board is %s\n", dev->board.name); |
247 | switch (dev->model) { | 228 | /* set the direction for GPIO pins */ |
248 | case CX231XX_BOARD_CNXT_RDE_250: | 229 | cx231xx_set_gpio_direction(dev, dev->board.tuner_gpio->bit, 1); |
249 | /* do card specific GPIO settings if required */ | 230 | cx231xx_set_gpio_value(dev, dev->board.tuner_gpio->bit, 1); |
250 | cx231xx_info("Precard: Board is Conexnat RDE 250\n"); | 231 | cx231xx_set_gpio_direction(dev, dev->board.tuner_sif_gpio, 1); |
251 | /* set the direction for GPIO pins */ | ||
252 | cx231xx_set_gpio_direction(dev, dev->board.tuner_gpio->bit, 1); | ||
253 | cx231xx_set_gpio_value(dev, dev->board.tuner_gpio->bit, 1); | ||
254 | cx231xx_set_gpio_direction(dev, dev->board.tuner_sif_gpio, 1); | ||
255 | break; | ||
256 | case CX231XX_BOARD_CNXT_RDU_250: | ||
257 | /* do card specific GPIO settings if required */ | ||
258 | cx231xx_info("Precard: Board is Conexnat RDU 250\n"); | ||
259 | /* set the direction for GPIO pins */ | ||
260 | cx231xx_set_gpio_direction(dev, dev->board.tuner_gpio->bit, 1); | ||
261 | cx231xx_set_gpio_value(dev, dev->board.tuner_gpio->bit, 1); | ||
262 | cx231xx_set_gpio_direction(dev, dev->board.tuner_sif_gpio, 1); | ||
263 | break; | ||
264 | } | ||
265 | 232 | ||
266 | /* request some modules if any required */ | 233 | /* request some modules if any required */ |
267 | 234 | ||
@@ -362,15 +329,6 @@ void cx231xx_card_setup(struct cx231xx *dev) | |||
362 | break; | 329 | break; |
363 | } | 330 | } |
364 | 331 | ||
365 | if (dev->board.valid == CX231XX_BOARD_NOT_VALIDATED) { | ||
366 | cx231xx_errdev("\n\n"); | ||
367 | cx231xx_errdev("The support for this board weren't " | ||
368 | "valid yet.\n"); | ||
369 | cx231xx_errdev("Please send a report of having this working\n"); | ||
370 | cx231xx_errdev("not to V4L mailing list (and/or to other " | ||
371 | "addresses)\n\n"); | ||
372 | } | ||
373 | |||
374 | /* request some modules */ | 332 | /* request some modules */ |
375 | if (dev->board.decoder == CX231XX_AVDECODER) { | 333 | if (dev->board.decoder == CX231XX_AVDECODER) { |
376 | cx231xx_info(": Requesting cx25840 module\n"); | 334 | cx231xx_info(": Requesting cx25840 module\n"); |