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
已解决! 转到解答。
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!
-----------------------------------------------------------------------------------------------------------------------
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!
-----------------------------------------------------------------------------------------------------------------------
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
Hi Lavakumar
please check common linux documentation like
https://www.kernel.org/doc/Documentation/i2c/instantiating-devices
Best regards
igor
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