2010-03-30 06:32:37     Read i2c API query

Document created by Aaronwu Employee on Aug 21, 2013
Version 1Show Document
  • View in full screen mode

2010-03-30 06:32:37     Read i2c API query

Appalayagari Sreedhar (INDIA)

Message: 87851   

 

Hi,

 

I am working with BF527 based custom board Linux-2.6.28.10-ADI-2009R1 kernel.

 

One of my serial interface device has the write and read protocl as shown below.

 

S   Addr Rd/W   A   Data1   A   Data2  A   P

 

For write operation write(i2c-fd,.......) can be used or i2c_smbus_write_byte_data or i2c_master_send can be used.

 

but for the read operation which api can be used?

 

there is Ack before the stop condition.

 

please suggest.

 

Thank you.

QuoteReplyEditDelete

 

 

2010-03-30 15:14:24     Re: Read i2c API query

Robin Getz (UNITED STATES)

Message: 87865   

 

Appalayagari:

 

There are lots of I2C examples around

 

  docs.blackfin.uclinux.org/doku.php?id=i2c#linux_userspace_framework

 

-Robin

QuoteReplyEditDelete

 

 

2010-03-31 05:24:56     Re: Read i2c API query

Appalayagari Sreedhar (INDIA)

Message: 87910   

 

Dear Robin,

 

I verified this link and studied the smbus-protocl and i2c-protocol etc docs, but i could not find the exact api for read.

 

can you please help.

 

Thank you.

QuoteReplyEditDelete

 

 

2010-03-31 13:53:49     Re: Read i2c API query

Robin Getz (UNITED STATES)

Message: 87931   

 

Appalyagari:

 

Then you didn't read hard enough.

 

It is there. I can't read it for you.

 

Goto : linux-2.6.x/Documentation/i2c  - then type "grep read * -l" - then read those docs.

Attachments

    Outcomes