Re: Class device namespaces

From: Jean Delvare
Date: Tue Apr 28 2009 - 04:09:08 EST


Hi Kay,

On Mon, 27 Apr 2009 23:57:40 +0200, Kay Sievers wrote:
> On Mon, Apr 27, 2009 at 18:00, Jean Delvare <khali@xxxxxxxxxxxx> wrote:
>
> > I'd like to give a try to converting i2c-adapter devices to bus devices
> > rather than class devices, if you think that's how things should be.
> > Can you please explain to me how this would be done?
>
> 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?

--
Jean Delvare
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/