I2C has Master and Slave.

Master could be SoC I2C controller.

Slave could be EEPROM, LCD, Audio Codec.

 

So Linux should provide master driver and slave driver. 

Master driver: how to send cmd/data to slave device

Slave driver: how to access slave register, data.

 

borrow a picture from https://blog.csdn.net/wangpengqi/article/details/17711165

 

Linux I2C notes

In this picture, Client is slave, adaptor is master. Then everything is easy to understand.

To add Master/adaptor, you need add it in the device tree based on the SoC spec info.

To add Slave/client, you need add it in the device tree as subnode of master/adaptor node. 

相关文章:

  • 2021-10-18
  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-16
  • 2022-12-23
  • 2021-06-03
猜你喜欢
  • 2021-07-12
  • 2022-12-23
  • 2022-01-19
  • 2022-12-23
  • 2021-06-05
  • 2021-09-06
  • 2021-04-06
相关资源
相似解决方案