From: Jean Delvare <khali@linux-fr.org>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: Michael E Brown <Michael_E_Brown@dell.com>,
Greg Kroah-Hartman <gregkh@suse.de>,
linux-kernel@vger.kernel.org,
Mauro Carvalho Chehab <mchehab@infradead.org>,
Matt Domsch <Matt_Domsch@dell.com>
Subject: Re: Class device namespaces
Date: Wed, 29 Apr 2009 14:19:01 +0200 [thread overview]
Message-ID: <20090429141901.4b8ff47b@hyperion.delvare> (raw)
In-Reply-To: <ac3eb2510904280536k656fad91neb0383f77bfb8ee7@mail.gmail.com>
Hi Kay,
On Tue, 28 Apr 2009 14:36:27 +0200, Kay Sievers wrote:
> On Tue, Apr 28, 2009 at 10:08, Jean Delvare <khali@linux-fr.org> wrote:
> > On Mon, 27 Apr 2009 23:57:40 +0200, Kay Sievers wrote:
>
> >> Register a "i2c" bus_type with the core, and instead of assigning
> >> dev.class = class, you assign dev.bus = bus to the devices you
> >> register, that should work, if there is nothing more complicated going
> >> on in the background.
> >
> > Err, I'm confused. We _already_ have an "i2c" bus type, and we already
> > assign dev.bus = &i2c_bus_type, but for i2c devices (or slaves if you
> > prefer), not adapters (masters). Doing the same for adapters (the
> > parents) and devices (the children) looks totally wrong to me.
> >
> > Are you really certain that i2c-adapters should be bus devices rather
> > than class devices?
>
> i2c seem to do things nothing else is doing, so I can not really be
> certain. :) But I still think it would be nice to do that, if the
> adapters have child devices.
>
> It is unusual to stack class devices of different classes. The common
> model would be to put the adapters, and all other possible device
> types to the already existing "i2c" bus, and distinguish them by name,
> and internally by "struct device_type" if needed.
>
> Like USB puts usb-interface, usb-device, root-hub under the "usb"
> bus_type, or SCSI puts host, target, lun under the "scsi" bus. All
> these different devices build the tree of the core devices of a
> specific subsystem.
>
> Any possible class devices would only be leaves in these trees, which
> do not have any interconnection between the individual class devices.
OK, I see the idea. I may give it a try, but I'd rather get rid of the
legacy i2c binding model first. One subsystem-wide cleanup at a time ;)
Thanks for the clarification!
--
Jean Delvare
next prev parent reply other threads:[~2009-04-29 12:19 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-29 15:48 Class device namespaces Jean Delvare
2009-03-29 16:36 ` Kay Sievers
2009-03-30 8:49 ` Jean Delvare
2009-03-30 11:24 ` Kay Sievers
2009-04-26 6:54 ` Jean Delvare
2009-04-26 12:44 ` Matt Domsch
2009-04-26 13:01 ` Matt Domsch
2009-04-27 15:30 ` Jean Delvare
2009-04-27 17:30 ` Matt Domsch
2009-04-26 13:42 ` Kay Sievers
2009-04-27 16:00 ` Jean Delvare
2009-04-27 21:57 ` Kay Sievers
2009-04-28 8:08 ` Jean Delvare
2009-04-28 12:36 ` Kay Sievers
2009-04-29 12:19 ` Jean Delvare [this message]
2009-04-27 13:20 ` Michael E Brown
2009-04-27 15:27 ` Jean Delvare
2009-04-27 17:23 ` Michael Brown
2009-04-28 8:10 ` Jean Delvare
2009-04-28 17:39 ` Doug Warzecha
2009-04-28 17:46 ` Kay Sievers
2009-04-28 21:58 ` Doug Warzecha
2009-04-29 1:42 ` Kay Sievers
2009-04-29 3:19 ` Michael Brown
2009-04-29 10:30 ` Kay Sievers
2009-04-29 17:00 ` Michael Brown
2009-04-29 19:10 ` Kay Sievers
2009-04-29 21:28 ` Michael Brown
2009-04-29 21:53 ` Kay Sievers
2009-04-30 15:18 ` David Dillow
2009-04-30 16:34 ` Kay Sievers
2009-04-28 19:06 ` Jean Delvare
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=20090429141901.4b8ff47b@hyperion.delvare \
--to=khali@linux-fr.org \
--cc=Matt_Domsch@dell.com \
--cc=Michael_E_Brown@dell.com \
--cc=gregkh@suse.de \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@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