From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Michael Lawnick <nospam_lawnick-Mmb7MZpHnFY@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Rodolfo Giometti <giometti-k2GhghHVRtY@public.gmane.org>
Subject: Re: Request for Clarification: old - legacy - new driver model
Date: Fri, 20 Feb 2009 13:53:00 +0100 [thread overview]
Message-ID: <20090220135300.353cd53a@hyperion.delvare> (raw)
In-Reply-To: <gnjplc$hqd$1@ger.gmane.org>
On Thu, 19 Feb 2009 15:17:13 +0100, Michael Lawnick wrote:
> Wolfram Sang said the following:
> > Hi Michael,
> >
> >> Can someone give me explanations/links/msg ids?
> >
> > Documentation/i2c/upgrading-clients
> >
> After re-reading it, I have to state that this document doesn't answer
> the questions behind my original ones (which I wanted to answer myself
> by following helpful links):
> From which kernel version on should the 'new-binding' model work?
It started in kernel 2.6.22. But there were significant changes later
in kernels 2.6.25 and 2.6.26.
> How is attaching of a hot plugged i2c device achieved a) from kernel b)
> from user space.
The I2C bus doesn't support hot-plugging, so I am not sure what you
mean?
> For kernel space init I assume its a call to i2c_new_device(). Here I'm
> wondering where I should get the adapter info from.
Depends. i2c_new_device() is suitable for TV adapters for example. For
embedded boards, you'd rather declare all I2C devices with
i2c_register_board_info() and use fixed I2C bus numbers.
> For user space I'm completely lost (ioctl on /dev/i2cx?).
User-space access through i2c-dev is entirely unchanged.
If you mean creating I2C devices from user-space, the interface for
this doesn't exist yet. I have a simple one in mind, but I can never
find the time to work on it :/
That being said, this can be worked around using the old
I2C_CLIENT_INSMOD macros. These let you pass module parameters forcing
clients at a specific address.
> Our situation: main board is up and running, all drivers loaded.
> Now an extension board will be plugged in. It is detected by
> periodically polling via I2C for MUX. After detection the drivers e.g.
This is totally unsupported. I2C isn't an hot-pluggable bus.
(Not to mention that support for mux chips is currently missing, but at
least this is being worked on and fixable.)
> for temperature an MUX on the secondary board need to be attached to I2C
> subsystem. Instances of both drivers are already running for local
> devices, re-loading is only a bad option.
You shouldn't have to reload any driver.
> Do I really have to read and understand i2c-core.c and i2c-dev.c to find
> out?
i2c-dev most probably doesn't have anything to do with your problem.
What you are missing, as far as I can see, is proper mux support.
Rodolfo Giometti (Cc'd) is working on this, if you want to test his
patches (which I still didn't have the time to look at, sadly.)
--
Jean Delvare
next prev parent reply other threads:[~2009-02-20 12:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-18 12:37 Request for Clarification: old - legacy - new driver model Michael Lawnick
2009-02-18 17:36 ` Wolfram Sang
[not found] ` <20090218173645.GD3049-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-02-19 14:17 ` Michael Lawnick
2009-02-20 12:53 ` Jean Delvare [this message]
[not found] ` <20090220135300.353cd53a-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-02-24 15:09 ` Michael Lawnick
2009-02-25 8:00 ` Jean Delvare
[not found] ` <20090225090002.2c31dbf1-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-02-26 11:09 ` Michael Lawnick
2009-02-26 13:28 ` Jean Delvare
[not found] ` <20090226142854.2b6f72e4-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-02-26 15:16 ` Michael Lawnick
2009-02-27 9:36 ` Michael Lawnick
2009-03-05 14:57 ` Jean Delvare
[not found] ` <20090305155713.46ac1968-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-03-09 14:13 ` Michael Lawnick
2009-03-09 14:38 ` Jean Delvare
[not found] ` <20090309153851.6d92729e-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-03-10 6:45 ` Michael Lawnick
[not found] ` <20090310103609.0d756775@hyperion.delvare>
[not found] ` <20090310114215.181300@gmx.net>
[not found] ` <20090310114215.181300-hi6Y0CQ0nG0@public.gmane.org>
2009-03-10 11:47 ` Michael Lawnick
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=20090220135300.353cd53a@hyperion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
--cc=giometti-k2GhghHVRtY@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=nospam_lawnick-Mmb7MZpHnFY@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