From: Dirk Behme <dirk.behme@googlemail.com>
To: tony@atomide.com
Cc: OMAP <Linux-omap-open-source@linux.omap.com>
Subject: Re: 2.6.19 + omap patch on the OSK
Date: Wed, 03 Jan 2007 18:08:54 +0100 [thread overview]
Message-ID: <459BE326.7030903@googlemail.com> (raw)
In-Reply-To: <20070102201156.GA9733@atomide.com>
[-- Attachment #1: Type: text/plain, Size: 582 bytes --]
tony@atomide.com wrote:
> Please try this patch:
>
> http://linux.omap.com/pipermail/linux-omap-open-source/2006-October/008232.html
>
> I'll apply it back to linux-omap tree as now there is a longer term
> solution with David Brownell's I2C patches that should eventually
> solve this problem for mainline kernel also.
Looks like the removal of ~I2C_FUNC_SMBUS_QUICK was missed
while applying it. Update of this in attachment.
-- cut --
ARM: OMAP: Remove ~I2C_FUNC_SMBUS_QUICK to make this hack
working. Beautify #ifdef.
Signed-off-by: Dirk Behme <dirk.behme_at_gmail.com>
[-- Attachment #2: i2c_zero_length_smbus_quick_hack_patch_new.txt --]
[-- Type: text/plain, Size: 1138 bytes --]
Index: linux-osk/drivers/i2c/busses/i2c-omap.c
===================================================================
--- linux-osk.orig/drivers/i2c/busses/i2c-omap.c
+++ linux-osk/drivers/i2c/busses/i2c-omap.c
@@ -36,6 +36,10 @@
#include <asm/io.h>
+/* Hack to enable zero length transfers and smbus quick until clean fix
+ is available */
+#define OMAP_HACK
+
/* timeout waiting for the controller to respond */
#define OMAP_I2C_TIMEOUT (msecs_to_jiffies(1000))
@@ -285,14 +289,16 @@ static int omap_i2c_xfer_msg(struct i2c_
struct i2c_msg *msg, int stop)
{
struct omap_i2c_dev *dev = i2c_get_adapdata(adap);
+#ifdef OMAP_HACK
u8 zero_byte = 0;
+#endif
int r;
u16 w;
dev_dbg(dev->dev, "addr: 0x%04x, len: %d, flags: 0x%x, stop: %d\n",
msg->addr, msg->len, msg->flags, stop);
-#if 0
+#ifndef OMAP_HACK
if (msg->len == 0)
return -EINVAL;
@@ -406,7 +412,11 @@ out:
static u32
omap_i2c_func(struct i2c_adapter *adap)
{
+#ifndef OMAP_HACK
return I2C_FUNC_I2C | (I2C_FUNC_SMBUS_EMUL & ~I2C_FUNC_SMBUS_QUICK);
+#else
+ return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
+#endif
}
static inline void
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2007-01-03 17:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-02 19:56 2.6.19 + omap patch on the OSK Philip Balister
2007-01-02 20:11 ` tony
2007-01-02 21:02 ` Philip Balister
2007-01-03 17:08 ` Dirk Behme [this message]
2007-01-03 17:26 ` Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=459BE326.7030903@googlemail.com \
--to=dirk.behme@googlemail.com \
--cc=Linux-omap-open-source@linux.omap.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox