Linux driver subsystem I2C (6)

Source: Internet
Author: User

6. Conclusion

Based on the rich architecture diagram of the previous analysis

TIPS: I2C Adapter driver is not necessarily based on platform implementation, here is the s3c-i2c as an example.

 

I2c_driver, i2c_client, and i2c_adapter

I2c_driver and i2c_client are one-to-multiple relationships. One i2c_driver can support multiple i2c_clients of the same type. Call the i2c_add_driver function to register the i2c_driver to the I2C bus. Call the i2c_register_board_info function to register the i2c_client to the global linked list _ i2c_board_list. When you call i2c_add_adapter to register the adapter, traverse the _ i2c_board_list linked list, i2c_register_adapter ()-> i2c_scan_static_board_info ()-> i2c_new_device. When i2c_add_driver is called, The i2c_driver is first registered to the I2C bus, and then the I2C
The match function registered by bus is used for matching. If the matching is successful, the probe function registered in I2C bus is called first, and the probe function implemented in i2c_driver is called to complete the corresponding work.

* ******** If any error occurs, please kindly advise ********

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.