procedure to add new i2c platform driver

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

procedure to add new i2c platform driver

ソリューションへジャンプ
4,300件の閲覧回数
lavakumars
Contributor IV

hi ,

i am working on imx6qp sabre AI board . and yocto build with krenel version :4.1.15.

Now i integrated a new i2c device on i2c-2 bus. and also the device is detected (used i2cdetect tool) on bus "1" and address found to be 11.

And now i have written a i2c platform driver which can probe and communicate with the user space with "ioctl" call.

Please let me know how to register the device with its address. and build the driver code on board. please help.

Note: i tried to add device using "i2c_register_board_info()" in /arch/arm/mach-imx/mach-cpuimx35.c but did not work.

i.e : Driver did not probe device. and did load. can only see it at /sys/bus/i2c/drivers/"registered name" :smileysad:

Regards,

Lavakumar S

ラベル(5)
1 解決策
2,599件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Lavakumar

for developing new i2c device driver one can use example

in sect.7.3 Using the I2C Interface attached Porting Guide.

For building image please use Yocto Guide.

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

元の投稿で解決策を見る

4 返答(返信)
2,600件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Lavakumar

for developing new i2c device driver one can use example

in sect.7.3 Using the I2C Interface attached Porting Guide.

For building image please use Yocto Guide.

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

2,599件の閲覧回数
lavakumars
Contributor IV

hi igorpadykov,

Can you please tell me which source should i use to "register my i2c device board info".? in imx6qp sabreauto board yocto build

using "i2c_register_board_info"

Regards,

Lavakumar

0 件の賞賛
2,599件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Lavakumar

please check common linux documentation like

https://www.kernel.org/doc/Documentation/i2c/instantiating-devices 

Best regards
igor

0 件の賞賛
2,599件の閲覧回数
lavakumars
Contributor IV

hi igorpadykov,

thanks for your reply.

Actually the issue is with device acknowledgement it gives ack from 2 or third request for the first time.:smileysad: .

Regards,

Lavakumar S

0 件の賞賛