Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4849
  • 博文数量: 3
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 35
  • 用 户 组: 普通用户
  • 注册时间: 2021-12-08 15:11
文章分类
文章存档

2021年(3)

我的朋友
最近访客

分类: LINUX

2021-12-11 10:30:43


点击(此处)折叠或打开

  1.                 /********    i2c-s3c2410.c ********/
  2. platform_driver_register(&s3c24xx_i2c_driver);
  3.     .id_table = s3c24xx_driver_ids, ----> .name         = "s3c2410-i2c", <-------
  4.         .probe     = s3c24xx_i2c_probe, ----> i2c_add_numbered_adapter(&i2c->adap)
  5.                  |
  6.                  | i2c-core.c
  7.                  V
  8.      i2c_register_adapter(adap) ---> i2c_scan_static_board_info(adap) --->
  9.         list_for_each_entry(devinfo, &__i2c_board_list, list)
  10.         i2c_new_device(adapter,&devinfo->board_info) ---> device_register(&client->dev)


  11.              /********    mach-mini2440.c ********/
  12. s3c_i2c0_set_platdata(NULL);
  13.     s3c_device_i2c0.dev.platform_data = npd;
  14.     npd->cfg_gpio = s3c_i2c0_cfg_gpio; --->
  15.             s3c2410_gpio_cfgpin(S3C2410_GPE(15), S3C2410_GPE15_IICSDA);
  16.             s3c2410_gpio_cfgpin(S3C2410_GPE(14), S3C2410_GPE14_IICSCL);

  17.     
  18. i2c_register_board_info(0,i2c_devs,ARRAY_SIZE(i2c_devs));---> list_add_tail(&devinfo->list  
  19.                                                      , &__i2c_board_list); --*-->i2c-core.c
  20.     static struct i2c_board_info i2c_devs[ ] __initdata = {                          |
  21.         { I2C_BOARD_INFO("24c08", 0x50), }, <------                                  V
  22.     };                                                         device_register(&client->dev)
  23.     

  24. platform_add_devices(mini2440_devices, ARRAY_SIZE(mini2440_devices))
  25.     platform_device_register(devs[i])
  26.         &s3c_device_i2c0,
  27.          | dev-i2c0.c
  28.          V
  29.         .name         = "s3c2410-i2c", <-------

  30.                 /************* at24.c ************/
  31. i2c_add_driver(&at24_driver); ---> i2c_register_driver(THIS_MODULE, driver);
  32.     static struct i2c_driver at24_driver = {
  33.         .probe = at24_probe,
  34.         .id_table = at24_ids, ---> { "24c08", AT24_DEVICE_MAGIC(8192 / 8, 0) }, <------
  35.     };


阅读(403) | 评论(0) | 转发(0) |
0

上一篇:rtl8188安装与测试 wifi笔记

下一篇:没有了

给主人留下些什么吧!~~