From: William Breathitt Gray <vilhelm.gray@gmail.com> To: jic23@kernel.org Cc: kamel.bouhara@bootlin.com, gwendal@chromium.org, alexandre.belloni@bootlin.com, david@lechnology.com, felipe.balbi@linux.intel.com, fabien.lahoudere@collabora.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, syednwaris@gmail.com, patrick.havelange@essensium.com, fabrice.gasnier@st.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, William Breathitt Gray <vilhelm.gray@gmail.com> Subject: [PATCH 4/4] docs: counter: Document character device interface Date: Wed, 29 Apr 2020 14:11:38 -0400 [thread overview] Message-ID: <639b231a155fee0b1786aafb441f61e8094dcf75.1588176662.git.vilhelm.gray@gmail.com> (raw) In-Reply-To: <cover.1588176662.git.vilhelm.gray@gmail.com> This patch adds high-level documentation about the Counter subsystem character device interface. The 0x3E major number and respective minor number range is reserved for Counter character device interface ioctl calls. Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> --- Documentation/driver-api/generic-counter.rst | 87 ++++++++++++------- .../userspace-api/ioctl/ioctl-number.rst | 1 + 2 files changed, 56 insertions(+), 32 deletions(-) diff --git a/Documentation/driver-api/generic-counter.rst b/Documentation/driver-api/generic-counter.rst index 3ab8125b9c05..959c4074078c 100644 --- a/Documentation/driver-api/generic-counter.rst +++ b/Documentation/driver-api/generic-counter.rst @@ -223,19 +223,6 @@ whether an input line is differential or single-ended) and instead focus on the core idea of what the data and process represent (e.g. position as interpreted from quadrature encoding data). -Userspace Interface -=================== - -Several sysfs attributes are generated by the Generic Counter interface, -and reside under the /sys/bus/counter/devices/counterX directory, where -counterX refers to the respective counter device. Please see -Documentation/ABI/testing/sysfs-bus-counter for detailed -information on each Generic Counter interface sysfs attribute. - -Through these sysfs attributes, programs and scripts may interact with -the Generic Counter paradigm Counts, Signals, and Synapses of respective -counter devices. - Driver API ========== @@ -409,25 +396,32 @@ driver can be exemplified by the following:: | / driver callbacks / | ------------------- | | - +-------+ | + +-------+---------------+ | + | | | + | +-------|-------+ + | | | + V | V + +--------------------+ | +---------------------+ + | Counter sysfs |<-+->| Counter chrdev | + +--------------------+ +---------------------+ + | Translates to the | | Translates to the | + | standard Counter | | standard Counter | + | sysfs output | | character device | + |--------------------| |---------------------+ + | Type: const char * | | Type: unsigned long | + | Value: "42" | | Value: 42 | + +--------------------+ +---------------------+ | | - | +---------------+ - | | - V | - +--------------------+ | - | Counter sysfs |<-+ - +--------------------+ - | Translates to the | - | standard Counter | - | sysfs output | - |--------------------| - | Type: const char * | - | Value: "42" | - +--------------------+ - | - --------------- - / const char * / - --------------- + --------------- ---------------- + / const char * / / unsigned long / + --------------- ---------------- + | | + | V + | +-----------+ + | | ioctl | + | +-----------+ + | \ Count: 42 / + | ----------- | V +--------------------------------------------------+ @@ -436,7 +430,7 @@ driver can be exemplified by the following:: \ Count: "42" / -------------------------------------------------- -There are three primary components involved: +There are four primary components involved: Counter device driver --------------------- @@ -456,3 +450,32 @@ and vice versa. Please refer to the `Documentation/ABI/testing/sysfs-bus-counter` file for a detailed breakdown of the available Generic Counter interface sysfs attributes. + +Counter chrdev +-------------- +Translates counter data to the standard Counter character device; data +is transferred via ioctl calls. + +Sysfs Interface +=============== + +Several sysfs attributes are generated by the Generic Counter interface, +and reside under the `/sys/bus/counter/devices/counterX` directory, +where `X` is to the respective counter device id. Please see +Documentation/ABI/testing/sysfs-bus-counter for detailed information on +each Generic Counter interface sysfs attribute. + +Through these sysfs attributes, programs and scripts may interact with +the Generic Counter paradigm Counts, Signals, and Synapses of respective +counter devices. + +Counter Character Device +======================== + +Counter character device nodes are created under the `/dev` directory as +`counterX`, where `X` is the respective counter device id. Device +information and control is exposed via a set of standard Counter +subsystem ioctl commands. + +.. kernel-doc:: include/uapi/linux/counter.h + :internal: diff --git a/Documentation/userspace-api/ioctl/ioctl-number.rst b/Documentation/userspace-api/ioctl/ioctl-number.rst index f759edafd938..8136a26fb81c 100644 --- a/Documentation/userspace-api/ioctl/ioctl-number.rst +++ b/Documentation/userspace-api/ioctl/ioctl-number.rst @@ -88,6 +88,7 @@ Code Seq# Include File Comments <http://infiniband.sourceforge.net/> 0x20 all drivers/cdrom/cm206.h 0x22 all scsi/sg.h +0x3E 00-1F linux/counter.h <mailto:linux-iio@vger.kernel.org> '!' 00-1F uapi/linux/seccomp.h '#' 00-3F IEEE 1394 Subsystem Block for the entire subsystem -- 2.26.2
WARNING: multiple messages have this Message-ID (diff)
From: William Breathitt Gray <vilhelm.gray@gmail.com> To: jic23@kernel.org Cc: kamel.bouhara@bootlin.com, gwendal@chromium.org, david@lechnology.com, felipe.balbi@linux.intel.com, linux-iio@vger.kernel.org, syednwaris@gmail.com, alexandre.belloni@bootlin.com, linux-kernel@vger.kernel.org, mcoquelin.stm32@gmail.com, patrick.havelange@essensium.com, William Breathitt Gray <vilhelm.gray@gmail.com>, fabrice.gasnier@st.com, fabien.lahoudere@collabora.com, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, alexandre.torgue@st.com Subject: [PATCH 4/4] docs: counter: Document character device interface Date: Wed, 29 Apr 2020 14:11:38 -0400 [thread overview] Message-ID: <639b231a155fee0b1786aafb441f61e8094dcf75.1588176662.git.vilhelm.gray@gmail.com> (raw) In-Reply-To: <cover.1588176662.git.vilhelm.gray@gmail.com> This patch adds high-level documentation about the Counter subsystem character device interface. The 0x3E major number and respective minor number range is reserved for Counter character device interface ioctl calls. Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> --- Documentation/driver-api/generic-counter.rst | 87 ++++++++++++------- .../userspace-api/ioctl/ioctl-number.rst | 1 + 2 files changed, 56 insertions(+), 32 deletions(-) diff --git a/Documentation/driver-api/generic-counter.rst b/Documentation/driver-api/generic-counter.rst index 3ab8125b9c05..959c4074078c 100644 --- a/Documentation/driver-api/generic-counter.rst +++ b/Documentation/driver-api/generic-counter.rst @@ -223,19 +223,6 @@ whether an input line is differential or single-ended) and instead focus on the core idea of what the data and process represent (e.g. position as interpreted from quadrature encoding data). -Userspace Interface -=================== - -Several sysfs attributes are generated by the Generic Counter interface, -and reside under the /sys/bus/counter/devices/counterX directory, where -counterX refers to the respective counter device. Please see -Documentation/ABI/testing/sysfs-bus-counter for detailed -information on each Generic Counter interface sysfs attribute. - -Through these sysfs attributes, programs and scripts may interact with -the Generic Counter paradigm Counts, Signals, and Synapses of respective -counter devices. - Driver API ========== @@ -409,25 +396,32 @@ driver can be exemplified by the following:: | / driver callbacks / | ------------------- | | - +-------+ | + +-------+---------------+ | + | | | + | +-------|-------+ + | | | + V | V + +--------------------+ | +---------------------+ + | Counter sysfs |<-+->| Counter chrdev | + +--------------------+ +---------------------+ + | Translates to the | | Translates to the | + | standard Counter | | standard Counter | + | sysfs output | | character device | + |--------------------| |---------------------+ + | Type: const char * | | Type: unsigned long | + | Value: "42" | | Value: 42 | + +--------------------+ +---------------------+ | | - | +---------------+ - | | - V | - +--------------------+ | - | Counter sysfs |<-+ - +--------------------+ - | Translates to the | - | standard Counter | - | sysfs output | - |--------------------| - | Type: const char * | - | Value: "42" | - +--------------------+ - | - --------------- - / const char * / - --------------- + --------------- ---------------- + / const char * / / unsigned long / + --------------- ---------------- + | | + | V + | +-----------+ + | | ioctl | + | +-----------+ + | \ Count: 42 / + | ----------- | V +--------------------------------------------------+ @@ -436,7 +430,7 @@ driver can be exemplified by the following:: \ Count: "42" / -------------------------------------------------- -There are three primary components involved: +There are four primary components involved: Counter device driver --------------------- @@ -456,3 +450,32 @@ and vice versa. Please refer to the `Documentation/ABI/testing/sysfs-bus-counter` file for a detailed breakdown of the available Generic Counter interface sysfs attributes. + +Counter chrdev +-------------- +Translates counter data to the standard Counter character device; data +is transferred via ioctl calls. + +Sysfs Interface +=============== + +Several sysfs attributes are generated by the Generic Counter interface, +and reside under the `/sys/bus/counter/devices/counterX` directory, +where `X` is to the respective counter device id. Please see +Documentation/ABI/testing/sysfs-bus-counter for detailed information on +each Generic Counter interface sysfs attribute. + +Through these sysfs attributes, programs and scripts may interact with +the Generic Counter paradigm Counts, Signals, and Synapses of respective +counter devices. + +Counter Character Device +======================== + +Counter character device nodes are created under the `/dev` directory as +`counterX`, where `X` is the respective counter device id. Device +information and control is exposed via a set of standard Counter +subsystem ioctl commands. + +.. kernel-doc:: include/uapi/linux/counter.h + :internal: diff --git a/Documentation/userspace-api/ioctl/ioctl-number.rst b/Documentation/userspace-api/ioctl/ioctl-number.rst index f759edafd938..8136a26fb81c 100644 --- a/Documentation/userspace-api/ioctl/ioctl-number.rst +++ b/Documentation/userspace-api/ioctl/ioctl-number.rst @@ -88,6 +88,7 @@ Code Seq# Include File Comments <http://infiniband.sourceforge.net/> 0x20 all drivers/cdrom/cm206.h 0x22 all scsi/sg.h +0x3E 00-1F linux/counter.h <mailto:linux-iio@vger.kernel.org> '!' 00-1F uapi/linux/seccomp.h '#' 00-3F IEEE 1394 Subsystem Block for the entire subsystem -- 2.26.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-04-29 18:12 UTC|newest] Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-29 18:11 [PATCH 0/4] Introduce the Counter character device interface William Breathitt Gray 2020-04-29 18:11 ` William Breathitt Gray 2020-04-29 18:11 ` [PATCH 1/4] counter: Internalize sysfs interface code William Breathitt Gray 2020-04-30 7:41 ` kbuild test robot 2020-04-30 7:41 ` kbuild test robot 2020-04-30 13:13 ` William Breathitt Gray 2020-04-30 13:13 ` William Breathitt Gray 2020-05-01 8:20 ` kbuild test robot 2020-05-01 8:20 ` kbuild test robot 2020-05-03 14:44 ` Jonathan Cameron 2020-04-29 18:11 ` [PATCH 2/4] docs: counter: Update to reflect sysfs internalization William Breathitt Gray 2020-04-29 18:11 ` William Breathitt Gray 2020-04-29 18:11 ` [PATCH 3/4] counter: Add character device interface William Breathitt Gray 2020-04-29 18:11 ` William Breathitt Gray 2020-05-01 2:56 ` kbuild test robot 2020-05-01 2:56 ` kbuild test robot 2020-04-29 18:11 ` William Breathitt Gray [this message] 2020-04-29 18:11 ` [PATCH 4/4] docs: counter: Document " William Breathitt Gray 2020-04-29 20:21 ` [PATCH 0/4] Introduce the Counter " David Lechner 2020-04-29 20:21 ` David Lechner 2020-05-03 14:52 ` Jonathan Cameron 2020-05-03 14:52 ` Jonathan Cameron 2020-04-30 20:13 ` Alexandre Belloni 2020-04-30 20:13 ` Alexandre Belloni 2020-05-01 15:46 ` William Breathitt Gray 2020-05-01 15:46 ` William Breathitt Gray 2020-05-02 16:55 ` Jonathan Cameron 2020-05-02 16:55 ` Jonathan Cameron 2020-05-03 9:23 ` Greg Kroah-Hartman 2020-05-03 9:23 ` Greg Kroah-Hartman 2020-05-03 12:54 ` Jonathan Cameron 2020-05-03 12:54 ` Jonathan Cameron 2020-05-03 13:16 ` William Breathitt Gray 2020-05-03 13:16 ` William Breathitt Gray 2020-05-03 15:05 ` Jonathan Cameron 2020-05-03 15:05 ` Jonathan Cameron 2020-05-03 14:13 ` Jonathan Cameron 2020-05-03 14:13 ` Jonathan Cameron 2020-05-03 14:21 ` David Laight 2020-05-03 14:21 ` David Laight
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=639b231a155fee0b1786aafb441f61e8094dcf75.1588176662.git.vilhelm.gray@gmail.com \ --to=vilhelm.gray@gmail.com \ --cc=alexandre.belloni@bootlin.com \ --cc=alexandre.torgue@st.com \ --cc=david@lechnology.com \ --cc=fabien.lahoudere@collabora.com \ --cc=fabrice.gasnier@st.com \ --cc=felipe.balbi@linux.intel.com \ --cc=gwendal@chromium.org \ --cc=jic23@kernel.org \ --cc=kamel.bouhara@bootlin.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-iio@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-stm32@st-md-mailman.stormreply.com \ --cc=mcoquelin.stm32@gmail.com \ --cc=patrick.havelange@essensium.com \ --cc=syednwaris@gmail.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: linkBe 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.