From: "Richard Röjfors" <richard.rojfors.lists-gfIc91nka+FZroRs9YW3xA@public.gmane.org>
To: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Cc: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Registering I2C devices on X86
Date: Wed, 02 Jun 2010 13:29:36 +0200 [thread overview]
Message-ID: <4C0640A0.9070103@pelagicore.com> (raw)
In-Reply-To: <20100602130408.1e732a0a-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
Hi,
Thanks for quick feedback!
On 06/02/2010 01:04 PM, Jean Delvare wrote:
> On Wed, 2 Jun 2010 12:36:50 +0200, Wolfram Sang wrote:
>>> Any ideas or suggestions?
>>
>> Do it in userspace, or is this too late?
>
> The user-space interface only works for simple cases: you can't pass
> platform data or irq numbers. If someone needs to do this, we need an
> extended interface, probably using configfs.
Yeah I think it's a common case to provide platform data and interrupt numbers. At least I see the
need for it on our platforms.
>
>> Documentation/i2c/instantiating-devices lists all options you have.
>
> Richard, look at drivers/i2c/busses/i2c-i801.c, function i801_probe():
> you'll see an example of per-platform I2C device instantiation on x86.
> I'm not claiming it is elegant, but it works.
The "problem" I see is that the CPU and the chipset + I2C chip will be populated on several
different boards. It would mean that the I2C bus driver would need knowledge of all the boards where
it is used. And the bus driver itself can not really detect which board it's running on.
That is why I kept the I2C device setup in a separate driver. So each board would have a separate
"setup" driver. Isn't that the most clean solution right now?
Thanks
--Richard
next prev parent reply other threads:[~2010-06-02 11:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-02 10:12 Registering I2C devices on X86 Richard Röjfors
[not found] ` <4C062E70.3090409-gfIc91nka+FZroRs9YW3xA@public.gmane.org>
2010-06-02 10:36 ` Wolfram Sang
[not found] ` <20100602103650.GA4876-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-06-02 11:04 ` Jean Delvare
[not found] ` <20100602130408.1e732a0a-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2010-06-02 11:29 ` Richard Röjfors [this message]
[not found] ` <4C0640A0.9070103-gfIc91nka+FZroRs9YW3xA@public.gmane.org>
2010-06-03 6:21 ` Jean Delvare
[not found] ` <20100603082103.4bdccd85-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2010-06-03 12:39 ` Richard Röjfors
[not found] ` <4C07A26C.3070708-gfIc91nka+FZroRs9YW3xA@public.gmane.org>
2010-06-20 8:34 ` Jean Delvare
2010-06-14 7:26 ` Ben Dooks
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=4C0640A0.9070103@pelagicore.com \
--to=richard.rojfors.lists-gfic91nka+fzrors9yw3xa@public.gmane.org \
--cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.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).