Linux内核中的I2C写确认轮询 [英] I2C write acknowledge polling in Linux Kernel

查看:25
本文介绍了Linux内核中的I2C写确认轮询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里平淡的回应让我想知道这个.

The lackluster response here made me wonder this.

我已经背负了一个设备 (模拟设备 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.

这似乎不公平,例如我现在要离开沙发,所以暂时不要使用它,因为我让座垫撕裂了".老实说,为什么这是我的问题?

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 bit bashed 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.

我在带有反向移植 GPIO 位攻击驱动程序的 ARM 上使用 2.6.14(我认为是 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

您可能需要查看协议修改标志,例如 Flag 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.

这篇关于Linux内核中的I2C写确认轮询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆