From: "Jean Delvare" <khali@linux-fr.org>
To: fishor@gmx.net
Cc: "LKML" <linux-kernel@vger.kernel.org>
Subject: Re: clean up and warnings patch for 2.6.12-rc4-mm1 i2c-chip
Date: Tue, 17 May 2005 09:41:55 +0200 (CEST) [thread overview]
Message-ID: <ozwFbjSm.1116315715.7725280.khali@localhost> (raw)
In-Reply-To: <200505170841.20079.fishor@gmx.net>
Hi Alexey,
> with module w83627hf i found useful due detection return -ENODEV
> because I can see in commandline if it's some thing wrong. If it's not
> correct, there is a bug in the w83627hf and some other drivers.
>
> int w83627hf_detect(struct i2c_adapter *adapter, int address,
> int kind)
> {
> int val;
> struct i2c_client *new_client;
> struct w83627hf_data *data;
> int err = 0;
> const char *client_name = "";
>
> if (!i2c_is_isa_adapter(adapter)) {
> err = -ENODEV;
> goto ERROR0;
> }
This is actually not correct if you consider the i2c_detect() design, but
happens to cause no problem in this specific case - and, ironically,
might even speed up the detection loop.
The way i2c_detect() works for now, it will stop probing a given adapter
as soon as one address probed on that bus returned an error. As it
happens that i2c_is_isa_adapter(adapter) is either true or false for all
addresses of a given adapter, skipping to the next adapter directly when
the bus type (isa or not) doesn't match actually makes sense.
At any rate, I have plans to rework the way ISA hardware monitoring chips
are handled, so this code is likely to be gone in a near future anyway
(providing I can actually find the time to work on this... sigh). Things
should be much clearer after that.
Thanks,
--
Jean Delvare
next prev parent reply other threads:[~2005-05-17 7:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-15 22:14 clean up and warnings patch for 2.6.12-rc4-mm1 i2c-chip Alexey Fisher
2005-05-16 17:19 ` Jean Delvare
2005-05-17 6:41 ` Alexey Fisher
2005-05-17 7:41 ` Jean Delvare [this message]
[not found] <44zCV-1kI-17@gated-at.bofh.it>
2005-05-16 9:39 ` Daniel Paschka
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=ozwFbjSm.1116315715.7725280.khali@localhost \
--to=khali@linux-fr.org \
--cc=fishor@gmx.net \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.