AnsweredAssumed Answered

imx6 how to use i2c in u-boot

Question asked by Rudolph Hsueh on Jan 14, 2016
Latest reply on Jan 14, 2016 by igorpadykov

Hi all,

    Recently, I want to tried to do i2c access in u-boot cycle. I noticed that i2c.h has a i2c_set_bus_num and i2c_get_bus_num function.


In my opinion, I have to select which one i2c bus I want to access. And that I cant give a i2c_read/i2c_write function work.


I tried to include i2c.h and used i2c_set_bus_num/i2c_read/_i2c_write, but it told me i2c_set_bus_num/i2c_get_bus_num undeclared.


I'm sure that function was implemented, but it still tell me undeclared. So I used SouceInsight to trace these functions.


i2c_set_bus_num and i2c_get_bus_num are implemented in other file which was not include during compile.


Is there any patch or any method I can easy to use i2c access? Please tell me some directions. Thank you.