From: Peter Rosin <peda@axentia.se>
To: linux-kernel@vger.kernel.org
Cc: Peter Rosin <peda@axentia.se>, Jonathan Corbet <corbet@lwn.net>,
linux-doc@vger.kernel.org
Subject: [PATCH v2 1/2] mux: core: add a brief overview of the subsystem
Date: Tue, 12 Dec 2017 09:46:32 +0100 [thread overview]
Message-ID: <20171212084633.532-2-peda@axentia.se> (raw)
In-Reply-To: <20171212084633.532-1-peda@axentia.se>
Preparation for adding the mux subsystem to the driver-api documenation.
Signed-off-by: Peter Rosin <peda@axentia.se>
---
drivers/mux/core.c | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/drivers/mux/core.c b/drivers/mux/core.c
index d1271c1ee23c..ccb5479f8a39 100644
--- a/drivers/mux/core.c
+++ b/drivers/mux/core.c
@@ -7,6 +7,43 @@
* Author: Peter Rosin <peda@axentia.se>
*/
+/**
+ * DOC: overview
+ *
+ * The multiplexer subsystem uses the following naming:
+ *
+ * - Multiplexer controller: the piece of hardware that changes the
+ * state of a hardware multiplexer (or indeed, several parallel
+ * multiplexers).
+ *
+ * - Multiplexer chip: a collection of multiplexer controllers, in a chip.
+ *
+ * - Multiplexer driver: the device driver that interacts with and handles the
+ * above hardware. The driver has structures representing a mux chip and mux
+ * controllers.
+ *
+ * - Multiplexer consumer: the driver that needs to manipulate the hardware
+ * multiplexer.
+ *
+ * The mux subsystem provides a framework for multiplexer drivers that can
+ * be used by other consumer drivers. It has two primary purposes.
+ *
+ * First, when a consumer driver can be used with one of several multiplexers,
+ * depending on hardware configuration, the actual multiplexer is abstracted
+ * away in the mux drivers. The multiplexer consumer driver can be neater
+ * this way.
+ *
+ * Second, when two consumers -- possibly from different subsystems -- compete
+ * for the same mux controller, i.e. when one mux controller muxes more than
+ * one signal, the mux framework provides locking.
+ *
+ * If the mux driver is so special that it will only ever have a single
+ * consumer, and that consumer can really only work with that one mux driver,
+ * the mux framework is not really providing much benefit. It might be a better
+ * idea to simply manipulate the mux hardware directly from the consumer
+ * driver.
+ */
+
#define pr_fmt(fmt) "mux-core: " fmt
#include <linux/device.h>
--
2.11.0
next prev parent reply other threads:[~2017-12-12 8:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-12 8:46 [PATCH v2 0/2] mux: add overview and add to driver-api docs Peter Rosin
2017-12-12 8:46 ` Peter Rosin [this message]
2017-12-12 8:46 ` [PATCH v2 2/2] docs: add mux docs to the " Peter Rosin
2017-12-21 21:35 ` [PATCH v2 0/2] mux: add overview and add to " Jonathan Corbet
2017-12-21 22:11 ` Peter Rosin
2018-03-03 0:04 ` Peter Rosin
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=20171212084633.532-2-peda@axentia.se \
--to=peda@axentia.se \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®