UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer jonesyx
Observer
2,760 Views
Registered: ‎07-23-2009

Linux/Xilinx I2C driver layers - Actual bus activity

Hi, Basically im trying to  determine the actual physical bus level activity from a userspace level read and write to the i2c device file.

 

Could anyone please correct me if im wrong or point out anything ive missed.

 

 

From what i understand issuing the command:

(ioctl(dev_i2c, I2C_SLAVE, eepromAddr) < 0)

 

Simply sets the device slave address in the driver and does NO actual bus activity.

 

 

An write (1byte) command on the dev file will call the following functions from top to bottom:

 

file Function ==================================== Userspace write() i2c-dev.c i2cdev_write i2c-core.c i2c_master_send i2c-core.c i2c_transfer i2c-algo-xilinx.c master_xfer xiic_xfer XIic... Xilinx's OS-Independant functions

 


 

and will generate a [start][address+w][offset for reg][1 byte of data][stop]

 

A read (1byte) command on the dev file will generate a [start][address + w][offset for reg][start][address + r][read out 1 byte][stop]

 

 

Is this correct?

 

Many thanks

Michael/

 

0 Kudos