lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri,  2 Oct 2020 14:32:44 +0200
From:   poeschel@...onage.de
To:     Thierry Reding <thierry.reding@...il.com>,
        Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>, Lee Jones <lee.jones@...aro.org>,
        Jonathan Corbet <corbet@....net>,
        "GitAuthor: Lars Poeschel" <poeschel@...onage.de>,
        linux-kernel@...r.kernel.org (open list),
        linux-pwm@...r.kernel.org (open list:PWM SUBSYSTEM),
        linux-doc@...r.kernel.org (open list:DOCUMENTATION)
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: [PATCH 2/2] Documentation: Reflect the changes to pwm sysfs

From: Lars Poeschel <poeschel@...onage.de>

This is an update to the documentation to reflect the change to pwm
sysfs.

/sys/class/pwm/pwmchipN/pwmX style exports are marked as deprecated.
They are still available as symlinks to the new interface.
New exports are available as /sys/class/pwm/pwm-N-X

Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Signed-off-by: Lars Poeschel <poeschel@...onage.de>
---
 Documentation/ABI/obsolete/sysfs-class-pwm | 52 +++++++++++++++++++
 Documentation/ABI/testing/sysfs-class-pwm  | 60 ++++++++++++----------
 Documentation/driver-api/pwm.rst           |  7 +--
 3 files changed, 90 insertions(+), 29 deletions(-)
 create mode 100644 Documentation/ABI/obsolete/sysfs-class-pwm

diff --git a/Documentation/ABI/obsolete/sysfs-class-pwm b/Documentation/ABI/obsolete/sysfs-class-pwm
new file mode 100644
index 000000000000..92ba4f3586e9
--- /dev/null
+++ b/Documentation/ABI/obsolete/sysfs-class-pwm
@@ -0,0 +1,52 @@
+What:		/sys/class/pwm/pwmchipN/pwmX
+Date:		May 2013
+KernelVersion:	3.11
+Contact:	H Hartley Sweeten <hsweeten@...ionengravers.com>
+Description:
+		A /sys/class/pwm/pwmchipN/pwmX directory is created for
+		each exported PWM channel where X is the exported PWM
+		channel number.
+
+What:		/sys/class/pwm/pwmchipN/pwmX/period
+Date:		May 2013
+KernelVersion:	3.11
+Contact:	H Hartley Sweeten <hsweeten@...ionengravers.com>
+Description:
+		Sets the PWM signal period in nanoseconds.
+
+What:		/sys/class/pwm/pwmchipN/pwmX/duty_cycle
+Date:		May 2013
+KernelVersion:	3.11
+Contact:	H Hartley Sweeten <hsweeten@...ionengravers.com>
+Description:
+		Sets the PWM signal duty cycle in nanoseconds.
+
+What:		/sys/class/pwm/pwmchipN/pwmX/polarity
+Date:		May 2013
+KernelVersion:	3.11
+Contact:	H Hartley Sweeten <hsweeten@...ionengravers.com>
+Description:
+		Sets the output polarity of the PWM signal to "normal" or
+		"inversed".
+
+What:		/sys/class/pwm/pwmchipN/pwmX/enable
+Date:		May 2013
+KernelVersion:	3.11
+Contact:	H Hartley Sweeten <hsweeten@...ionengravers.com>
+Description:
+		Enable/disable the PWM signal.
+		0 is disabled
+		1 is enabled
+
+What:		/sys/class/pwm/pwmchipN/pwmX/capture
+Date:		June 2016
+KernelVersion:	4.8
+Contact:	Lee Jones <lee.jones@...aro.org>
+Description:
+		Capture information about a PWM signal. The output format is a
+		pair unsigned integers (period and duty cycle), separated by a
+		single space.
+
+  This ABI is deprecated and will be removed after 2025. It is replaced by
+  another sysfs ABI documented in Documentation/ABI/testing/sysfs-class-pwm
+
diff --git a/Documentation/ABI/testing/sysfs-class-pwm b/Documentation/ABI/testing/sysfs-class-pwm
index c20e61354561..87582dea1027 100644
--- a/Documentation/ABI/testing/sysfs-class-pwm
+++ b/Documentation/ABI/testing/sysfs-class-pwm
@@ -38,50 +38,58 @@ Contact:	H Hartley Sweeten <hsweeten@...ionengravers.com>
 Description:
 		Unexports a PWM channel.
 
-What:		/sys/class/pwm/pwmchipN/pwmX
-Date:		May 2013
-KernelVersion:	3.11
-Contact:	H Hartley Sweeten <hsweeten@...ionengravers.com>
+What:		/sys/class/pwm/pwm-N-X
+		/sys/class/pwm/pwmchipN/pwm-N-X
+Date:		October 2020
+KernelVersion:	5.9
+Contact:	Lars Poeschel <poeschel@...onage.de>
 Description:
-		A /sys/class/pwm/pwmchipN/pwmX directory is created for
+		A /sys/class/pwm/pwm-N-X directory is created for
 		each exported PWM channel where X is the exported PWM
-		channel number.
+		channel number and N is the number of the pwmchip
+		that this pwm belongs to.
+		/sys/class/pwm/pwmchipN/pwm-N-X is the same
 
-What:		/sys/class/pwm/pwmchipN/pwmX/period
-Date:		May 2013
-KernelVersion:	3.11
-Contact:	H Hartley Sweeten <hsweeten@...ionengravers.com>
+What:		/sys/class/pwm/pwm-N-X/period
+		/sys/class/pwm/pwmchipN/pwm-N-X/period
+Date:		October 2020
+KernelVersion:	5.9
+Contact:	Lars Poeschel <poeschel@...onage.de>
 Description:
 		Sets the PWM signal period in nanoseconds.
 
-What:		/sys/class/pwm/pwmchipN/pwmX/duty_cycle
-Date:		May 2013
-KernelVersion:	3.11
-Contact:	H Hartley Sweeten <hsweeten@...ionengravers.com>
+What:		/sys/class/pwm/pwm-N-X/duty_cycle
+		/sys/class/pwm/pwmchipN/pwm-N-X/duty_cycle
+Date:		October 2020
+KernelVersion:	5.9
+Contact:	Lars Poeschel <poeschel@...onage.de>
 Description:
 		Sets the PWM signal duty cycle in nanoseconds.
 
-What:		/sys/class/pwm/pwmchipN/pwmX/polarity
-Date:		May 2013
-KernelVersion:	3.11
-Contact:	H Hartley Sweeten <hsweeten@...ionengravers.com>
+What:		/sys/class/pwm/pwm-N-X/polarity
+		/sys/class/pwm/pwmchipN/pwm-N-X/polarity
+Date:		October 2020
+KernelVersion:	5.9
+Contact:	Lars Poeschel <poeschel@...onage.de>
 Description:
 		Sets the output polarity of the PWM signal to "normal" or
 		"inversed".
 
-What:		/sys/class/pwm/pwmchipN/pwmX/enable
-Date:		May 2013
-KernelVersion:	3.11
-Contact:	H Hartley Sweeten <hsweeten@...ionengravers.com>
+What:		/sys/class/pwm/pwm-N-X/enable
+		/sys/class/pwm/pwmchipN/pwm-N-X/enable
+Date:		October 2020
+KernelVersion:	5.9
+Contact:	Lars Poeschel <poeschel@...onage.de>
 Description:
 		Enable/disable the PWM signal.
 		0 is disabled
 		1 is enabled
 
-What:		/sys/class/pwm/pwmchipN/pwmX/capture
-Date:		June 2016
-KernelVersion:	4.8
-Contact:	Lee Jones <lee.jones@...aro.org>
+What:		/sys/class/pwm/pwm-N-X/capture
+		/sys/class/pwm/pwmchipN/pwm-N-X/capture
+Date:		October 2020
+KernelVersion:	5.9
+Contact:	Lars Poeschel <poeschel@...onage.de>
 Description:
 		Capture information about a PWM signal. The output format is a
 		pair unsigned integers (period and duty cycle), separated by a
diff --git a/Documentation/driver-api/pwm.rst b/Documentation/driver-api/pwm.rst
index ab62f1bb0366..9361cd9b136c 100644
--- a/Documentation/driver-api/pwm.rst
+++ b/Documentation/driver-api/pwm.rst
@@ -89,9 +89,10 @@ will find:
 
 The PWM channels are numbered using a per-chip index from 0 to npwm-1.
 
-When a PWM channel is exported a pwmX directory will be created in the
-pwmchipN directory it is associated with, where X is the number of the
-channel that was exported. The following properties will then be available:
+When a PWM channel is exported a pwm-N-X directory will be created in the
+/sys/class/pwm/ directory. N is number of the PWM chip this pwm is associated
+with and X is the number of the channel that was exported. The following
+properties will then be available:
 
   period
     The total period of the PWM signal (read/write).
-- 
2.28.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ