简体   繁体   English

在哪里使用I2C启动Android驱动程序

[英]Where to start Android drivers with I2C

Thanks for taking a moment to read my question. 感谢您抽出时间阅读我的问题。 I am a starving intern and I really want to get some work done! 我是一个挨饿的实习生,我真的很想完成一些工作!

I have a sensor device, OEM, that I will be adding to a dragonboard like this. 我有一个传感器设备OEM,我将像这样将其添加到Dragonboard中。 http://mydragonboard.org/ http://mydragonboard.org/

Unfortunately I have wasted a lot of time researching how to write a driver to interact with my sensor over I2C and I have ended up confused, mostly because none of my resources are consistent with where to put what code. 不幸的是,我浪费了很多时间研究如何编写驱动程序以通过I2C与我的传感器进行交互,最终我感到困惑,主要是因为我的资源都与放置什么代码不一致。 I read a lot of "Embedded Android", "Linux Device Drivers", and "Sensor PortingGuide" (Oreilly, Oreilly, TI) and have not gotten a solid answer on how to GET IT DONE. 我读了很多“嵌入式Android”,“ Linux设备驱动程序”和“ Sensor PortingGuide”(Oreilly,Oreilly,TI),但对于如何完成它并没有一个明确的答案。

My goal is to eventually have this implemented with a HAL and available to the SensorService and Sensor Manager. 我的目标是最终通过HAL来实现此功能,并可供SensorService和Sensor Manager使用。

Thanks ! 谢谢 !

i2c driver does not change much depending on Android or Linux. i2c驱动程序的变化不大,具体取决于Android或Linux。 You can go through a simple already implemented i2c driver in http://lxr.linux.no/ 您可以在http://lxr.linux.no/中浏览一个简单的已经实现的i2c驱动程序

one example : understand implemented driver at lxr: /kernel/drivers/input/misc/* 一个示例:在lxr上了解实现的驱动程序:/ kernel / drivers / input / misc / *

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM