>Most serial drivers do this, see drivers/tty/serial for a 
>number of examples, or drivers/serial on older kernels.

Thanks, will check it.

>That would depend on your hardware. The only important part is 
>that you make sure you can send out data at any time. If 
>i2c_master_send() causes accesses to your buffer after 
>returning, there has to be an i2c method of making sure that 
>it has completed.
>
>If the usleep_range is trying to synchronize between the NFC 
>and the I2C chip, you must wait for a notication from the NFC 
>hardware that it's done.

No, it's simply there as I have been faceing i2c write error while I do two 
consecutive writes.
The second fails now and then. That's seems to be a chip issue. I will try to 
investigate this issue.

>> What's more, I guess the i2c_master_send  is a synchronous call and 
>> when it returnes we know it flushed data. Right?
>
>If i2c_master_send is synchronous, you might not need the 
>usleep_range() at all. Removing that call would be entirely reasonable.

Will see how to approach that.

/Waldek--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to