procedure to add new i2c platform driver

cancel
Showing results for 
Search instead for 
Did you mean: 

procedure to add new i2c platform driver

Jump to solution
2,582 Views
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

1 Solution
881 Views
igorpadykov
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

4 Replies
882 Views
igorpadykov
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

881 Views
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 Kudos
881 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Lavakumar

please check common linux documentation like

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

Best regards
igor

0 Kudos
881 Views
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 Kudos