Driver I2C Problems

Source: Internet
Author: User
Driver I2C problems-general Linux technology-Linux technology and application information, the following is a detailed description. I recently learned the i2c device driver. When registering the driver, I need to match the registered device. If the matching succeeds, I will jump to the probe function defined by the driver;
Later, I checked that i2c devices put them in a linked list through the i2c_register_board_info function and register these devices during bus initialization;
What I don't understand here is that I didn't see the connection between the device and the adaper (adapter). How is the connection? Besides, I registered many adaper in the kernel, how do we tell the adapter that our device is connected? I have read the i2c_register_board_info function. There is a parameter that indicates the bus number. Does this bus number correspond to an adaper? When is the I2C device file generated?
In the driver, sometimes a miscellaneous device is registered through the misc_register () function. What is the role of this function?
Also, when looking at drivers written by others, there are two statements: client-> driver = & i2c_ts_driver; i2c_set_clientdata (client, ts); the i2c device has been registered, I don't understand what these two commands mean?
I am a newbie. Could you please give me some advice?
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.