San*_*San 13 i2c linux-device-driver linux-kernel
我知道I2C在一个非常基本的层面,它依赖于Linux内核,但没有线索来实现一个基本的I2C驱动程序.
尝试在I2C 设备驱动程序中启动.你有没有可以建议任何有源代码映射的初学者教程!
Ahm*_*sud 32
linux-source/Documentation/i2c /有很多你需要的信息..../writing-clients.txt是一个很好的起点.
看看在线版:
https://www.kernel.org/doc/Documentation/i2c/writing-clients
有一个很好的教程:
http://renjucnair.blogspot.ca/2012/01/writing-i2c-client-driver.html
这是对有人写一个i2c驱动程序的一个很好的评论,并有一个教程的感觉:
http://www.embedded-bits.co.uk/2009/i2c-in-the-2632-linux-kernel/
以下是一些示例代码:
http://code.google.com/p/ldd-templates/source/browse/drivers/i2c/sample-i2c-client.c
I2C驱动程序在Linux内核中作为平台驱动程序实现。因此首先需要了解平台设备的Linux模型。
请浏览以下 Linux 内核下平台设备的文档: https://www.kernel.org/doc/Documentation/driver-model/platform.txt
您还需要了解linux内核下的总线结构。请参考以下链接: http: //www.mjmwired.net/kernel/Documentation/driver-model/bus.txt
现在你可以google一下I2C驱动并进一步研究。
| 归档时间: |
|
| 查看次数: |
45915 次 |
| 最近记录: |