2009-05-22 11:43:12     twi i2c driver in bf527

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

2009-05-22 11:43:12     twi i2c driver in bf527

Appalayagari Sreedhar (INDIA)

Message: 74453   

 

Hi,

 

I am working with uClinux distribution 2008R1.5, custom board bf527 chip.

 

I have 3   i2c devices connected to the twi interface. I have read this document.

 

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

 

how to get these devices listed in the /dev list. as i2c-0,i2c-1,i2c-3

 

what are the steps i need to follow so that i can control these devices from the user space.

 

Thankyou.

QuoteReplyEditDelete

 

 

2009-05-22 13:51:09     Re: twi i2c driver in bf527

Robin Getz (UNITED STATES)

Message: 74458   

 

Sreedhar:

 

Go back, and read this section:

 

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

 

-Robin

QuoteReplyEditDelete

 

 

2009-05-29 11:43:13     Re: twi i2c driver in bf527

Appalayagari Sreedhar (INDIA)

Message: 74775   

 

Dear Robin,

 

Thankyou very much. I have one doubt.

 

is this i2c-0,i2c-1 etc, 0,1,2,3 etc is for the adapters (Masters) only.

 

In blackfin 527 has twi interface and if we choose GPIO based i2c emulation and if i register twi driver first and GPIO based second.

 

twi gets -> i2c-0

 

GPIO based gets -> i2c-1.

 

slave(client) devices which are connected to i2c-0 can be accessed with i2c-0 node.

 

is my understanding is correct, please correct me if i am wrong.

 

Thanks, Sreedhar

QuoteReplyEditDelete

 

 

2009-05-29 12:24:06     Re: twi i2c driver in bf527

Mike Frysinger (UNITED STATES)

Message: 74777   

 

the order for bus masters is arbitrary

QuoteReplyEditDelete

 

 

2009-05-30 09:22:18     Re: twi i2c driver in bf527

Appalayagari Sreedhar (INDIA)

Message: 74818   

 

Hi Mike,

 

Thankyou very much.

 

Is my understanding corerct that, masters(adaptors) which has got the device node i2c-0.

 

can be opened using the i2c-0 and all the client(slave) devices which are connected to the master (say TWI of BF527) can be accessed using this device node i2c-0.

 

Thankyou.

QuoteReplyEditDelete

 

 

2009-05-30 15:21:41     Re: twi i2c driver in bf527

Mike Frysinger (UNITED STATES)

Message: 74823   

 

if you want to know about the userspace API, then please read the documentation.  this is clearly covered in linux-2.6.x/Documentation/dev-interface.

Attachments

    Outcomes