Re: [PATCH] make the registers of the stv0297 visible for other applications (e.g. i2cdump)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Stezenbach wrote:
> On Sat, May 19, 2007, Trent Piepho wrote:
>> I've written a patch that implements I2C_M_STOP.  It would be used like this:
>>
>> char buf1[2] = {0x0b,0x3c}, buf2[1];
>> struct i2c_msg msgs[2] = {
>> 	{ .addr = 0x61, .buf = buf1, .len = 2, .flags = I2C_M_STOP },
>> 	{ .addr = 0x61, .buf = buf2, .len = 1, .flags = I2C_M_RD } };
>> i2c_transfer(adap, msgs, 2);
> 
> That's what I had in mind. Thanks for writing the patch!


Hmm .. that brings to another interesting thought. Most bridge devices
implement 2 transfer types.

* Page mode transfers
* Byte mode transfers

Currently "Linux I2C core" implements only Page mode transfers, not byte
mode. Byte mode is just ignored in favor of page mode, since when
length=1, page mode is naturally used but with length=1, which makes it
page mode operation but not byte mode itself.

Rather than having a flag which defines the STOP bit, to handle the
atomicity to control the page transfer to use it similar to a byte mode,
why not natively implement a call directly to byte mode ?

On many devices byte mode is handled in a more efficient way. In such a
case a flag can be used to choose between the transfer mode chosen, ie,
page mode vs byte mode.

What do you think ?


_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux