On Sun, 20 May 2007, e9hack wrote: > Trent Piepho wrote: > > This would work for stv0297, wouldn't it? > > > > With the attached patch, it works for the stv0297 functions. It doesn't solve the problem, why I've wrote the initial > patch. I need a dump from the registers of the stv0297. I've attach a second patch. stv0297_attach() inserts a wrapper > between i2ctransfer() and the transfer function of the saa7146. The add/del functions for the wrapper are a little bit > dirty. I didn't find a clean way for the add/del function. > > It think your first patch is the way to do it. Most I2C devices use a transaction that looks like: (S=start, P=stop, A=ack) S 0x38 A 0x01 A S 0x39 A 0x42 NA P That would be the transaction that reads the value 0x42 from the register 0x01. But stv0297 is different, it needs an extra stop: S 0x38 A 0x01 A P S 0x39 A 0x42 NA P It seems like the proper solution is to have the I2C master (saa7146) send the i2c_msg[] that it's given. The stv0297 driver should send the correct i2c transaction (the second one), not send the wrong transaction (the first one) and expect the I2C master to special-case hack it into the right one. W.r.t. i2c_dump, the problem is that it's sending the wrong transaction to read an stv0297 register. So the proper solution is to fix i2c_dump to send the correct transaction. Isn't i2c_dump maintained by the same group that does the I2C core? _______________________________________________ linux-dvb mailing list linux-dvb@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb