All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Sven Van Asbroeck <thesven73@gmail.com>,
	svendev@arcx.com, robh+dt@kernel.org, linus.walleij@linaro.org
Cc: lee.jones@linaro.org, mark.rutland@arm.com, afaerber@suse.de,
	treding@nvidia.com, david@lechnology.com, noralf@tronnes.org,
	johan@kernel.org, monstr@monstr.eu, michal.vokac@ysoft.com,
	arnd@arndb.de, gregkh@linuxfoundation.org, john.garry@huawei.com,
	geert+renesas@glider.be, robin.murphy@arm.com,
	paul.gortmaker@windriver.com,
	sebastien.bourdelin@savoirfairelinux.com, icenowy@aosc.io,
	stuyoder@gmail.com, maxime.ripard@bootlin.com,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v5 1/6] fieldbus_dev: add Fieldbus Device subsystem.
Date: Tue, 4 Dec 2018 17:12:02 -0800	[thread overview]
Message-ID: <9f44b8a5-57bf-5dbf-1854-85c732708d02@infradead.org> (raw)
In-Reply-To: <20181204220224.27324-2-TheSven73@googlemail.com>

On 12/4/18 2:02 PM, Sven Van Asbroeck wrote:
> Fieldbus device (client) adapters allow data exchange with a PLC aka.
> "Fieldbus Controller" over a fieldbus (Profinet, FLNet, etc.)
> 
> They are typically used when a Linux device wants to expose itself
> as an actuator, motor, console light, switch, etc. over the fieldbus.
> 
> This framework is designed to provide a generic interface to Fieldbus
> Devices from both the Linux Kernel and the userspace.
> 
> Signed-off-by: Sven Van Asbroeck <TheSven73@googlemail.com>
> ---
> 

> diff --git a/Documentation/fieldbus_dev/fieldbus_dev.txt b/Documentation/fieldbus_dev/fieldbus_dev.txt
> new file mode 100644
> index 000000000000..40ab4de0f019
> --- /dev/null
> +++ b/Documentation/fieldbus_dev/fieldbus_dev.txt
> @@ -0,0 +1,66 @@
> +                       Fieldbus-Device Subsystem
> +               ============================================
> +
> +Part 0 - What is a Fieldbus Device ?
> +------------------------------------
> +
> +Fieldbus is the name of a family of industrial computer network protocols used
> +for real-time distributed control, standardized as IEC 61158.
> +
> +A complex automated industrial system — such as manufacturing assembly line —
> +usually needs a distributed control system—an organized hierarchy of controller

"system-an" looks like a hyphenated word, but it's not.  It would be better
to use either "--" or " - " (as in the line above it).

> +systems—to function. In this hierarchy, there is usually a

Same for "systems-to".

> +Human Machine Interface (HMI) at the top, where an operator can monitor or
> +operate the system. This is typically linked to a middle layer of programmable
> +logic controllers (PLC) via a non-time-critical communications system
> +(e.g. Ethernet). At the bottom of the control chain is the fieldbus that links
> +the PLCs to the components that actually do the work, such as sensors,
> +actuators, electric motors, console lights, switches, valves and contactors.
> +
> +(Source: Wikipedia)
> +
> +A "Fieldbus Device" is such an actuator, motor, console light, switch, ...
> +controlled via the Fieldbus by a PLC aka. "Fieldbus Controller".

a.k.a. or just "aka", but not "aka."

> +
> +Communication between PLC and device typically happens via process data memory,
> +separated into input and output areas. The Fieldbus then cyclically transfers
> +the PLC's output area to the device's input area, and vice versa.
> +
> +Part I - Why do we need this subsystem?
> +---------------------------------------
> +
> +Fieldbus device (client) adapters are commercially available. They allow data
> +exchange with a PLC aka. "Fieldbus Controller" via process data memory.

                       aka

> +
> +They are typically used when a Linux device wants to expose itself as an
> +actuator, motor, console light, switch, etc. over the fieldbus.
> +
> +The purpose of this subsystem is:
> +a) present a general, standardized, extensible API/ABI to userspace; and
> +b) present a convenient interface to drivers.
> +
> +Part II - How can drivers use the subsystem?
> +--------------------------------------------
> +
> +Any driver that wants to register as a Fieldbus Device should allocate and
> +populate a 'struct fieldbus_dev' (from include/linux/fieldbus_dev.h).
> +Registration then happens by calling fieldbus_dev_register().
> +
> +Part III - How can userspace use the subsystem?
> +-----------------------------------------------
> +
> +Fieldbus protocols and adapters are diverse and varied. However, they share
> +a limited few common behaviours and properties. This allows us to define
> +a simple interface consisting of a character device and a set of sysfs files:
> +
> +See:
> +Documentation/ABI/testing/sysfs-class-fieldbus-dev
> +Documentation/ABI/testing/fieldbus-dev-cdev
> +
> +Note that this simple interface does not provide a way to modify adapter
> +configuration settings. It is therefore useful only for adapters that get their
> +configuration settings some other way, e.g. non-volatile memory on the adapter,
> +through the network, ...
> +
> +At a later phase, this simple interface can easily co-exist with a future
> +(netlink-based ?) configuration settings interface.


-- 
~Randy

  parent reply	other threads:[~2018-12-05  1:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-04 22:02 [PATCH v5 0/6] Add Fieldbus subsystem + support HMS Profinet card Sven Van Asbroeck
2018-12-04 22:02 ` [PATCH v5 1/6] fieldbus_dev: add Fieldbus Device subsystem Sven Van Asbroeck
2018-12-05  1:01   ` Randy Dunlap
2018-12-05  1:12   ` Randy Dunlap [this message]
2018-12-05 10:16   ` Greg KH
2018-12-05 15:39     ` Sven Van Asbroeck
2018-12-05 19:17       ` Greg KH
2018-12-05 22:32         ` Sven Van Asbroeck
2018-12-05 22:50           ` Arnd Bergmann
2018-12-05 22:50             ` Arnd Bergmann
2018-12-06 14:07           ` Greg KH
2018-12-06 18:32             ` Sven Van Asbroeck
2018-12-04 22:02 ` [PATCH v5 2/6] anybus-s: support HMS Anybus-S bus Sven Van Asbroeck
2018-12-04 22:02 ` [PATCH v5 3/6] anybus-s: support the Arcx anybus controller Sven Van Asbroeck
2018-12-04 22:02 ` [PATCH v5 4/6] dt-bindings: anybus-controller: document devicetree binding Sven Van Asbroeck
2018-12-07 17:44   ` Rob Herring
2018-12-04 22:02 ` [PATCH v5 5/6] dt-bindings: Add vendor prefix for arcx / Archronix Sven Van Asbroeck
2018-12-04 22:02 ` [PATCH v5 6/6] fieldbus_dev: support HMS Profinet IRT industrial controller Sven Van Asbroeck
2018-12-05  1:03   ` Randy Dunlap
2018-12-06  2:05 ` [PATCH v5 0/6] Add Fieldbus subsystem + support HMS Profinet card David Lechner
2018-12-06 18:32   ` Sven Van Asbroeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9f44b8a5-57bf-5dbf-1854-85c732708d02@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=afaerber@suse.de \
    --cc=arnd@arndb.de \
    --cc=david@lechnology.com \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=icenowy@aosc.io \
    --cc=johan@kernel.org \
    --cc=john.garry@huawei.com \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=michal.vokac@ysoft.com \
    --cc=monstr@monstr.eu \
    --cc=noralf@tronnes.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=robh+dt@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=sebastien.bourdelin@savoirfairelinux.com \
    --cc=stuyoder@gmail.com \
    --cc=svendev@arcx.com \
    --cc=thesven73@gmail.com \
    --cc=treding@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.