lkml.org 
[lkml]   [2011]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCHv2 1/4] drivers/otp: add initial support for OTP memory
On Fri, Mar 25, 2011 at 11:01:56PM +0100, Arnd Bergmann wrote:
> On Friday 25 March 2011 22:12:46 Greg KH wrote:
> > > Why is this a bus? You don't have any device matching code or similar,
> > > and the devices typically are on an existing bus_type (e.g. platform_bus).
> > > I think it would make more sense to do this as a class.
> >
> > No, for new things, we want to use busses instead of classes please.
> > Especially as this does create devices, which are best put on a bus
> > somewhere.
>
> I don't understand. Isn't that rather inconsistent?
>
> I realize the same thing came up with the IIO subsystem, where I also
> didn't understand it.
>
> In my mental model of Linux drivers, a bus is something that physically
> connects devices and the bus code matches devices with drivers, while a
> class groups logical devices that get created by the driver itself.

Yes, that is how it used to be, but then it turns out that both of them
are really just "subsystems" as far as it all goes. They are just ways
that devices are bound to drivers in a logical manner. We have patches
floating around that get rid of both busses and classes to merge them
together, which is the end goal here. I know Kay has posted detailed
reasons for why this all is on lkml in the past, and had working code
about 5 years ago, it's just been slow going...

So we recommend all new subsystems use the bus code, it's simple and
works well.

thanks,

greg k-h


\
 
 \ /
  Last update: 2011-03-26 00:33    [W:0.066 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site