aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx23885/cx23885-cards.c
diff options
context:
space:
mode:
authorSteven Toth <stoth@hauppauge.com>2007-09-08 20:31:56 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-09 21:14:29 -0400
commita6a3f14035fe94c0925fea62f3d3a7a1ab44c1f1 (patch)
treeb20370fa8929c296242c941b24d6bda95000d366 /drivers/media/video/cx23885/cx23885-cards.c
parent15e90839512a2c7d2b7f801af8f9057279e3f813 (diff)
V4L/DVB (6199): cx23885: Changes to allow demodulators on each transport bus
cx23885: Changes to allow demodulators on each transport bus. Signed-off-by: Steven Toth <stoth@hauppauge.com> Reviewed-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-cards.c')
-rw-r--r--drivers/media/video/cx23885/cx23885-cards.c53
1 files changed, 52 insertions, 1 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c
index cdda11ddf145..b9012acabb2f 100644
--- a/drivers/media/video/cx23885/cx23885-cards.c
+++ b/drivers/media/video/cx23885/cx23885-cards.c
@@ -111,7 +111,7 @@ struct cx23885_board cx23885_boards[] = {
111 }, 111 },
112 [CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP] = { 112 [CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP] = {
113 .name = "DViCO FusionHDTV5 Express", 113 .name = "DViCO FusionHDTV5 Express",
114 .portc = CX23885_MPEG_DVB, 114 .portb = CX23885_MPEG_DVB,
115 }, 115 },
116}; 116};
117const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); 117const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
@@ -197,8 +197,43 @@ static void hauppauge_eeprom(struct cx23885_dev *dev, u8 *eeprom_data)
197 dev->name, tv.model); 197 dev->name, tv.model);
198} 198}
199 199
200void cx23885_gpio_setup(struct cx23885_dev *dev)
201{
202 switch(dev->board) {
203 case CX23885_BOARD_HAUPPAUGE_HVR1250:
204 /* GPIO-0 cx24227 demodulator reset */
205 cx_set(GP0_IO, 0x00010001); /* Bring the part out of reset */
206 break;
207 case CX23885_BOARD_HAUPPAUGE_HVR1800:
208 /* GPIO-0 656_CLK */
209 /* GPIO-1 656_D0 */
210 /* GPIO-2 8295A Reset */
211 /* GPIO-3-10 cx23417 data0-7 */
212 /* GPIO-11-14 cx23417 addr0-3 */
213 /* GPIO-15-18 cx23417 READY, CS, RD, WR */
214 /* GPIO-19 IR_RX */
215 // FIXME: Analog requires the tuner is brought out of reset
216 break;
217 }
218}
219
220int cx23885_ir_init(struct cx23885_dev *dev)
221{
222 switch (dev->board) {
223 case CX23885_BOARD_HAUPPAUGE_HVR1250:
224 case CX23885_BOARD_HAUPPAUGE_HVR1800:
225 /* FIXME: Implement me */
226 break;
227 }
228
229 return 0;
230}
231
200void cx23885_card_setup(struct cx23885_dev *dev) 232void cx23885_card_setup(struct cx23885_dev *dev)
201{ 233{
234 struct cx23885_tsport *ts1 = &dev->ts1;
235 struct cx23885_tsport *ts2 = &dev->ts2;
236
202 static u8 eeprom[256]; 237 static u8 eeprom[256];
203 238
204 if (dev->i2c_bus[0].i2c_rc == 0) { 239 if (dev->i2c_bus[0].i2c_rc == 0) {
@@ -215,6 +250,22 @@ void cx23885_card_setup(struct cx23885_dev *dev)
215 hauppauge_eeprom(dev, eeprom+0x80); 250 hauppauge_eeprom(dev, eeprom+0x80);
216 break; 251 break;
217 } 252 }
253
254 switch (dev->board) {
255 case CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP:
256 ts1->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */
257 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */
258 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
259 break;
260 case CX23885_BOARD_HAUPPAUGE_HVR1250:
261 case CX23885_BOARD_HAUPPAUGE_HVR1800:
262 case CX23885_BOARD_HAUPPAUGE_HVR1800lp:
263 default:
264 ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */
265 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */
266 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
267 }
268
218} 269}
219 270
220/* ------------------------------------------------------------------ */ 271/* ------------------------------------------------------------------ */