lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090429141901.4b8ff47b@hyperion.delvare>
Date:	Wed, 29 Apr 2009 14:19:01 +0200
From:	Jean Delvare <khali@...ux-fr.org>
To:	Kay Sievers <kay.sievers@...y.org>
Cc:	Michael E Brown <Michael_E_Brown@...l.com>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	linux-kernel@...r.kernel.org,
	Mauro Carvalho Chehab <mchehab@...radead.org>,
	Matt Domsch <Matt_Domsch@...l.com>
Subject: Re: Class device namespaces

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@...ux-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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ