[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181206140750.GB18947@kroah.com>
Date: Thu, 6 Dec 2018 15:07:50 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Sven Van Asbroeck <thesven73@...il.com>
Cc: Sven Van Asbroeck <svendev@...x.com>, robh+dt@...nel.org,
Linus Walleij <linus.walleij@...aro.org>,
Lee Jones <lee.jones@...aro.org>, mark.rutland@....com,
Andreas Färber <afaerber@...e.de>,
treding@...dia.com, David Lechner <david@...hnology.com>,
noralf@...nnes.org, johan@...nel.org,
Michal Simek <monstr@...str.eu>, michal.vokac@...ft.com,
Arnd Bergmann <arnd@...db.de>, john.garry@...wei.com,
geert+renesas@...der.be, robin.murphy@....com,
paul.gortmaker@...driver.com,
sebastien.bourdelin@...oirfairelinux.com, icenowy@...c.io,
Stuart Yoder <stuyoder@...il.com>, maxime.ripard@...tlin.com,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
devicetree <devicetree@...r.kernel.org>
Subject: Re: [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 <gregkh@...uxfoundation.org> 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
class?
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...
thanks,
greg k-h
Powered by blists - more mailing lists