imx6 how to use i2c in u-boot

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imx6 how to use i2c in u-boot

2,882件の閲覧回数
rudolphhsueh
Contributor III

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.

ラベル(2)
タグ(3)
0 件の賞賛
返信
1 返信

1,468件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Rudolph

depending on uboot version, one can try : i2c probe, help i2c

patch is described on:

https://community.freescale.com/thread/322813

https://community.freescale.com/thread/337569

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信