I2C写应答查询Linux内核 [英] I2C write acknowledge polling in Linux Kernel
问题描述
乏善可陈响应这里让我不知道<一个href=\"http://stackoverflow.com/questions/1255307/what-are-the-consequences-of-calling-write-with-zero-length\">this.
The lackluster response here made me wonder this.
我一直背负着设备<一href=\"http://www.analog.com/en/digital-to-analog-converters/digital-potentiometers/AD5253/products/product.html\"相对=nofollow>(ANALOG DEVICES 525X)了(从数据表,第16页):
I've been saddled with a device (Analog Devices 525x) that (from the data sheet, pg 16):
内部的[EEPROM]中禁用I2C接口写周期。
disables the I2C interface during the internal [EEPROM] write cycle.
这似乎不公平,如我下车沙发上了,所以因为我让的RIP在座垫的不使用它一段时间。老实说,那为什么要我的问题?
That doesn't seem fair, as in "I'm getting off the couch now, so don't use it for a while because I let one rip in the seat cushion". Honestly, why should that be my problem?
总之,数据表显示,应答查询的答案 - 输入Linux内核... 做Linux的GPIO位撞坏I2C驱动这样做提供了一种机制本质与发送地址?写入位设置,并保持这样做,直到出现一个ACK。
Anyway, the data sheet suggests that acknowledge polling is the answer - enter the Linux kernel... does the Linux GPIO bit bashed I2C driver provide a mechanism for doing this? Essentially send a address with the write bit set and keep doing so until an ACK appears.
我使用2.6.14与回一个ARM移植GPIO位扑驱动程序(从2.6.19我认为)。
I'm using 2.6.14 on an ARM with back ported GPIO bit bashing driver (from 2.6.19 I think).
推荐答案
它似乎没有太现成的,但
It doesn't seem too off the shelf, but
您可能需要看看有像国旗I2C_M_NOSTART协议修改标志
唯一不同的,在你的补丁。
至少有一个办法做到这一点(当然一个混乱的方式)
You probably will need to look at having a protocol modification flag like Flag I2C_M_NOSTART only different, in your patches. At least there is a way to do it (admittedly a messy way)
我希望为你着想,你并不需要把一个正常的I2C器件在同一总线上。
I hope for your sake you don't need to put a normal i2c device on the same bus.
老实说,硬件厂商做的东西像这一切的时候。他们考虑问题解决,只要它成为你的了。
Honestly, hardware vendors do stuff like this all the time. They consider the problem "solved" as long as it becomes yours.
我看到很多碎I2C在那里,你可以让生活其他人更好。
I see lots of broken I2C out there and you could make life nicer for other people.
这篇关于I2C写应答查询Linux内核的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!