Chinaunix首页 | 论坛 | 博客
  • 博客访问: 465400
  • 博文数量: 100
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 955
  • 用 户 组: 普通用户
  • 注册时间: 2014-11-21 09:30
文章分类

全部博文(100)

文章存档

2017年(1)

2016年(16)

2015年(83)

我的朋友

发布时间:2015-07-02 11:32:23

我们来看看linux 3.10中三星的GPIO寄存器配置方法<br />我们先看看最前面的&nbsp;&nbsp; &nbsp;<br />#define S5PV210_GPA1(_nr)&nbsp;&nbsp; &nbsp;(S5PV210_GPIO_A1_START + (_nr))<br /><br />S5PV210_GPIO_A1_START&nbsp;&nbsp; &nbsp;= S5PV210_GPIO_NEXT(S5PV210_GPIO_A0),<br /><br />因为&nbsp;&nbsp; &nbsp;.........【阅读全文】

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

发布时间:2015-07-02 10:45:16

平台模型分为设备层和驱动层
设备层比较简单,作用只是声明设备资源而已,表示存在这个设备,关键点是一下3个:
resource 结构体,生命设备地址、类型等等,name成员很重要,和设备层的platform_driver中的name匹配
platform_device_register 注册函数
platform_device_unregister 注销函数
.........【阅读全文】

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

发布时间:2015-07-01 01:12:26

1.  分配一个i2c_driver结构体。
2.  设置attach_adapter,设置detach_clien。
attach_adapter调用i2c_probe(),3.0内核:static int i2c_probe(struct ipath_devdata *dd, int devaddr)
detach_client:如果之前发现有设备,那么现在要清除它。......【阅读全文】

阅读(1362) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册