Scott wrote:
> i re downloaded and recompiled the drivers and still no /dev/video0, i
> still get the same invalid eeprom error. im beginning to think this is
> worthless on that particular machine and that i should put it on my
> desktop as the backend and then use the box for a frontend.
> but if there is anything else you can do to help, i would like to still try.
Well, you're the second user, so far, that has reported the fix for
trying to correct the timing of I2C transitions did nothing. But you're
the only one so far who provided all the lspci and lsmod info
(thanks!).
I'm going to take a harder look at the lspci and lsmod and dmesg output
you provided to see if there's something more subtle going on. If
another user with I2C problems can report the same sort of info, I (or
anyone else on the list who'd like) can start doing comparative &
differential analyses.
In the mean time I'd like you to try two more things:
1) Test that PCI bus latencies are *not* to blame for the I2C problems
by slowing the I2C bus SCL clock down significantly. The attached test
patch slows it down by a factor of 450 by modifying the CX18_SCL_PERIOD.
(That's the slowest my system will let cx18 run it without griping about
soft lockups in dmesg.) This patch is only for test.
2) Try and perform more aggressive initialization of the HVR-1600's I2C
buses. The attached patch has this change in the form of two new
functions, each called to initialize each I2C bus on the HVR-1600.
If the attached patch works for you, we can start to narrow down what
actually helped. If it doesn't, I can start to look at other potential
problem sources (e.g. debugging from i2c-algo-bit, PCI bus error
reporting to the cx18 driver, PCI chipset errata, CX23418 hardware block
initialization, etc.).
Again your feedback, both positive and negative, helps.
Regards,
Andy
> and here is the memory info in case anyone wants to debug the memory
> problem.
>
> # free
> total used free shared buffers cached
> Mem: 385604 285472 100132 0 6716 137176
> -/+ buffers/cache: 141580 244024
> Swap: 1124508 32328 1092180
>
> # cat /proc/meminfo
> MemTotal: 385604 kB
> MemFree: 99992 kB
> Buffers: 6752 kB
> Cached: 137192 kB
> SwapCached: 2000 kB
> Active: 186208 kB
> Inactive: 66876 kB
> HighTotal: 0 kB
> HighFree: 0 kB
> LowTotal: 385604 kB
> LowFree: 99992 kB
> SwapTotal: 1124508 kB
> SwapFree: 1092180 kB
> Dirty: 0 kB
> Writeback: 0 kB
> AnonPages: 107140 kB
> Mapped: 40304 kB
> Slab: 17184 kB
> SReclaimable: 7220 kB
> SUnreclaim: 9964 kB
> PageTables: 1640 kB
> NFS_Unstable: 0 kB
> Bounce: 0 kB
> CommitLimit: 1317308 kB
> Committed_AS: 427720 kB
> VmallocTotal: 638968 kB
> VmallocUsed: 27512 kB
> VmallocChunk: 562556 kB
>
>
>
> Andy Walls wrote:
> > Scott wrote:
> >
> >
> >> I have the following pci devices,
> >>
> >> nvidia vga card fx5500
> >> audio card
> >> tv tuner
> >> ethernet
> >>
> >> the motherboard has no onboard video sound or ethernet, at the most i
> >> could get rid of the sound and ethernet, but im afraid that card that
> >> uses the most of the pci bus is the graphics card.
> >>
> >> when i boot up into recovery mode which is hopefully runlevel 2, i
> >> tried to modprobe cx18 and checked for video0 in /dev/ and it was
> >> nonexistant still.
> >>
> >
> > While in a text only mode, did you
> >
> > # modporbe -r nvidia
> >
> > first, before trying to
> >
> > # modprobe cx18
> >
> > ?
> >
> >
> >
> >> i havent removed any of the pci cards because the computer is useless
> >> without them.
> >>
> >
> > Sorry for my miscommunication. I didn't intend to ask you to remove
> > cards, just modules (i.e. modporbe -r foo). I meant to say unload
> > *modules*.
> >
> >
> >
> >> i hope this helps.
> >>
> >
> > It does. Thanks for the detailed output. Discussion is in-line below.
> >
> >
> >> lspci -tv
> >> -----------------------
> >> -[0000:00]-+-00.0 Intel Corporation 82850 850 (Tehama) Chipset Host
> >> Bridge (MCH)
> >> +-01.0-[0000:01]--
> >>
> >
> > I note no card on the AGP bridge.
> >
> >
> >> +-1e.0-[0000:02]--+-09.0 nVidia Corporation NV34 [GeForce
> >> FX
> >> 5500]
> >> | +-0b.0 Conexant CX23418 Single-Chip
> >> MPEG-2
> >> Encoder with Integrated Analog Video/Broadcast Audio Decoder
> >> | +-0c.0 Aureal Semiconductor Vortex 2
> >> | \-0d.0 Realtek Semiconductor Co., Ltd.
> >> RTL-8169 Gigabit Ethernet
> >>
> >
> > Most of the heavy hitters, expcept for the IDE controller, are on bus
> > segment [0000:02] behind the PCI-PCI bridge at 1e.0. If you have no
> > heavy traffic USB devices bus segment [0000:02] will be the busiest in
> > the system unless disk activity is going on.
> >
> >
> >> +-1f.0 Intel Corporation 82801BA ISA Bridge (LPC)
> >> +-1f.1 Intel Corporation 82801BA IDE U100 Controller
> >> +-1f.2 Intel Corporation 82801BA/BAM USB Controller #1
> >> +-1f.3 Intel Corporation 82801BA/BAM SMBus Controller
> >> \-1f.4 Intel Corporation 82801BA/BAM USB Controller #1
> >>
> >>
>
> >>
> >> 02:09.0 VGA compatible controller: nVidia Corporation NV34 [GeForce
> >> FX
> >> 5500] (rev a1) (prog-if 00 [VGA])
> >> Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
> >> ParErr- Stepping- SERR- FastB2B-
> >> Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium
> >>
> >>> TAbort-
> >>>
> >> <TAbort- <MAbort- >SERR- <PERR-
> >> Latency: 248 (1250ns min, 250ns max)
> >>
> >
> > Here we go. Latency of 248 clock cycles at 33 MHz. This card can stay
> > on the bus for a maximum of 7.5 usecs at a time. And if nothing is
> > waiting for the bus when it finishes, it can grab it again immediately
> > for another 7.5 usec.
> >
> > I2C bus transactions on the HVR-1600, with the cx18 driver from a few
> > days ago, are running with a clock period of 20 usec. Transitions of
> > SCL and SDA lines are commanded on 1/4 period intervals (roughly 5 usec
> > intervals).
> >
> > You should try the latest cx18 driver at:
> >
> > http://linuxtv.org/hg/~hverkuil/cx18/archive/tip.tar.bz2
> >
> > Hans has started to incorporate changes to properly time I2C SCL and SDA
> > line transitions on the cx23418. Please try it and see if the "Huh, no
> > EEPROM" and the "(ret=-121)" messages go away.
> >
> >
> >
> >> Interrupt: pin A routed to IRQ 11
> >> Region 0: Memory at fd000000 (32-bit, non-prefetchable)
> >> [size=16M]
> >> Region 1: Memory at e0000000 (32-bit, prefetchable)
> >> [size=128M]
> >> [virtual] Expansion ROM at dc600000 [disabled] [size=128K]
> >> Capabilities: [60] Power Management version 2
> >> Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
> >> PME(D0-,D1-,D2-,D3hot-,D3cold-)
> >> Status: D0 PME-Enable- DSel=0 DScale=0 PME-
> >> 00: de 10 26 03 07 00 b0 02 a1 00 00 03 00 f8 00 00
> >> 10: 00 00 00 fd 08 00 00 e0 00 00 00 00 00 00 00 00
> >> 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >> 30: 00 00 00 00 60 00 00 00 00 00 00 00 0b 01 05 01
> >> 40: 00 00 00 00 02 00 30 00 17 02 00 1f 00 00 00 00
> >> 50: 01 00 00 00 01 00 00 00 ce d6 23 00 0f 00 00 00
> >> 60: 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00
> >> 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >> 80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >> 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >> a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >> b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >> c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >> d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >> e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >> f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >>
> >> 02:0b.0 Multimedia video controller: Conexant CX23418 Single-Chip
> >> MPEG-2
> >> Encoder with Integrated Analog Video/Broadcast Audio Decoder
> >> Subsystem: Hauppauge computer works Inc. Unknown device 7444
> >> Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop-
> >> ParErr- Stepping- SERR+ FastB2B-
> >> Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium
> >>
> >>> TAbort-
> >>>
> >> <TAbort- <MAbort- >SERR- <PERR-
> >> Latency: 64 (500ns min, 50000ns max), Cache Line Size: 16
> >> bytes
> >> Interrupt: pin A routed to IRQ 9
> >> Region 0: Memory at f8000000 (32-bit, non-prefetchable)
> >> [size=64M]
> >> Capabilities: [44] Vital Product Data
> >> Capabilities: [4c] Power Management version 2
> >> Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA
> >> PME(D0-,D1-,D2-,D3hot-,D3cold-)
> >> Status: D0 PME-Enable- DSel=0 DScale=0 PME-
> >> 00: f1 14 7a 5b 16 01 90 02 00 00 00 04 04 40 00 00
> >> 10: 00 00 00 f8 00 00 00 00 00 00 00 00 00 00 00 00
> >> 20: 00 00 00 00 00 00 00 00 00 00 00 00 70 00 44 74
> >> 30: 00 00 00 00 44 00 00 00 00 00 00 00 09 01 02 c8
> >> 40: 7b 1f 00 01 03 4c 00 00 00 00 00 00 01 00 22 00
> >> 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >> 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >> 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >> 80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >> 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >> a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >> b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >> c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >> d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >> e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >> f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >>
>
> >
> > So the latencies on PCI bus segment 0000:02, excluding the cx23418 are:
> >
> > PCI-PCI bridge = 32
> > Nvidia = 248
> > Sound card = 32
> > Ethernet = 64
> >
> > That's a worst case wait for the cx23418 of 11.4 usecs, but
> > realistically, only the nvidia card's 7.5 usecs probably matters.
> >
> > The older versions of the cx18 driver probably weren't accounting for
> > this time properly for I2C bus transactions.
> >
> >
> >
> >
> >> lsmod
> >> --------------------------
> >> Module Size Used by
> >> nfs 246124 1
> >> lockd 67592 2 nfs
> >> sunrpc 172412 3 nfs,lockd
> >> af_packet 24840 2
> >> ipv6 273892 16
> >> container 5504 0
> >> sbs 19592 0
> >> ac 6148 0
> >> dock 10656 0
> >> video 18060 0
> >> button 8976 0
> >> battery 11012 0
> >> lp 12580 0
> >> snd_au8830 53556 1
> >> gameport 16776 2 snd_au8830
> >> snd_ac97_codec 100644 1 snd_au8830
> >> snd_pcm_oss 44672 0
> >> snd_mixer_oss 17664 1 snd_pcm_oss
> >> snd_pcm 80388 3 snd_au8830,snd_ac97_codec,snd_pcm_oss
> >> snd_page_alloc 11400 1 snd_pcm
> >> ac97_bus 3200 1 snd_ac97_codec
> >> snd_mpu401_uart 9600 1 snd_au8830
> >> snd_seq_dummy 4740 0
> >> snd_seq_oss 33152 0
> >> s5h1409 10244 0
> >> snd_seq_midi 9600 0
> >> snd_rawmidi 25728 2 snd_mpu401_uart,snd_seq_midi
> >> snd_seq_midi_event 8448 2 snd_seq_oss,snd_seq_midi
> >> snd_seq 53232 6
> >> snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
> >> snd_timer 24324 2 snd_pcm,snd_seq
> >> snd_seq_device 9228 5
> >> snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
> >> lirc_atiusb 19360 0
> >> nvidia 3932108 8
> >>
> >
> > Hmmm. nvidia's 3932108 is an order of magnitude more memory than any
> > other module in the list. ipv6 and nfs are the others that come close,
> > for comparison.
> >
> >
> >> lirc_dev 15860 1 lirc_atiusb
> >> parport_pc 37412 1
> >> snd 54660 13
> >> snd_au8830,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_mpu401_uart,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
> >> cs5345 4948 0
> >> tuner 27724 0
> >> tea5767 8324 1 tuner
> >> tda8290 14340 1 tuner
> >> tda18271 33416 1 tda8290
> >> tda827x 11396 1 tda8290
> >> tuner_xc2028 22704 1 tuner
> >> xc5000 11396 1 tuner
> >> tda9887 11908 1 tuner
> >> tuner_simple 16400 1 tuner
> >> tuner_types 14976 1 tuner_simple
> >> mt20xx 13704 1 tuner
> >> tea5761 6276 1 tuner
> >> parport 37448 2 lp,parport_pc
> >> pcspkr 4224 0
> >> serio_raw 8068 0
> >> psmouse 39952 0
> >> soundcore 8800 1 snd
> >> cx18 91200 0
> >> dvb_core 80796 1 cx18
> >> i2c_algo_bit 7428 1 cx18
> >> cx2341x 13572 1 cx18
> >> v4l2_common 12672 4 cs5345,tuner,cx18,cx2341x
> >> videodev 34560 2 tuner,cx18
> >> v4l1_compat 16004 2 cx18,videodev
> >> tveeprom 13572 1 cx18
> >> i2c_core 26112 17
> >> s5h1409,cs5345,tuner,tea5767,tda8290,tda18271,tda827x,tuner_xc2028,xc5000,tda9887,tuner_simple,mt20xx,tea5761,cx18,i2c_algo_bit,v4l2_common,tveeprom
> >> iTCO_wdt 11940 0
> >> iTCO_vendor_support 4868 1 iTCO_wdt
> >> shpchp 34580 0
> >> pci_hotplug 32704 1 shpchp
> >> intel_agp 25620 1
> >> agpgart 35016 2 nvidia,intel_agp
> >> evdev 11136 3
> >> ext3 133896 1
> >> jbd 60456 1 ext3
> >> mbcache 9732 1 ext3
> >> sg 36764 0
> >> sr_mod 17828 0
> >> cdrom 37536 1 sr_mod
> >> sd_mod 30336 3
> >> floppy 60004 0
> >> uhci_hcd 26640 0
> >> usbcore 138632 3 lirc_atiusb,uhci_hcd
> >> ata_piix 17540 2
> >> ata_generic 8452 0
> >> libata 125168 2 ata_piix,ata_generic
> >> scsi_mod 147084 4 sg,sr_mod,sd_mod,libata
> >> r8169 32260 0
> >> thermal 14344 0
> >> processor 32072 1 thermal
> >> fan 5764 0
> >> fuse 47124 1
> >> apparmor 40728 0
> >> commoncap 8320 1 apparmor
> >>
> >>
> >>
> >>
> >> Andy Walls wrote:
> >>>> Scott wrote:
>
> >>>>> (1 MB)
> >>>>> [ 32.536768] cx18-0: Registered device radio0 for encoder radio
> >>>>> [ 32.537246] cx18-0: Error -12 registering devices
> >>>>> [ 32.537719] tda9887 1-0043: destroying instance
> >>>>> [ 32.539445] cx18-0: Error -12 on initialization
> >>>>> [ 32.539458] cx18: probe of 0000:02:0b.0 failed with error -12
> >>>>>
> >>>>>
> >>> Ack I missed this. -12 is -ENOMEM. You may need to add a line
> >>>
> >> similar
> >>
> >>> to the following to /etc/sysctl.conf:
> >>>
> >>> vm.min_free_kbytes = 16384
> >>>
> >>> To get rid of the ENOMEM problem.
> >>>
> >
> > Hmmm. You have a system level memory shortage problem, which I'm
> > probably not the best person to have help solve. I can tell your system
> > is 256 kB shy of 384 MB physical memory. I don't know how to tell what
> > modules are consuming what size dynamic memory allocations.
> >
> > However, specifically for the cx18 driver, you may want to try
> >
> > # modprobe -r cx18
> > # echo 65535 > /proc/sys/vm/min_free_kbytes
> > # modprobe cx18 enc_mpg_buffers=1 enc_ts_buffers=0 enc_yuv_buffers=0
> > enc_vbi_buffers=0 enc_pcm_buffers=0
> >
> > just to see if you can get the driver to load.
> >
> > Regards,
> > Andy
> >
> >
> >
> >>> That still won't fix the I2C problem that gives you the EEPROM
> >>>
> >> messages
> >>
> >>> (-121 is -EREMOTEIO, refering to the remote I2C on the HVR-1600).
> >>>
> >>> -Andy
--- cx18-8788bde67f6c/linux/drivers/media/video/cx18/cx18-i2c.c.orig 2008-04-21 20:02:41.000000000 -0400
+++ cx18-8788bde67f6c/linux/drivers/media/video/cx18/cx18-i2c.c 2008-04-21 19:59:51.000000000 -0400
@@ -232,7 +232,7 @@ static struct i2c_adapter cx18_i2c_adap_
#endif
};
-#define CX18_SCL_PERIOD (10) /* usecs. 10 usec is period for a 100 KHz clock */
+#define CX18_SCL_PERIOD (4500) /* usecs. 10 usec is period for a 100 KHz clock */
#define CX18_ALGO_BIT_TIMEOUT (2) /* seconds */
static struct i2c_algo_bit_data cx18_i2c_algo_template = {
@@ -248,6 +248,115 @@ static struct i2c_client cx18_i2c_client
.name = "cx18 internal",
};
+static int cx18_i2c_reset_slaves(struct cx18_i2c_algo_callback_data *cb_data,
+ struct i2c_algo_bit_data *bit_algo)
+{
+ /*
+ * From the datasheet for the ATMEL AT24C02B 2 wire Serial EEPROM
+ * that is on my HVR-1600:
+ * "2-Wire Software Reset: After an interruption in protocol, power
+ * loss or system reset, any 2-wire part can be reset by following
+ * these steps:
+ * (a) Create a start bit condition,
+ * (b) clock 9 cycles,
+ * (c) create another start bit followed by stop bit condition [...].
+ * The device is ready for next communication after above steps have
+ * been completed."
+ */
+
+ int i, quarter_cycle, half_cycle;
+
+ half_cycle = bit_algo->udelay;
+ quarter_cycle = (half_cycle + 1)/2;
+
+ /*
+ * Here we assume the bus has already been normalized and
+ * SDA & SCL are high and have been high for the minimum bus idle time
+ *
+ * Since we're not trying to duplicate all the intricacies of
+ * i2c-algo-bit here, we'll be lazy and assume that none of the slaves
+ * will pull SDA & SCL low at a time that would cause problems with
+ * the START & STOP conditions
+ */
+
+ /* Emit start */
+ bit_algo->setsda(cb_data, 0);
+ udelay(half_cycle);
+ bit_algo->setscl(cb_data, 0);
+
+ /* Clock 9 bits of nothing */
+ udelay(quarter_cycle);
+ bit_algo->setsda(cb_data, 1);
+ for (i = 0; i < 9; i++)
+ {
+ udelay(quarter_cycle);
+ bit_algo->setscl(cb_data, 1);
+ udelay(half_cycle);
+ bit_algo->setscl(cb_data, 0);
+ udelay(quarter_cycle);
+ }
+
+ /* Emit STOP */
+ bit_algo->setsda(cb_data, 0);
+ udelay(quarter_cycle);
+ bit_algo->setscl(cb_data, 1);
+ udelay(half_cycle);
+ bit_algo->setsda(cb_data, 1);
+
+ /* Idle bus */
+ udelay(half_cycle);
+
+ /* Emit START */
+ bit_algo->setsda(cb_data, 0);
+ udelay(half_cycle);
+ bit_algo->setscl(cb_data, 0);
+
+ /* Emit STOP */
+ udelay(half_cycle);
+ bit_algo->setscl(cb_data, 1);
+ udelay(half_cycle);
+ bit_algo->setsda(cb_data, 1);
+
+ return !(bit_algo->getsda(cb_data) && bit_algo->getscl(cb_data));
+}
+
+static int cx18_i2c_normalize_bus(struct cx18_i2c_algo_callback_data *cb_data,
+ struct i2c_algo_bit_data *bit_algo)
+{
+ int i, quarter_cycle, half_cycle;
+
+ half_cycle = bit_algo->udelay;
+ quarter_cycle = (half_cycle + 1)/2;
+
+ /* Hopefully raise the lines */
+ bit_algo->setsda(cb_data, 1);
+ bit_algo->setscl(cb_data, 1);
+
+ /* blindly clocking 10 don't care bits without emitting a START */
+ udelay(half_cycle);
+ bit_algo->setscl(cb_data, 0);
+ for (i = 0; i < 10; i++)
+ {
+ udelay(half_cycle);
+ bit_algo->setscl(cb_data, 1);
+ udelay(half_cycle);
+ bit_algo->setscl(cb_data, 0);
+ }
+ udelay(quarter_cycle);
+
+ /* Emit STOP */
+ bit_algo->setsda(cb_data, 0);
+ udelay(quarter_cycle);
+ bit_algo->setscl(cb_data, 1);
+ udelay(half_cycle);
+ bit_algo->setsda(cb_data, 1);
+
+ /* Idle bus */
+ udelay(half_cycle);
+
+ return !(bit_algo->getsda(cb_data) && bit_algo->getscl(cb_data));
+}
+
int cx18_call_i2c_client(struct cx18 *cx, int addr, unsigned cmd, void *arg)
{
struct i2c_client *client;
@@ -415,12 +524,16 @@ int init_cx18_i2c(struct cx18 *cx)
write_reg_sync(0x00c00000, 0xc730c4); /* Clear any stale intrs */
write_reg_sync(0x00021c0f & ~4, CX18_REG_I2C_1_WR); /* Hw I2C1 Clock Freq ~100kHz */
- cx18_setscl(&cx->i2c_algo_cb_data[0], 1);
- cx18_setsda(&cx->i2c_algo_cb_data[0], 1);
+ if (cx18_i2c_normalize_bus(&cx->i2c_algo_cb_data[0], &cx->i2c_algo[0]))
+ CX18_DEBUG_WARN("failed to normalize first i2c bus\n");
+ if (cx18_i2c_reset_slaves(&cx->i2c_algo_cb_data[0], &cx->i2c_algo[0]))
+ CX18_DEBUG_WARN("couldn't reset slaves on first i2c bus\n");
write_reg_sync(0x00021c0f & ~4, CX18_REG_I2C_2_WR); /* Hw I2C2 Clock Freq ~100kHz */
- cx18_setscl(&cx->i2c_algo_cb_data[1], 1);
- cx18_setsda(&cx->i2c_algo_cb_data[1], 1);
+ if (cx18_i2c_normalize_bus(&cx->i2c_algo_cb_data[1], &cx->i2c_algo[1]))
+ CX18_DEBUG_WARN("failed to normalize second i2c bus\n");
+ if (cx18_i2c_reset_slaves(&cx->i2c_algo_cb_data[1], &cx->i2c_algo[1]))
+ CX18_DEBUG_WARN("couldn't reset slaves on second i2c bus\n");
return i2c_bit_add_bus(&cx->i2c_adap[0]) || i2c_bit_add_bus(&cx->i2c_adap[1]);
}
_______________________________________________
ivtv-users mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-users