From: ben-linux@fluff.org (Ben Dooks)
To: linux-arm-kernel@lists.infradead.org
Subject: i2c-imx: Autoprobe of eeproms
Date: Sun, 14 Feb 2010 21:18:06 +0000 [thread overview]
Message-ID: <20100214211806.GA30679@trinity.fluff.org> (raw)
In-Reply-To: <4B75D317.7040801@vmlinux.org>
On Fri, Feb 12, 2010 at 11:15:51PM +0100, Mattias Walstrom wrote:
> I have tried to get autoprobe of eeproms to work on a custom freescale
> mx27-board, and i found out that the i2c-imx driver was missing the
> following, is there a reason for this, most other i2c-bus drivers seems
> to have it?
auto-probing of anything on an i2c bus is always going to be trumped
by actually knowing. The limited address space means often different
types of peripherals can end up with similar addresses.
It is highly recommended in the ARM world where the board information is
known from early in the initialisation process that the board registers
the devices it knows to have available so that the i2c core can atatch
the relevant drivers.
I'm not even sure if SPD is the right class to have on this, I think
Jean Delvare has pronounced on this on the linux-i2c list (iirc, it
is for probing DRAM DIMMS).
Even if Jean hasn't nixed this, I would still prefer not to apply this.
PS, this should have been cc'd to the linux-i2c list!
> --- linux-2.6.32.8.orig/drivers/i2c/busses/i2c-imx.c 2010-02-09
> 13:57:19.000000000 +0100
> +++ linux-2.6.32.8/drivers/i2c/busses/i2c-imx.c 2010-02-12
> 11:30:12.000000000 +0100
> @@ -521,6 +521,7 @@
> i2c_imx->adapter.algo = &i2c_imx_algo;
> i2c_imx->adapter.dev.parent = &pdev->dev;
> i2c_imx->adapter.nr = pdev->id;
> + i2c_imx->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
> i2c_imx->irq = irq;
> i2c_imx->base = base;
> i2c_imx->res = res;
>
>
> Best regards
> Mattias Walstr?m
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
prev parent reply other threads:[~2010-02-14 21:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-12 22:15 i2c-imx: Autoprobe of eeproms Mattias Walstrom
2010-02-13 7:28 ` Wolfram Sang
2010-02-13 10:50 ` Uwe Kleine-König
2010-02-14 21:18 ` Ben Dooks [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=20100214211806.GA30679@trinity.fluff.org \
--to=ben-linux@fluff.org \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).