public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: Andreas Oberritter <obi@saftware.de>
Cc: Greg KH <greg@kroah.com>,
	LM Sensors <sensors@stimpy.netroedge.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] possible bug in i2c-algo-bit's inb function
Date: Sun, 27 Feb 2005 10:35:38 +0100	[thread overview]
Message-ID: <20050227103538.218fa1b0.khali@linux-fr.org> (raw)
In-Reply-To: <E1D5GN2-0000Bi-KG@localhost.localdomain>

Hi Adreas,

> while writing a driver for a cardbus card which is supposed to use the
> bit-banging algorithm I noticed that communication with the I2C slave
> (Philips TDA10046) would fail without this patch. It forces SDA to
> high for every bit in i2c_inb() instead of once per byte. Can this
> patch go into the mainline kernel or will this break other drivers? I
> am using Kernel version 2.6.10.

There is no reason why this would be necessary. Once SDA is set high on
the master's side, the client will be controlling it for the rest of the
byte (transferred from client to master). Setting SDA high again on the
master's side for each bit shouldn't have any effet, let alone the
substantial slowdown. If it changes something for you, then either your
implementation of setscl or getsda is broken and does actually change
SDA as a side effect, or what really helps is the additional delay, not
setting SDA high per se. In the former case, check your code. If you
can't figure out what's wrong, post it here and I'll take at look.
What's your bus master BTW? In the latter case, you might simply need to
lower the bus speed (increase udelay).

Thanks,
-- 
Jean Delvare

  reply	other threads:[~2005-02-27  9:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-27  4:49 [PATCH] possible bug in i2c-algo-bit's inb function Andreas Oberritter
2005-02-27  9:35 ` Jean Delvare [this message]
2005-02-27 18:13   ` Andreas Oberritter
2005-02-27 18:52     ` Jean Delvare
2005-02-27 21:55       ` Andreas Oberritter

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=20050227103538.218fa1b0.khali@linux-fr.org \
    --to=khali@linux-fr.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=obi@saftware.de \
    --cc=sensors@stimpy.netroedge.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