[lkml]   [2018]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v5 1/6] fieldbus_dev: add Fieldbus Device subsystem.
On Wed, Dec 05, 2018 at 05:32:19PM -0500, Sven Van Asbroeck wrote:
> Thanks :)
> On Wed, Dec 5, 2018 at 2:17 PM Greg KH <> wrote:
> >
> > Great, then call it a 'fieldbus' class, not "fieldbus_dev' class.
> Small nit:
> Hardware connected to a fieldbus comes in two distinct flavours:
> - clients (e.g. thermometer, robotic arm) called "fieldbus devices"
> - servers (e.g. a PLC) called "fieldbus controllers"
> Their userspace APIs will probably differ quite a lot.

But servers are going to be much more rare, and odds are userspace is
not going to need to control anything with them, right?

> The userspace API created by the patch is only for clients a.k.a.
> "fieldbus devices". That's why I'm writing 'fieldbus_dev' all over the place.
> For simplicity, we could change that to just 'fieldbus'. But would this get
> us in trouble when, at some point, we want to add a userspace API for
> servers a.k.a. "fieldbus controllers" ?

Ick, yeah, I guess so, but planning for future events is not something
we do well at all. Are you sure you will need fieldbus controllers as a

And as these are really devices, why not make them a "device" and a bus?
What type of topology do you have on these busses? Are everything
"flat" and connected directly to a PCI/USB/platform device? Or are
there multiple devices attached to a single controller?

It really feels like you want to use 'struct device' and a bus_type and
not a class here to me...


greg k-h

 \ /
  Last update: 2018-12-06 15:08    [W:0.131 / U:16.072 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site