From: Andreas Oberritter <obi@saftware.de>
To: LM Sensors <sensors@stimpy.netroedge.com>,
LKML <linux-kernel@vger.kernel.org>
Cc: Greg KH <greg@kroah.com>
Subject: Re: [PATCH] possible bug in i2c-algo-bit's inb function
Date: Sun, 27 Feb 2005 22:55:47 +0100 [thread overview]
Message-ID: <1109541347.4948.7.camel@localhost.localdomain> (raw)
In-Reply-To: <20050227195226.23aa5a51.khali@linux-fr.org>
On Sun, 2005-02-27 at 19:52 +0100, Jean Delvare wrote:
> > Here's my I2C code:
> > (...)
>
> Looks sane.
>
> > The bus master is a so called Pluto2 by SCM (part of a DVB-T card sold
> > by Satelco). If this is a hardware bug, is it possible to add a flag
> > to struct i2c_algo_bit_data to workaround this bug?
>
> I would try to find out whether the culprit is setscl or getsda
> (assuming I am correct and either of these actually is the problem).
> Once you know which it is, you could modifiy that function to restore
> the SDA line, that should do the trick.
>
> Hope that helps,
Thank you, using the workaround below makes it possible to use the
bitbanging code without modifications. It tries to detect i2c_inb() and
resets SDA to high after SCL has been set to high and then to low.
static void pluto_setscl(void *data, int state)
{
struct pluto *pluto = data;
if (state)
pluto_rw(pluto, REG_SLCS, SLCS_SCL, SLCS_SCL);
else
pluto_rw(pluto, REG_SLCS, SLCS_SCL, 0);
if ((state) && (pluto->i2cbug == 0)) {
pluto->i2cbug = 1;
} else {
if ((!state) && (pluto->i2cbug == 1))
pluto_setsda(pluto, 1);
pluto->i2cbug = 0;
}
}
Regards,
Andreas
prev parent reply other threads:[~2005-02-27 21:56 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
2005-02-27 18:13 ` Andreas Oberritter
2005-02-27 18:52 ` Jean Delvare
2005-02-27 21:55 ` Andreas Oberritter [this message]
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=1109541347.4948.7.camel@localhost.localdomain \
--to=obi@saftware.de \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--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