au0828-cards.c (c70ffd5968476ffe9fe2a8bfdc88956ecef92d2a) au0828-cards.c (8a4e786660f512b029b56d94d1b8f0201e67aab3)
1/*
2 * Driver for the Auvitek USB bridge
3 *
4 * Copyright (c) 2008 Steven Toth <stoth@linuxtv.org>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or

--- 174 unchanged lines hidden (view full) ---

183
184 printk(KERN_INFO "%s: hauppauge eeprom: model=%d\n",
185 __func__, tv.model);
186}
187
188void au0828_card_setup(struct au0828_dev *dev)
189{
190 static u8 eeprom[256];
1/*
2 * Driver for the Auvitek USB bridge
3 *
4 * Copyright (c) 2008 Steven Toth <stoth@linuxtv.org>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or

--- 174 unchanged lines hidden (view full) ---

183
184 printk(KERN_INFO "%s: hauppauge eeprom: model=%d\n",
185 __func__, tv.model);
186}
187
188void au0828_card_setup(struct au0828_dev *dev)
189{
190 static u8 eeprom[256];
191#ifdef CONFIG_VIDEO_AU0828_V4L2
191 struct tuner_setup tun_setup;
192 struct v4l2_subdev *sd;
193 unsigned int mode_mask = T_ANALOG_TV;
192 struct tuner_setup tun_setup;
193 struct v4l2_subdev *sd;
194 unsigned int mode_mask = T_ANALOG_TV;
195#endif
194
195 dprintk(1, "%s()\n", __func__);
196
197 memcpy(&dev->board, &au0828_boards[dev->boardnr], sizeof(dev->board));
198
199 if (dev->i2c_rc == 0) {
200 dev->i2c_client.addr = 0xa0 >> 1;
201 tveeprom_read(&dev->i2c_client, eeprom, sizeof(eeprom));

--- 4 unchanged lines hidden (view full) ---

206 case AU0828_BOARD_HAUPPAUGE_HVR950Q:
207 case AU0828_BOARD_HAUPPAUGE_HVR950Q_MXL:
208 case AU0828_BOARD_HAUPPAUGE_WOODBURY:
209 if (dev->i2c_rc == 0)
210 hauppauge_eeprom(dev, eeprom+0xa0);
211 break;
212 }
213
196
197 dprintk(1, "%s()\n", __func__);
198
199 memcpy(&dev->board, &au0828_boards[dev->boardnr], sizeof(dev->board));
200
201 if (dev->i2c_rc == 0) {
202 dev->i2c_client.addr = 0xa0 >> 1;
203 tveeprom_read(&dev->i2c_client, eeprom, sizeof(eeprom));

--- 4 unchanged lines hidden (view full) ---

208 case AU0828_BOARD_HAUPPAUGE_HVR950Q:
209 case AU0828_BOARD_HAUPPAUGE_HVR950Q_MXL:
210 case AU0828_BOARD_HAUPPAUGE_WOODBURY:
211 if (dev->i2c_rc == 0)
212 hauppauge_eeprom(dev, eeprom+0xa0);
213 break;
214 }
215
216#ifdef CONFIG_VIDEO_AU0828_V4L2
214 if (AUVI_INPUT(0).type != AU0828_VMUX_UNDEFINED) {
215 /* Load the analog demodulator driver (note this would need to
216 be abstracted out if we ever need to support a different
217 demod) */
218 sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
219 "au8522", 0x8e >> 1, NULL);
220 if (sd == NULL)
221 printk(KERN_ERR "analog subdev registration failed\n");

--- 9 unchanged lines hidden (view full) ---

231
232 tun_setup.mode_mask = mode_mask;
233 tun_setup.type = dev->board.tuner_type;
234 tun_setup.addr = dev->board.tuner_addr;
235 tun_setup.tuner_callback = au0828_tuner_callback;
236 v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_type_addr,
237 &tun_setup);
238 }
217 if (AUVI_INPUT(0).type != AU0828_VMUX_UNDEFINED) {
218 /* Load the analog demodulator driver (note this would need to
219 be abstracted out if we ever need to support a different
220 demod) */
221 sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
222 "au8522", 0x8e >> 1, NULL);
223 if (sd == NULL)
224 printk(KERN_ERR "analog subdev registration failed\n");

--- 9 unchanged lines hidden (view full) ---

234
235 tun_setup.mode_mask = mode_mask;
236 tun_setup.type = dev->board.tuner_type;
237 tun_setup.addr = dev->board.tuner_addr;
238 tun_setup.tuner_callback = au0828_tuner_callback;
239 v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_type_addr,
240 &tun_setup);
241 }
242#endif
239}
240
241/*
242 * The bridge has between 8 and 12 gpios.
243 * Regs 1 and 0 deal with output enables.
244 * Regs 3 and 2 deal with direction.
245 */
246void au0828_gpio_setup(struct au0828_dev *dev)

--- 97 unchanged lines hidden ---
243}
244
245/*
246 * The bridge has between 8 and 12 gpios.
247 * Regs 1 and 0 deal with output enables.
248 * Regs 3 and 2 deal with direction.
249 */
250void au0828_gpio_setup(struct au0828_dev *dev)

--- 97 unchanged lines hidden ---