* [PATCH] support I2C_M_NO_RD_ACK in i2c-algo-bit
@ 2004-04-25 18:06 Kevin O'Connor
2004-05-02 5:10 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Kevin O'Connor @ 2004-04-25 18:06 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel
This is a message resend - the original didn't make it to lkml.
Hi Greg,
I have an I2C device (Samsung ks0127 video grabber) with a peculiar i2c
implementation. When reading bytes, it only senses for the stop condition
in the place where the acknowledge bit should be. So, to properly support
this device acks need to be turned off during reads.
There is an I2C_M_NO_RD_ACK bit already defined in i2c.h which appears to
be what I want. Unfortunately it doesn't seem to be used anywhere in the
current tree. At the end of this message is a patch to teach i2c_algo_bit
to honor the bit.
-Kevin
--- gold-2.6/drivers/i2c/algos/i2c-algo-bit.c 2004-04-04 13:56:03.000000000 -0400
+++ linux-2.6.5/drivers/i2c/algos/i2c-algo-bit.c 2004-04-20 00:35:39.103934872 -0400
@@ -381,7 +381,13 @@
break;
}
- if ( count > 1 ) { /* send ack */
+ temp++;
+ count--;
+
+ if (msg->flags & I2C_M_NO_RD_ACK)
+ continue;
+
+ if ( count > 0 ) { /* send ack */
sdalo(adap);
DEBPROTO(printk(" Am "));
} else {
@@ -395,8 +401,6 @@
};
scllo(adap);
sdahi(adap);
- temp++;
- count--;
}
return rdcount;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] support I2C_M_NO_RD_ACK in i2c-algo-bit
2004-04-25 18:06 [PATCH] support I2C_M_NO_RD_ACK in i2c-algo-bit Kevin O'Connor
@ 2004-05-02 5:10 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2004-05-02 5:10 UTC (permalink / raw)
To: Kevin O'Connor; +Cc: linux-kernel
On Sun, Apr 25, 2004 at 02:06:45PM -0400, Kevin O'Connor wrote:
> This is a message resend - the original didn't make it to lkml.
>
> Hi Greg,
>
> I have an I2C device (Samsung ks0127 video grabber) with a peculiar i2c
> implementation. When reading bytes, it only senses for the stop condition
> in the place where the acknowledge bit should be. So, to properly support
> this device acks need to be turned off during reads.
>
> There is an I2C_M_NO_RD_ACK bit already defined in i2c.h which appears to
> be what I want. Unfortunately it doesn't seem to be used anywhere in the
> current tree. At the end of this message is a patch to teach i2c_algo_bit
> to honor the bit.
Applied, thanks.
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-05-02 6:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-25 18:06 [PATCH] support I2C_M_NO_RD_ACK in i2c-algo-bit Kevin O'Connor
2004-05-02 5:10 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®