LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 00/17] ABI: update files to reduce the documentation gap
@ 2021-09-27 13:59 Mauro Carvalho Chehab
  2021-09-27 13:59 ` [PATCH 01/17] ABI: stable/sysfs-module: better document modules Mauro Carvalho Chehab
                   ` (16 more replies)
  0 siblings, 17 replies; 27+ messages in thread
From: Mauro Carvalho Chehab @ 2021-09-27 13:59 UTC (permalink / raw)
  To: Linux Doc Mailing List, Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, linux-kernel, Jonathan Corbet,
	Martin K. Petersen, Rafael J. Wysocki, Adrian Hunter, Alan Stern,
	Amey Narkhede, Avri Altman, Barry Song, Bean Huo, Bjorn Helgaas,
	Can Guo, Carlos Bilbao, Cezary Rojewski, Christoph Lameter,
	Daejun Park, David Windsor, Dominik Brodowski,
	Geert Uytterhoeven, Heikki Krogerus, Jonathan Cameron, Kees Cook,
	Leon Romanovsky, Lukas Bulwahn, Marc Zyngier, Maximilian Luz,
	Niklas Schnelle, Oded Gabbay, Pekka Enberg, Rajat Jain,
	Srinivas Kandagatla, Suzuki K Poulose, Thomas Gleixner, Tom Rix,
	Vaibhav Jain

On a recent work, "scripts/get_abi.pl" gained a command that
validates if the files under /sys are properly described inside
Documentation/ABI.

It does that by comparing the What: fields inside Documentation/ABI
with the entries under /sysfs.

This series addresses some of the most commonly missed nodes
(in terms of the number of reported occurencies).

This series is based on next-20210927. Most patches are
independent from the other patches on this series.

-

After this series, the number of warnings reduced a lot on my
desktop (a NUC8i7HNK):

  $  time ./scripts/get_abi.pl undefined |sort >undef && cat undef|perl -ne 'print "$1\n" if (m#.*/(\S+) not found#)'|sort|uniq -c|sort -nr >undefined_symbols &&  wc -l undef undefined_symbols
  real	0m6,583s
  user	0m5,841s
  sys	0m0,718s
    6663 undef
     774 undefined_symbols
    7437 total

Please notice that this script  runs millions of regular expressions
in order to do such match. So, while here is is running on 6 seconds,
it could take a lot more time on a bigger machine.
  

Mauro Carvalho Chehab (17):
  ABI: stable/sysfs-module: better document modules
  ABI: stable/sysfs-module: document version and srcversion
  ABI: testing/sysfs-module: document initstate
  ABI: sysfs-devices-power: document some RPM statistics
  ABI: sysfs-devices: add /dev ABI
  ABI: sysfs-bus-pci: add documentation for modalias
  ABI: o2cb: add an obsolete file for /sys/o2cb
  ABI: sysfs-kernel-slab: Document some stats
  ABI: sysfs-devices-power: add some debug sysfs files
  ABI: sysfs-bus-pci: add a alternative What fields
  ABI: sysfs-class-bdi: use What: to describe each property
  ABI: sysfs-bus-mdio: add alternate What for mdio symbols
  ABI: sysfs-bus-usb: use a wildcard for interface name on What
  ABI: sysfs-bus-usb: add missing sysfs fields
  ABI: obsolete/sysfs-bus-iio: add some missing blank lines
  ABI: sysfs-driver-ufs: Add another What for platform drivers
  ABI: sysfs-bus-platform: add modalias description

 Documentation/ABI/obsolete/o2cb               |  11 +
 Documentation/ABI/obsolete/sysfs-bus-iio      |   4 +
 Documentation/ABI/stable/o2cb                 |   2 +-
 Documentation/ABI/stable/sysfs-devices        |   7 +
 Documentation/ABI/stable/sysfs-module         |  25 +-
 Documentation/ABI/testing/sysfs-bus-mdio      |   9 +
 Documentation/ABI/testing/sysfs-bus-pci       |  22 ++
 Documentation/ABI/testing/sysfs-bus-platform  |  12 +
 Documentation/ABI/testing/sysfs-bus-usb       | 276 +++++++++++++++++-
 Documentation/ABI/testing/sysfs-class-bdi     |  30 +-
 Documentation/ABI/testing/sysfs-devices-power |  36 +++
 Documentation/ABI/testing/sysfs-driver-ufs    | 126 ++++++++
 Documentation/ABI/testing/sysfs-kernel-slab   |  21 ++
 Documentation/ABI/testing/sysfs-module        |   7 +
 14 files changed, 571 insertions(+), 17 deletions(-)
 create mode 100644 Documentation/ABI/obsolete/o2cb

-- 
2.31.1



^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 01/17] ABI: stable/sysfs-module: better document modules
  2021-09-27 13:59 [PATCH 00/17] ABI: update files to reduce the documentation gap Mauro Carvalho Chehab
@ 2021-09-27 13:59 ` Mauro Carvalho Chehab
  2021-09-27 13:59 ` [PATCH 02/17] ABI: stable/sysfs-module: document version and srcversion Mauro Carvalho Chehab
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Mauro Carvalho Chehab @ 2021-09-27 13:59 UTC (permalink / raw)
  To: Linux Doc Mailing List, Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, linux-kernel

Instead of placing almost everything there as a text, use
the proper What: for each component of the ABI.

This allows it to be better documented and parsed by
get_abi.pl.

While here, use wildcards for MODULENAME.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---

See [PATCH 00/17] at: https://lore.kernel.org/all/cover.1632750608.git.mchehab+huawei@kernel.org/

 Documentation/ABI/stable/sysfs-module | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/Documentation/ABI/stable/sysfs-module b/Documentation/ABI/stable/sysfs-module
index 6272ae5fb366..5c028af9921a 100644
--- a/Documentation/ABI/stable/sysfs-module
+++ b/Documentation/ABI/stable/sysfs-module
@@ -1,8 +1,7 @@
-What:		/sys/module
-Description:
-	The /sys/module tree consists of the following structure:
+The /sys/module tree consists of the following structure:
 
-	/sys/module/MODULENAME
+What:		/sys/module/<MODULENAME>
+Description:
 		The name of the module that is in the kernel.  This
 		module name will always show up if the module is loaded as a
 		dynamic module.  If it is built directly into the kernel, it
@@ -12,7 +11,8 @@ Description:
 		Note: The conditions of creation in the built-in case are not
 		by design and may be removed in the future.
 
-	/sys/module/MODULENAME/parameters
+What:		/sys/module/<MODULENAME>/parameters
+Description:
 		This directory contains individual files that are each
 		individual parameters of the module that are able to be
 		changed at runtime.  See the individual module
@@ -25,7 +25,8 @@ Description:
 		individual driver documentation for details as to the
 		stability of the different parameters.
 
-	/sys/module/MODULENAME/refcnt
+What:		/sys/module/<MODULENAME>/refcnt
+Description:
 		If the module is able to be unloaded from the kernel, this file
 		will contain the current reference count of the module.
 
-- 
2.31.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 02/17] ABI: stable/sysfs-module: document version and srcversion
  2021-09-27 13:59 [PATCH 00/17] ABI: update files to reduce the documentation gap Mauro Carvalho Chehab
  2021-09-27 13:59 ` [PATCH 01/17] ABI: stable/sysfs-module: better document modules Mauro Carvalho Chehab
@ 2021-09-27 13:59 ` Mauro Carvalho Chehab
  2021-09-27 13:59 ` [PATCH 03/17] ABI: testing/sysfs-module: document initstate Mauro Carvalho Chehab
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Mauro Carvalho Chehab @ 2021-09-27 13:59 UTC (permalink / raw)
  To: Linux Doc Mailing List, Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, linux-kernel

Changeset c988d2b28454 ("[PATCH] modules: add version and srcversion to sysfs")
added version and srcversion ABI to modules. Document them.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---

See [PATCH 00/17] at: https://lore.kernel.org/all/cover.1632750608.git.mchehab+huawei@kernel.org/

 Documentation/ABI/stable/sysfs-module | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/Documentation/ABI/stable/sysfs-module b/Documentation/ABI/stable/sysfs-module
index 5c028af9921a..560b4a3278df 100644
--- a/Documentation/ABI/stable/sysfs-module
+++ b/Documentation/ABI/stable/sysfs-module
@@ -33,3 +33,15 @@ Description:
 		Note: If the module is built into the kernel, or if the
 		CONFIG_MODULE_UNLOAD kernel configuration value is not enabled,
 		this file will not be present.
+
+What:		/sys/module/<MODULENAME>/srcversion
+Date:		Jun 2005
+Description:
+		If the module source has MODULE_VERSION, this file will contain
+		the checksum of the the source code.
+
+What:		/sys/module/<MODULENAME>/version
+Date:		Jun 2005
+Description:
+		If the module source has MODULE_VERSION, this file will contain
+		the version of the source code.
-- 
2.31.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 03/17] ABI: testing/sysfs-module: document initstate
  2021-09-27 13:59 [PATCH 00/17] ABI: update files to reduce the documentation gap Mauro Carvalho Chehab
  2021-09-27 13:59 ` [PATCH 01/17] ABI: stable/sysfs-module: better document modules Mauro Carvalho Chehab
  2021-09-27 13:59 ` [PATCH 02/17] ABI: stable/sysfs-module: document version and srcversion Mauro Carvalho Chehab
@ 2021-09-27 13:59 ` Mauro Carvalho Chehab
  2021-09-27 13:59 ` [PATCH 04/17] ABI: sysfs-devices-power: document some RPM statistics Mauro Carvalho Chehab
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Mauro Carvalho Chehab @ 2021-09-27 13:59 UTC (permalink / raw)
  To: Linux Doc Mailing List, Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, Geert Uytterhoeven,
	Oded Gabbay, Tom Rix, Vaibhav Jain, linux-kernel

Despite being an old ABI, present on all modules, its documentation
is missing. Add it, based on the original commit.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---

See [PATCH 00/17] at: https://lore.kernel.org/all/cover.1632750608.git.mchehab+huawei@kernel.org/

 Documentation/ABI/testing/sysfs-module | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-module b/Documentation/ABI/testing/sysfs-module
index 88bddf192ceb..08886367d047 100644
--- a/Documentation/ABI/testing/sysfs-module
+++ b/Documentation/ABI/testing/sysfs-module
@@ -41,6 +41,13 @@ KernelVersion:	3.3
 Contact:	Kay Sievers <kay.sievers@vrfy.org>
 Description:	Module size in bytes.
 
+What:		/sys/module/*/initstate
+Date:		Nov 2006
+KernelVersion:	2.6.19
+Contact:	Kay Sievers <kay.sievers@vrfy.org>
+Description:	Show the initialization state(live, coming, going) of
+		the module.
+
 What:		/sys/module/*/taint
 Date:		Jan 2012
 KernelVersion:	3.3
-- 
2.31.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 04/17] ABI: sysfs-devices-power: document some RPM statistics
  2021-09-27 13:59 [PATCH 00/17] ABI: update files to reduce the documentation gap Mauro Carvalho Chehab
                   ` (2 preceding siblings ...)
  2021-09-27 13:59 ` [PATCH 03/17] ABI: testing/sysfs-module: document initstate Mauro Carvalho Chehab
@ 2021-09-27 13:59 ` Mauro Carvalho Chehab
  2021-09-27 13:59 ` [PATCH 05/17] ABI: sysfs-devices: add /dev ABI Mauro Carvalho Chehab
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Mauro Carvalho Chehab @ 2021-09-27 13:59 UTC (permalink / raw)
  To: Linux Doc Mailing List, Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, linux-kernel

Changeset 8d4b9d1bfef1 ("PM / Runtime: Add runtime PM statistics (v3)")
added runtime_active_time and runtime_suspended_time, in order
to allow powertop to identify the amount of time a device is
active/suspended.

Add an ABI description for those.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---

See [PATCH 00/17] at: https://lore.kernel.org/all/cover.1632750608.git.mchehab+huawei@kernel.org/

 Documentation/ABI/testing/sysfs-devices-power | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-devices-power b/Documentation/ABI/testing/sysfs-devices-power
index 1763e64dd152..84694b8fec8e 100644
--- a/Documentation/ABI/testing/sysfs-devices-power
+++ b/Documentation/ABI/testing/sysfs-devices-power
@@ -269,3 +269,17 @@ Description:
 		the current runtime PM status of the device, which may be
 		"suspended", "suspending", "resuming", "active", "error" (fatal
 		error), or "unsupported" (runtime PM is disabled).
+
+What:		/sys/devices/.../power/runtime_active_time
+Date:		Jul 2010
+Contact:	Arjan van de Ven <arjan@linux.intel.com>
+Description:
+		Reports the total time that the device has been active.
+		Used for runtime PM statistics.
+
+What:		/sys/devices/.../power/runtime_suspended_time
+Date:		Jul 2010
+Contact:	Arjan van de Ven <arjan@linux.intel.com>
+Description:
+		Reports total time that the device has been suspended.
+		Used for runtime PM statistics.
-- 
2.31.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 05/17] ABI: sysfs-devices: add /dev ABI
  2021-09-27 13:59 [PATCH 00/17] ABI: update files to reduce the documentation gap Mauro Carvalho Chehab
                   ` (3 preceding siblings ...)
  2021-09-27 13:59 ` [PATCH 04/17] ABI: sysfs-devices-power: document some RPM statistics Mauro Carvalho Chehab
@ 2021-09-27 13:59 ` Mauro Carvalho Chehab
  2021-09-27 13:59 ` [PATCH 06/17] ABI: sysfs-bus-pci: add documentation for modalias Mauro Carvalho Chehab
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Mauro Carvalho Chehab @ 2021-09-27 13:59 UTC (permalink / raw)
  To: Linux Doc Mailing List, Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, Srinivas Kandagatla,
	linux-kernel

Changeset 23681e479129 ("[PATCH] Driver core: allow struct device to have a dev_t")
added a /dev ABI for /sys/devices. Document it.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---

See [PATCH 00/17] at: https://lore.kernel.org/all/cover.1632750608.git.mchehab+huawei@kernel.org/

 Documentation/ABI/stable/sysfs-devices | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/ABI/stable/sysfs-devices b/Documentation/ABI/stable/sysfs-devices
index 42bf1eab5677..98a8ef99ac5f 100644
--- a/Documentation/ABI/stable/sysfs-devices
+++ b/Documentation/ABI/stable/sysfs-devices
@@ -23,3 +23,10 @@ Contact:	Device Tree mailing list <devicetree@vger.kernel.org>
 Description:
 		If CONFIG_OF is enabled, then this file is present. When
 		read, it returns full name of the device node.
+
+What:		/sys/devices/*/dev
+Date:		Jun 2006
+Contact:	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Description:
+		Major and minor numbers of the character device corresponding
+		to the device (in <major>:<minor> format).
-- 
2.31.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 06/17] ABI: sysfs-bus-pci: add documentation for modalias
  2021-09-27 13:59 [PATCH 00/17] ABI: update files to reduce the documentation gap Mauro Carvalho Chehab
                   ` (4 preceding siblings ...)
  2021-09-27 13:59 ` [PATCH 05/17] ABI: sysfs-devices: add /dev ABI Mauro Carvalho Chehab
@ 2021-09-27 13:59 ` Mauro Carvalho Chehab
  2021-09-28 10:48   ` Greg Kroah-Hartman
  2021-09-27 13:59 ` [PATCH 07/17] ABI: o2cb: add an obsolete file for /sys/o2cb Mauro Carvalho Chehab
                   ` (10 subsequent siblings)
  16 siblings, 1 reply; 27+ messages in thread
From: Mauro Carvalho Chehab @ 2021-09-27 13:59 UTC (permalink / raw)
  To: Linux Doc Mailing List, Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, Amey Narkhede,
	Bjorn Helgaas, Carlos Bilbao, Leon Romanovsky, Maximilian Luz,
	Niklas Schnelle, Suzuki K Poulose, linux-kernel

Even being available since 2005, there's no documentation for
modalias.

Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---

See [PATCH 00/17] at: https://lore.kernel.org/all/cover.1632750608.git.mchehab+huawei@kernel.org/

 Documentation/ABI/testing/sysfs-bus-pci | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci
index 191cbe9ae5ed..1eeac7f59672 100644
--- a/Documentation/ABI/testing/sysfs-bus-pci
+++ b/Documentation/ABI/testing/sysfs-bus-pci
@@ -187,6 +187,24 @@ Description:
 		The symbolic link points to the PCI device sysfs entry of the
 		Physical Function this device associates with.
 
+What:		/sys/bus/pci/devices/.../modalias
+Date:		May 2005
+Contact:	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Description:
+		This attribute indicates the PCI ID of the device object.
+
+		That is in the format:
+		pci:vXXXXXXXXdXXXXXXXXsvXXXXXXXXsdXXXXXXXXbcXXscXXiXX,
+		where:
+
+		    - vXXXXXXXX contains the vendor ID;
+		    - dXXXXXXXX contains the device ID;
+		    - svXXXXXXXX contains the sub-vendor ID;
+		    - sdXXXXXXXX contains the subsystem device ID;
+		    - bcXX contains the device class;
+		    - scXX contains the device subclass;
+		    - iXX contains the device class programming interface.
+
 What:		/sys/bus/pci/slots/.../module
 Date:		June 2009
 Contact:	linux-pci@vger.kernel.org
-- 
2.31.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 07/17] ABI: o2cb: add an obsolete file for /sys/o2cb
  2021-09-27 13:59 [PATCH 00/17] ABI: update files to reduce the documentation gap Mauro Carvalho Chehab
                   ` (5 preceding siblings ...)
  2021-09-27 13:59 ` [PATCH 06/17] ABI: sysfs-bus-pci: add documentation for modalias Mauro Carvalho Chehab
@ 2021-09-27 13:59 ` Mauro Carvalho Chehab
  2021-09-27 13:59 ` [PATCH 08/17] ABI: sysfs-kernel-slab: Document some stats Mauro Carvalho Chehab
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Mauro Carvalho Chehab @ 2021-09-27 13:59 UTC (permalink / raw)
  To: Linux Doc Mailing List, Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, linux-kernel

This was renamed to /sys/fs/o2cb. Mark the old name as
obsolete.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---

See [PATCH 00/17] at: https://lore.kernel.org/all/cover.1632750608.git.mchehab+huawei@kernel.org/

 Documentation/ABI/obsolete/o2cb | 11 +++++++++++
 Documentation/ABI/stable/o2cb   |  2 +-
 2 files changed, 12 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/ABI/obsolete/o2cb

diff --git a/Documentation/ABI/obsolete/o2cb b/Documentation/ABI/obsolete/o2cb
new file mode 100644
index 000000000000..fe7e45e17bc7
--- /dev/null
+++ b/Documentation/ABI/obsolete/o2cb
@@ -0,0 +1,11 @@
+What:		/sys/o2cb
+Date:		Dec 2005
+KernelVersion:	2.6.16
+Contact:	ocfs2-devel@oss.oracle.com
+Description:	Ocfs2-tools looks at 'interface-revision' for versioning
+		information. Each logmask/ file controls a set of debug prints
+		and can be written into with the strings "allow", "deny", or
+		"off". Reading the file returns the current state.
+		Was renamed to /sys/fs/u2cb/
+Users:		ocfs2-tools. It's sufficient to mail proposed changes to
+		ocfs2-devel@oss.oracle.com.
diff --git a/Documentation/ABI/stable/o2cb b/Documentation/ABI/stable/o2cb
index 5eb1545e0b8d..b62a967f01a0 100644
--- a/Documentation/ABI/stable/o2cb
+++ b/Documentation/ABI/stable/o2cb
@@ -1,4 +1,4 @@
-What:		/sys/fs/o2cb/ (was /sys/o2cb)
+What:		/sys/fs/o2cb/
 Date:		Dec 2005
 KernelVersion:	2.6.16
 Contact:	ocfs2-devel@oss.oracle.com
-- 
2.31.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 08/17] ABI: sysfs-kernel-slab: Document some stats
  2021-09-27 13:59 [PATCH 00/17] ABI: update files to reduce the documentation gap Mauro Carvalho Chehab
                   ` (6 preceding siblings ...)
  2021-09-27 13:59 ` [PATCH 07/17] ABI: o2cb: add an obsolete file for /sys/o2cb Mauro Carvalho Chehab
@ 2021-09-27 13:59 ` Mauro Carvalho Chehab
  2021-09-27 13:59 ` [PATCH 09/17] ABI: sysfs-devices-power: add some debug sysfs files Mauro Carvalho Chehab
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Mauro Carvalho Chehab @ 2021-09-27 13:59 UTC (permalink / raw)
  To: Linux Doc Mailing List, Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, Christoph Lameter,
	David Windsor, Jonathan Cameron, Kees Cook, Pekka Enberg,
	Suzuki K Poulose, Tom Rix, linux-kernel

Document three slab stats that were added in 2011 and 2017.

Fixes: 49e2258586b4 ("slub: per cpu cache for partial pages")
Fixes: 8eb8284b4129 ("usercopy: Prepare for usercopy whitelisting")

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---

See [PATCH 00/17] at: https://lore.kernel.org/all/cover.1632750608.git.mchehab+huawei@kernel.org/

 Documentation/ABI/testing/sysfs-kernel-slab | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-kernel-slab b/Documentation/ABI/testing/sysfs-kernel-slab
index 77e5840b00a5..c440f4946e12 100644
--- a/Documentation/ABI/testing/sysfs-kernel-slab
+++ b/Documentation/ABI/testing/sysfs-kernel-slab
@@ -496,3 +496,24 @@ Contact:	Pekka Enberg <penberg@cs.helsinki.fi>,
 Description:
 		Writing to the validate file causes SLUB to traverse all of its
 		cache's objects and check the validity of metadata.
+
+What:		/sys/kernel/slab/<cache>/usersize
+Date:		Jun 2017
+Contact:	David Windsor <dave@nullcore.net>
+Description:
+		The usersize file is read-only and contains the usercopy
+		region size.
+
+What:		/sys/kernel/slab/<cache>/slabs_cpu_partial
+Date:		Aug 2011
+Contact:	Christoph Lameter <cl@linux.com>
+Description:
+		This read-only file shows the number of partialli allocated
+		frozen slabs.
+
+What:		/sys/kernel/slab/<cache>/cpu_partial
+Date:		Aug 2011
+Contact:	Christoph Lameter <cl@linux.com>
+Description:
+		This read-only file shows the number of per cpu partial
+		pages to keep around.
-- 
2.31.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 09/17] ABI: sysfs-devices-power: add some debug sysfs files
  2021-09-27 13:59 [PATCH 00/17] ABI: update files to reduce the documentation gap Mauro Carvalho Chehab
                   ` (7 preceding siblings ...)
  2021-09-27 13:59 ` [PATCH 08/17] ABI: sysfs-kernel-slab: Document some stats Mauro Carvalho Chehab
@ 2021-09-27 13:59 ` Mauro Carvalho Chehab
  2021-09-27 13:59 ` [PATCH 10/17] ABI: sysfs-bus-pci: add a alternative What fields Mauro Carvalho Chehab
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Mauro Carvalho Chehab @ 2021-09-27 13:59 UTC (permalink / raw)
  To: Linux Doc Mailing List, Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, Rafael J. Wysocki,
	Alan Stern, Dominik Brodowski, linux-kernel

Those files were added back in Apr 2010, but there's no
documentation for them yet.

Fixes: c92445fadb91 ("PM / Runtime: Add sysfs debug files")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---

See [PATCH 00/17] at: https://lore.kernel.org/all/cover.1632750608.git.mchehab+huawei@kernel.org/

 Documentation/ABI/testing/sysfs-devices-power | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-devices-power b/Documentation/ABI/testing/sysfs-devices-power
index 84694b8fec8e..1b2a2d41ff80 100644
--- a/Documentation/ABI/testing/sysfs-devices-power
+++ b/Documentation/ABI/testing/sysfs-devices-power
@@ -283,3 +283,25 @@ Contact:	Arjan van de Ven <arjan@linux.intel.com>
 Description:
 		Reports total time that the device has been suspended.
 		Used for runtime PM statistics.
+
+What:		/sys/devices/.../power/runtime_usage
+Date:		Apr 2010
+Contact:	Dominik Brodowski <linux@dominikbrodowski.net>
+Description:
+		Reports the runtime PM usage count of a device.
+
+What:		/sys/devices/.../power/runtime_enabled
+Date:		Apr 2010
+Contact:	Dominik Brodowski <linux@dominikbrodowski.net>
+Description:
+		Is runtime PM enabled for this device?
+		States are "enabled", "disabled", "forbidden" or a
+		combination of the latter two.
+
+What:		/sys/devices/.../power/runtime_active_kids
+Date:		Apr 2010
+Contact:	Dominik Brodowski <linux@dominikbrodowski.net>
+Description:
+		Reports the runtime PM children usage count of a device, or
+		0 if the the children will be ignored.
+
-- 
2.31.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 10/17] ABI: sysfs-bus-pci: add a alternative What fields
  2021-09-27 13:59 [PATCH 00/17] ABI: update files to reduce the documentation gap Mauro Carvalho Chehab
                   ` (8 preceding siblings ...)
  2021-09-27 13:59 ` [PATCH 09/17] ABI: sysfs-devices-power: add some debug sysfs files Mauro Carvalho Chehab
@ 2021-09-27 13:59 ` Mauro Carvalho Chehab
  2021-09-28 18:34   ` Bjorn Helgaas
  2021-09-27 13:59 ` [PATCH 11/17] ABI: sysfs-class-bdi: use What: to describe each property Mauro Carvalho Chehab
                   ` (6 subsequent siblings)
  16 siblings, 1 reply; 27+ messages in thread
From: Mauro Carvalho Chehab @ 2021-09-27 13:59 UTC (permalink / raw)
  To: Linux Doc Mailing List, Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, Amey Narkhede,
	Bjorn Helgaas, Carlos Bilbao, Leon Romanovsky, Maximilian Luz,
	Niklas Schnelle, Oded Gabbay, linux-kernel

There are some PCI ABI that aren't shown under:

	/sys/bus/pci/drivers/.../

Because they're registered with a different class. That's
the case of, for instance:

	/sys/bus/i2c/drivers/CHT Whiskey Cove PMIC/unbind

This one is not present under /sys/bus/pci:

	$ find /sys/bus/pci -name 'CHT Whiskey Cove PMIC'

Although clearly this is provided by a PCI driver:

	/sys/devices/pci0000:00/0000:00:02.0/i2c-4/subsystem/drivers/CHT Whiskey Cove PMIC/unbind

So, add an altertate What location in order to match bind/unbind
to such devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---

See [PATCH 00/17] at: https://lore.kernel.org/all/cover.1632750608.git.mchehab+huawei@kernel.org/

 Documentation/ABI/testing/sysfs-bus-pci | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci
index 1eeac7f59672..16afe3f59cbd 100644
--- a/Documentation/ABI/testing/sysfs-bus-pci
+++ b/Documentation/ABI/testing/sysfs-bus-pci
@@ -1,4 +1,5 @@
 What:		/sys/bus/pci/drivers/.../bind
+What:		/sys/devices/pciX/.../bind
 Date:		December 2003
 Contact:	linux-pci@vger.kernel.org
 Description:
@@ -14,6 +15,7 @@ Description:
 		(Note: kernels before 2.6.28 may require echo -n).
 
 What:		/sys/bus/pci/drivers/.../unbind
+What:		/sys/devices/pciX/.../unbind
 Date:		December 2003
 Contact:	linux-pci@vger.kernel.org
 Description:
@@ -29,6 +31,7 @@ Description:
 		(Note: kernels before 2.6.28 may require echo -n).
 
 What:		/sys/bus/pci/drivers/.../new_id
+What:		/sys/devices/pciX/.../new_id
 Date:		December 2003
 Contact:	linux-pci@vger.kernel.org
 Description:
@@ -47,6 +50,7 @@ Description:
 		  # echo "8086 10f5" > /sys/bus/pci/drivers/foo/new_id
 
 What:		/sys/bus/pci/drivers/.../remove_id
+What:		/sys/devices/pciX/.../remove_id
 Date:		February 2009
 Contact:	Chris Wright <chrisw@sous-sol.org>
 Description:
-- 
2.31.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 11/17] ABI: sysfs-class-bdi: use What: to describe each property
  2021-09-27 13:59 [PATCH 00/17] ABI: update files to reduce the documentation gap Mauro Carvalho Chehab
                   ` (9 preceding siblings ...)
  2021-09-27 13:59 ` [PATCH 10/17] ABI: sysfs-bus-pci: add a alternative What fields Mauro Carvalho Chehab
@ 2021-09-27 13:59 ` Mauro Carvalho Chehab
  2021-09-27 13:59 ` [PATCH 12/17] ABI: sysfs-bus-mdio: add alternate What for mdio symbols Mauro Carvalho Chehab
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Mauro Carvalho Chehab @ 2021-09-27 13:59 UTC (permalink / raw)
  To: Linux Doc Mailing List, Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, Cezary Rojewski,
	Oded Gabbay, Suzuki K Poulose, Tom Rix, linux-kernel

Instead of listing all bdi entries inside the description, add
one entry for each, just like the remaining ABI files.

That allows get_abi.pl script to properly parse it.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---

See [PATCH 00/17] at: https://lore.kernel.org/all/cover.1632750608.git.mchehab+huawei@kernel.org/

 Documentation/ABI/testing/sysfs-class-bdi | 30 ++++++++++++++++-------
 1 file changed, 21 insertions(+), 9 deletions(-)

diff --git a/Documentation/ABI/testing/sysfs-class-bdi b/Documentation/ABI/testing/sysfs-class-bdi
index 5402bd74ba43..6d2a2fc189dd 100644
--- a/Documentation/ABI/testing/sysfs-class-bdi
+++ b/Documentation/ABI/testing/sysfs-class-bdi
@@ -23,14 +23,17 @@ default
 	The default backing dev, used for non-block device backed
 	filesystems which do not provide their own BDI.
 
-Files under /sys/class/bdi/<bdi>/
-
-read_ahead_kb (read-write)
-
+What:		/sys/class/bdi/<bdi>/read_ahead_kb
+Date:		January 2008
+Contact:	Peter Zijlstra <a.p.zijlstra@chello.nl>
+Description:
 	Size of the read-ahead window in kilobytes
 
-min_ratio (read-write)
-
+	(read-write)
+What:		/sys/class/bdi/<bdi>/min_ratio
+Date:		January 2008
+Contact:	Peter Zijlstra <a.p.zijlstra@chello.nl>
+Description:
 	Under normal circumstances each device is given a part of the
 	total write-back cache that relates to its current average
 	writeout speed in relation to the other devices.
@@ -39,8 +42,12 @@ min_ratio (read-write)
 	percentage of the write-back cache to a particular device.
 	For example, this is useful for providing a minimum QoS.
 
-max_ratio (read-write)
+	(read-write)
 
+What:		/sys/class/bdi/<bdi>/max_ratio
+Date:		January 2008
+Contact:	Peter Zijlstra <a.p.zijlstra@chello.nl>
+Description:
 	Allows limiting a particular device to use not more than the
 	given percentage of the write-back cache.  This is useful in
 	situations where we want to avoid one device taking all or
@@ -48,7 +55,12 @@ max_ratio (read-write)
 	mount that is prone to get stuck, or a FUSE mount which cannot
 	be trusted to play fair.
 
-stable_pages_required (read-only)
-
+	(read-write)
+What:		/sys/class/bdi/<bdi>/stable_pages_required
+Date:		January 2008
+Contact:	Peter Zijlstra <a.p.zijlstra@chello.nl>
+Description:
 	If set, the backing device requires that all pages comprising a write
 	request must not be changed until writeout is complete.
+
+	(read-only)
-- 
2.31.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 12/17] ABI: sysfs-bus-mdio: add alternate What for mdio symbols
  2021-09-27 13:59 [PATCH 00/17] ABI: update files to reduce the documentation gap Mauro Carvalho Chehab
                   ` (10 preceding siblings ...)
  2021-09-27 13:59 ` [PATCH 11/17] ABI: sysfs-class-bdi: use What: to describe each property Mauro Carvalho Chehab
@ 2021-09-27 13:59 ` Mauro Carvalho Chehab
  2021-09-27 13:59 ` [PATCH 13/17] ABI: sysfs-bus-usb: use a wildcard for interface name on What Mauro Carvalho Chehab
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Mauro Carvalho Chehab @ 2021-09-27 13:59 UTC (permalink / raw)
  To: Linux Doc Mailing List, Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, linux-kernel

Not all sysfs nodes are shown under:
	/sys/bus/mdio_bus/devices/...
They can also be at:
	/sys/class/mdio_bus/.../

So, update the What: entries to allow both.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---

See [PATCH 00/17] at: https://lore.kernel.org/all/cover.1632750608.git.mchehab+huawei@kernel.org/

 Documentation/ABI/testing/sysfs-bus-mdio | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-bus-mdio b/Documentation/ABI/testing/sysfs-bus-mdio
index da86efc7781b..38be04dfc05e 100644
--- a/Documentation/ABI/testing/sysfs-bus-mdio
+++ b/Documentation/ABI/testing/sysfs-bus-mdio
@@ -1,4 +1,5 @@
 What:          /sys/bus/mdio_bus/devices/.../statistics/
+What:          /sys/class/mdio_bus/.../statistics/
 Date:          January 2020
 KernelVersion: 5.6
 Contact:       netdev@vger.kernel.org
@@ -7,6 +8,7 @@ Description:
 		MDIO bus address statistics.
 
 What:          /sys/bus/mdio_bus/devices/.../statistics/transfers
+What:          /sys/class/mdio_bus/.../transfers
 Date:          January 2020
 KernelVersion: 5.6
 Contact:       netdev@vger.kernel.org
@@ -14,6 +16,7 @@ Description:
 		Total number of transfers for this MDIO bus.
 
 What:          /sys/bus/mdio_bus/devices/.../statistics/errors
+What:          /sys/class/mdio_bus/.../statistics/errors
 Date:          January 2020
 KernelVersion: 5.6
 Contact:       netdev@vger.kernel.org
@@ -21,6 +24,7 @@ Description:
 		Total number of transfer errors for this MDIO bus.
 
 What:          /sys/bus/mdio_bus/devices/.../statistics/writes
+What:          /sys/class/mdio_bus/.../statistics/writes
 Date:          January 2020
 KernelVersion: 5.6
 Contact:       netdev@vger.kernel.org
@@ -28,6 +32,7 @@ Description:
 		Total number of write transactions for this MDIO bus.
 
 What:          /sys/bus/mdio_bus/devices/.../statistics/reads
+What:          /sys/class/mdio_bus/.../statistics/reads
 Date:          January 2020
 KernelVersion: 5.6
 Contact:       netdev@vger.kernel.org
@@ -35,6 +40,7 @@ Description:
 		Total number of read transactions for this MDIO bus.
 
 What:          /sys/bus/mdio_bus/devices/.../statistics/transfers_<addr>
+What:          /sys/class/mdio_bus/.../statistics/transfers_<addr>
 Date:          January 2020
 KernelVersion: 5.6
 Contact:       netdev@vger.kernel.org
@@ -42,6 +48,7 @@ Description:
 		Total number of transfers for this MDIO bus address.
 
 What:          /sys/bus/mdio_bus/devices/.../statistics/errors_<addr>
+What:          /sys/class/mdio_bus/.../statistics/errors_<addr>
 Date:          January 2020
 KernelVersion: 5.6
 Contact:       netdev@vger.kernel.org
@@ -49,6 +56,7 @@ Description:
 		Total number of transfer errors for this MDIO bus address.
 
 What:          /sys/bus/mdio_bus/devices/.../statistics/writes_<addr>
+What:          /sys/class/mdio_bus/.../statistics/writes_<addr>
 Date:          January 2020
 KernelVersion: 5.6
 Contact:       netdev@vger.kernel.org
@@ -56,6 +64,7 @@ Description:
 		Total number of write transactions for this MDIO bus address.
 
 What:          /sys/bus/mdio_bus/devices/.../statistics/reads_<addr>
+What:          /sys/class/mdio_bus/.../statistics/reads_<addr>
 Date:          January 2020
 KernelVersion: 5.6
 Contact:       netdev@vger.kernel.org
-- 
2.31.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 13/17] ABI: sysfs-bus-usb: use a wildcard for interface name on What
  2021-09-27 13:59 [PATCH 00/17] ABI: update files to reduce the documentation gap Mauro Carvalho Chehab
                   ` (11 preceding siblings ...)
  2021-09-27 13:59 ` [PATCH 12/17] ABI: sysfs-bus-mdio: add alternate What for mdio symbols Mauro Carvalho Chehab
@ 2021-09-27 13:59 ` Mauro Carvalho Chehab
  2021-09-27 13:59 ` [PATCH 14/17] ABI: sysfs-bus-usb: add missing sysfs fields Mauro Carvalho Chehab
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Mauro Carvalho Chehab @ 2021-09-27 13:59 UTC (permalink / raw)
  To: Linux Doc Mailing List, Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, Bjorn Helgaas,
	Heikki Krogerus, Rajat Jain, linux-kernel

Use <INTERFACE> instead of INTERFACE, in order for the get_abi.pl
script to be able to identify this as a wildcard.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---

See [PATCH 00/17] at: https://lore.kernel.org/all/cover.1632750608.git.mchehab+huawei@kernel.org/

 Documentation/ABI/testing/sysfs-bus-usb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb
index 42103f0f54d6..7269077ce505 100644
--- a/Documentation/ABI/testing/sysfs-bus-usb
+++ b/Documentation/ABI/testing/sysfs-bus-usb
@@ -1,4 +1,4 @@
-What:		/sys/bus/usb/devices/INTERFACE/authorized
+What:		/sys/bus/usb/devices/<INTERFACE>/authorized
 Date:		August 2015
 Description:
 		This allows to authorize (1) or deauthorize (0)
-- 
2.31.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 14/17] ABI: sysfs-bus-usb: add missing sysfs fields
  2021-09-27 13:59 [PATCH 00/17] ABI: update files to reduce the documentation gap Mauro Carvalho Chehab
                   ` (12 preceding siblings ...)
  2021-09-27 13:59 ` [PATCH 13/17] ABI: sysfs-bus-usb: use a wildcard for interface name on What Mauro Carvalho Chehab
@ 2021-09-27 13:59 ` Mauro Carvalho Chehab
  2021-09-27 13:59 ` [PATCH 15/17] ABI: obsolete/sysfs-bus-iio: add some missing blank lines Mauro Carvalho Chehab
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Mauro Carvalho Chehab @ 2021-09-27 13:59 UTC (permalink / raw)
  To: Linux Doc Mailing List, Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, Heikki Krogerus,
	Rajat Jain, linux-kernel

There are lots of interface, power and endpoint properties that are currently
missing any documentation.

Add a description for them.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---

See [PATCH 00/17] at: https://lore.kernel.org/all/cover.1632750608.git.mchehab+huawei@kernel.org/

 Documentation/ABI/testing/sysfs-bus-usb | 274 ++++++++++++++++++++++++
 1 file changed, 274 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb
index 7269077ce505..2ebe5708b4bc 100644
--- a/Documentation/ABI/testing/sysfs-bus-usb
+++ b/Documentation/ABI/testing/sysfs-bus-usb
@@ -288,3 +288,277 @@ Description:
 		USB 3.2 adds Dual-lane support, 2 rx and 2 tx -lanes over Type-C.
 		Inter-Chip SSIC devices support asymmetric lanes up to 4 lanes per
 		direction. Devices before USB 3.2 are single lane (tx_lanes = 1)
+
+What:		/sys/bus/usb/devices/usbX/bAlternateSetting
+Description:
+		The current interface alternate setting number, in decimal.
+
+		See USB specs for its meaning.
+
+What:		/sys/bus/usb/devices/usbX/bcdDevice
+Description:
+		The device's release number, in hexadecimal.
+
+		See USB specs for its meaning.
+
+What:		/sys/bus/usb/devices/usbX/bConfigurationValue
+Description:
+		While a USB device typically have just one configuration
+		setting, some devices support multiple configurations.
+
+		This value shows the current configuration, in decimal.
+
+		Changing its value will change the device's configuration
+		to another setting.
+
+		The number of configurations supported by a device is at:
+
+			/sys/bus/usb/devices/usbX/bNumConfigurations
+
+		See USB specs for its meaning.
+
+What:		/sys/bus/usb/devices/usbX/bDeviceClass
+Description:
+		Class code of the device, in hexadecimal.
+
+		See USB specs for its meaning.
+
+What:		/sys/bus/usb/devices/usbX/bDeviceProtocol
+Description:
+		Protocol code of the device, in hexadecimal.
+
+		See USB specs for its meaning.
+
+What:		/sys/bus/usb/devices/usbX/bDeviceSubClass
+Description:
+		Subclass code of the device, in hexadecimal.
+
+		See USB specs for its meaning.
+
+What:		/sys/bus/usb/devices/usbX/bInterfaceClass
+Description:
+		Class code of the interface, in hexadecimal.
+
+		See USB specs for its meaning.
+
+What:		/sys/bus/usb/devices/usbX/bInterfaceNumber
+Description:
+		Interface number, in hexadecimal.
+
+		See USB specs for its meaning.
+
+What:		/sys/bus/usb/devices/usbX/bInterfaceProtocol
+Description:
+		Protocol code of the interface, in hexadecimal.
+
+		See USB specs for its meaning.
+
+What:		/sys/bus/usb/devices/usbX/bInterfaceSubClass
+Description:
+		Subclass code of the interface, in hexadecimal.
+
+		See USB specs for its meaning.
+
+What:		/sys/bus/usb/devices/usbX/bmAttributes
+Description:
+		Attributes of the current configuration, in hexadecimal.
+
+		See USB specs for its meaning.
+
+What:		/sys/bus/usb/devices/usbX/bMaxPacketSize0
+Description:
+		Maximum endpoint 0 packet size, in decimal.
+
+		See USB specs for its meaning.
+
+What:		/sys/bus/usb/devices/usbX/bMaxPower
+Description:
+		Maximum power consumption of the active configuration of
+		the device, in miliamperes.
+
+What:		/sys/bus/usb/devices/usbX/bNumConfigurations
+Description:
+		Number of the possible configurations of the device, in
+		decimal. The current configuration is controlled via:
+
+			/sys/bus/usb/devices/usbX/bConfigurationValue
+
+		See USB specs for its meaning.
+
+What:		/sys/bus/usb/devices/usbX/bNumEndpoints
+Description:
+		Number of endpoints used on this interface, in hexadecimal.
+
+		See USB specs for its meaning.
+
+What:		/sys/bus/usb/devices/usbX/bNumInterfaces
+Description:
+		Number of interfaces on this device, in decimal.
+
+What:		/sys/bus/usb/devices/usbX/busnum
+Description:
+		Number of the bus.
+
+What:		/sys/bus/usb/devices/usbX/configuration
+Description:
+		Contents of the string descriptor associated with the
+		current configuration. It may include the firmware version
+		of a device and/or its serial number.
+
+What:		/sys/bus/usb/devices/usbX/descriptors
+Description:
+		Contains the interface descriptors, in binary.
+
+What:		/sys/bus/usb/devices/usbX/idProduct
+Description:
+		Product ID, in hexadecimal.
+
+What:		/sys/bus/usb/devices/usbX/idVendor
+Description:
+		Vendor ID, in hexadecimal.
+
+What:		/sys/bus/usb/devices/usbX/devspec
+Description:
+		Displays the Device Tree Open Firmware node of the interface.
+
+What:		/sys/bus/usb/devices/usbX/avoid_reset_quirk
+Description:
+		Most devices have this set to zero.
+
+		If the value is 1, enable a USB quirk that prevents this
+		device to use reset.
+
+		(read/write)
+
+What:		/sys/bus/usb/devices/usbX/devnum
+Description:
+		USB interface device number, in decimal.
+
+What:		/sys/bus/usb/devices/usbX/devpath
+Description:
+		String containing the USB interface device path.
+
+What:		/sys/bus/usb/devices/usbX/manufacturer
+Description:
+		Vendor specific string containing the name of the
+		manufacturer of the device.
+
+What:		/sys/bus/usb/devices/usbX/maxchild
+Description:
+		Number of ports of an USB hub
+
+What:		/sys/bus/usb/devices/usbX/persist
+Description:
+		Keeps the device even if it gets disconnected.
+
+What:		/sys/bus/usb/devices/usbX/product
+Description:
+		Vendor specific string containing the name of the
+		device's product.
+
+What:		/sys/bus/usb/devices/usbX/speed
+Description:
+		Shows the device's max speed, according to the USB version,
+		in Mbps.
+		Can be:
+
+			=======		====================
+			Unknown		speed unknown
+			1.5		Low speed
+			15		Full speed
+			480		High Speed
+			5000		Super Speed
+			10000		Super Speed+
+			20000		Super Speed+ Gen 2x2
+			=======		====================
+
+What:		/sys/bus/usb/devices/usbX/supports_autosuspend
+Description:
+		Returns 1 if the device doesn't support autosuspend.
+		Otherwise, returns 0.
+
+What:		/sys/bus/usb/devices/usbX/urbnum
+Description:
+		Number of URBs submitted for the whole device.
+
+What:		/sys/bus/usb/devices/usbX/version
+Description:
+		String containing the USB device version, as encoded
+		at the BCD descriptor.
+
+What:		/sys/bus/usb/devices/usbX/power/autosuspend
+Description:
+		Time in milliseconds for the device to autosuspend. If the
+		value is negative, then autosuspend is prevented.
+
+		(read/write)
+
+What:		/sys/bus/usb/devices/usbX/power/active_duration
+Description:
+		The total time the device has not been suspended.
+
+What:		/sys/bus/usb/devices/usbX/power/connected_duration
+Description:
+		The total time (in msec) that the device has been connected.
+
+What:		/sys/bus/usb/devices/usbX/power/level
+Description:
+
+What:		/sys/bus/usb/devices/usbX/ep_<N>/bEndpointAddress
+Description:
+		The address of the endpoint described by this descriptor,
+		in hexadecimal. The endpoint direction on this bitmapped field
+		is also shown at:
+
+			/sys/bus/usb/devices/usbX/ep_<N>/direction
+
+		See USB specs for its meaning.
+
+What:		/sys/bus/usb/devices/usbX/ep_<N>/bInterval
+Description:
+		The interval of the endpoint as described on its descriptor,
+		in hexadecimal. The actual interval depends on the version
+		of the USB. Also shown in time units at
+		/sys/bus/usb/devices/usbX/ep_<N>/interval.
+
+What:		/sys/bus/usb/devices/usbX/ep_<N>/bLength
+Description:
+		Number of bytes of the endpoint descriptor, in hexadecimal.
+
+What:		/sys/bus/usb/devices/usbX/ep_<N>/bmAttributes
+Description:
+		Attributes which apply to the endpoint as described on its
+		descriptor, in hexadecimal. The endpoint type on this
+		bitmapped field is also shown at:
+
+			/sys/bus/usb/devices/usbX/ep_<N>/type
+
+		See USB specs for its meaning.
+
+What:		/sys/bus/usb/devices/usbX/ep_<N>/direction
+Description:
+		Direction of the endpoint. Can be:
+
+		    - both (on control endpoints)
+		    - in
+		    - out
+
+What:		/sys/bus/usb/devices/usbX/ep_<N>/interval
+Description:
+		Interval for polling endpoint for data transfers, in
+		milisseconds or microseconds.
+
+What:		/sys/bus/usb/devices/usbX/ep_<N>/type
+Description:
+		Descriptor type. Can be:
+
+		    - Control
+		    - Isoc
+		    - Bulk
+		    - Interrupt
+		    - unknown
+
+What:		/sys/bus/usb/devices/usbX/ep_<N>/wMaxPacketSize
+Description:
+		Maximum packet size this endpoint is capable of
+		sending or receiving, in hexadecimal.
-- 
2.31.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 15/17] ABI: obsolete/sysfs-bus-iio: add some missing blank lines
  2021-09-27 13:59 [PATCH 00/17] ABI: update files to reduce the documentation gap Mauro Carvalho Chehab
                   ` (13 preceding siblings ...)
  2021-09-27 13:59 ` [PATCH 14/17] ABI: sysfs-bus-usb: add missing sysfs fields Mauro Carvalho Chehab
@ 2021-09-27 13:59 ` Mauro Carvalho Chehab
  2021-09-27 13:59 ` [PATCH 16/17] ABI: sysfs-driver-ufs: Add another What for platform drivers Mauro Carvalho Chehab
  2021-09-27 13:59 ` [PATCH 17/17] ABI: sysfs-bus-platform: add modalias description Mauro Carvalho Chehab
  16 siblings, 0 replies; 27+ messages in thread
From: Mauro Carvalho Chehab @ 2021-09-27 13:59 UTC (permalink / raw)
  To: Linux Doc Mailing List, Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, Jonathan Cameron, linux-kernel

Avoid those warnings:
	Documentation/ABI/obsolete/sysfs-bus-iio:171: WARNING: Unexpected indentation.
	Documentation/ABI/obsolete/sysfs-bus-iio:12: WARNING: Unexpected indentation.
	Documentation/ABI/obsolete/sysfs-bus-iio:2: WARNING: Unexpected indentation.
	Documentation/ABI/obsolete/sysfs-bus-iio:149: WARNING: Unexpected indentation.

Fixes: caf0fb3bb38a ("iio: Documentation: move incompatible ABI to obsolete")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---

See [PATCH 00/17] at: https://lore.kernel.org/all/cover.1632750608.git.mchehab+huawei@kernel.org/

 Documentation/ABI/obsolete/sysfs-bus-iio | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/ABI/obsolete/sysfs-bus-iio b/Documentation/ABI/obsolete/sysfs-bus-iio
index c9531bb64816..b64394b0b374 100644
--- a/Documentation/ABI/obsolete/sysfs-bus-iio
+++ b/Documentation/ABI/obsolete/sysfs-bus-iio
@@ -6,6 +6,7 @@ Description:
 
 		Since Kernel 5.11, multiple buffers are supported.
 		so, it is better to use, instead:
+
 			/sys/bus/iio/devices/iio:deviceX/bufferY/length
 
 What:		/sys/bus/iio/devices/iio:deviceX/buffer/enable
@@ -17,6 +18,7 @@ Description:
 
 		Since Kernel 5.11, multiple buffers are supported.
 		so, it is better to use, instead:
+
 			/sys/bus/iio/devices/iio:deviceX/bufferY/enable
 
 What:		/sys/bus/iio/devices/iio:deviceX/scan_elements
@@ -165,6 +167,7 @@ Description:
 
 		Since Kernel 5.11, multiple buffers are supported.
 		so, it is better to use, instead:
+
 			/sys/bus/iio/devices/iio:deviceX/bufferY/watermark
 
 What:		/sys/bus/iio/devices/iio:deviceX/buffer/data_available
@@ -179,4 +182,5 @@ Description:
 
 		Since Kernel 5.11, multiple buffers are supported.
 		so, it is better to use, instead:
+
 			/sys/bus/iio/devices/iio:deviceX/bufferY/data_available
-- 
2.31.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 16/17] ABI: sysfs-driver-ufs: Add another What for platform drivers
  2021-09-27 13:59 [PATCH 00/17] ABI: update files to reduce the documentation gap Mauro Carvalho Chehab
                   ` (14 preceding siblings ...)
  2021-09-27 13:59 ` [PATCH 15/17] ABI: obsolete/sysfs-bus-iio: add some missing blank lines Mauro Carvalho Chehab
@ 2021-09-27 13:59 ` Mauro Carvalho Chehab
  2021-09-29  6:32   ` Avri Altman
  2021-09-27 13:59 ` [PATCH 17/17] ABI: sysfs-bus-platform: add modalias description Mauro Carvalho Chehab
  16 siblings, 1 reply; 27+ messages in thread
From: Mauro Carvalho Chehab @ 2021-09-27 13:59 UTC (permalink / raw)
  To: Linux Doc Mailing List, Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, Martin K. Petersen,
	Adrian Hunter, Avri Altman, Bean Huo, Can Guo, Daejun Park,
	Lukas Bulwahn, linux-kernel

The current what expressions:
	What:          /sys/bus/platform/drivers/ufshcd/*/...

Doesn't actually match what (some?) platform drivers actually
export. For instance, drivers/scsi/ufs/ufs-hisi.c actually
creates the sysfs struct for ufshcd inside this directory:

	/sys/devices/platform/soc/ff3c0000.ufs

Which has those aliases:

	/sys/devices/virtual/devlink/platform:fff35000.crg_ctrl--platform:ff3c0000.ufs/consumer/
	/sys/bus/platform/drivers/ufshcd-hisi/ff3c0000.ufs/
	/sys/bus/platform/devices/soc/ff3c0000.ufs/
	/sys/bus/platform/devices/ff3c0000.ufs/

So, add another What: for such files that will match the
device ufs entries, e. g.:

	What:          /sys/bus/platform/devices/*.ufs/

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---

See [PATCH 00/17] at: https://lore.kernel.org/all/cover.1632750608.git.mchehab+huawei@kernel.org/

 Documentation/ABI/testing/sysfs-driver-ufs | 126 +++++++++++++++++++++
 1 file changed, 126 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-driver-ufs b/Documentation/ABI/testing/sysfs-driver-ufs
index ec3a7149ced5..863cc4897277 100644
--- a/Documentation/ABI/testing/sysfs-driver-ufs
+++ b/Documentation/ABI/testing/sysfs-driver-ufs
@@ -13,6 +13,7 @@ Description:
 		Interface specification for more details.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/device_type
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/device_type
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the device type. This is one of the UFS
@@ -22,6 +23,7 @@ Description:	This file shows the device type. This is one of the UFS
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/device_class
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/device_class
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the device class. This is one of the UFS
@@ -31,6 +33,7 @@ Description:	This file shows the device class. This is one of the UFS
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/device_sub_class
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/device_sub_class
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the UFS storage subclass. This is one of
@@ -40,6 +43,7 @@ Description:	This file shows the UFS storage subclass. This is one of
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/protocol
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/protocol
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the protocol supported by an UFS device.
@@ -50,6 +54,7 @@ Description:	This file shows the protocol supported by an UFS device.
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/number_of_luns
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/number_of_luns
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows number of logical units. This is one of
@@ -59,6 +64,7 @@ Description:	This file shows number of logical units. This is one of
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/number_of_wluns
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/number_of_wluns
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows number of well known logical units.
@@ -69,6 +75,7 @@ Description:	This file shows number of well known logical units.
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/boot_enable
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/boot_enable
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows value that indicates whether the device is
@@ -79,6 +86,7 @@ Description:	This file shows value that indicates whether the device is
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/descriptor_access_enable
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/descriptor_access_enable
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows value that indicates whether the device
@@ -90,6 +98,7 @@ Description:	This file shows value that indicates whether the device
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/initial_power_mode
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/initial_power_mode
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows value that defines the power mode after
@@ -100,6 +109,7 @@ Description:	This file shows value that defines the power mode after
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/high_priority_lun
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/high_priority_lun
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the high priority lun. This is one of
@@ -109,6 +119,7 @@ Description:	This file shows the high priority lun. This is one of
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/secure_removal_type
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/secure_removal_type
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the secure removal type. This is one of
@@ -118,6 +129,7 @@ Description:	This file shows the secure removal type. This is one of
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/support_security_lun
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/support_security_lun
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows whether the security lun is supported.
@@ -128,6 +140,7 @@ Description:	This file shows whether the security lun is supported.
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/bkops_termination_latency
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/bkops_termination_latency
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the background operations termination
@@ -138,6 +151,7 @@ Description:	This file shows the background operations termination
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/initial_active_icc_level
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/initial_active_icc_level
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the initial active ICC level. This is one
@@ -147,6 +161,7 @@ Description:	This file shows the initial active ICC level. This is one
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/specification_version
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/specification_version
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the specification version. This is one
@@ -156,6 +171,7 @@ Description:	This file shows the specification version. This is one
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/manufacturing_date
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/manufacturing_date
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the manufacturing date in BCD format.
@@ -166,6 +182,7 @@ Description:	This file shows the manufacturing date in BCD format.
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/manufacturer_id
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/manufacturer_id
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the manufacturer ID. This is one of the
@@ -175,6 +192,7 @@ Description:	This file shows the manufacturer ID. This is one of the
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/rtt_capability
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/rtt_capability
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the maximum number of outstanding RTTs
@@ -185,6 +203,7 @@ Description:	This file shows the maximum number of outstanding RTTs
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/rtc_update
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/rtc_update
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the frequency and method of the realtime
@@ -195,6 +214,7 @@ Description:	This file shows the frequency and method of the realtime
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/ufs_features
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/ufs_features
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows which features are supported by the device.
@@ -205,6 +225,7 @@ Description:	This file shows which features are supported by the device.
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/ffu_timeout
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/ffu_timeout
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the FFU timeout. This is one of the
@@ -214,6 +235,7 @@ Description:	This file shows the FFU timeout. This is one of the
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/queue_depth
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/queue_depth
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the device queue depth. This is one of the
@@ -223,6 +245,7 @@ Description:	This file shows the device queue depth. This is one of the
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/device_version
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/device_version
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the device version. This is one of the
@@ -232,6 +255,7 @@ Description:	This file shows the device version. This is one of the
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/number_of_secure_wpa
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/number_of_secure_wpa
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows number of secure write protect areas
@@ -242,6 +266,7 @@ Description:	This file shows number of secure write protect areas
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/psa_max_data_size
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/psa_max_data_size
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the maximum amount of data that may be
@@ -253,6 +278,7 @@ Description:	This file shows the maximum amount of data that may be
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/psa_state_timeout
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/psa_state_timeout
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the command maximum timeout for a change
@@ -264,6 +290,7 @@ Description:	This file shows the command maximum timeout for a change
 
 
 What:		/sys/bus/platform/drivers/ufshcd/*/interconnect_descriptor/unipro_version
+What:		/sys/bus/platform/devices/*.ufs/interconnect_descriptor/unipro_version
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the MIPI UniPro version number in BCD format.
@@ -274,6 +301,7 @@ Description:	This file shows the MIPI UniPro version number in BCD format.
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/interconnect_descriptor/mphy_version
+What:		/sys/bus/platform/devices/*.ufs/interconnect_descriptor/mphy_version
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the MIPI M-PHY version number in BCD format.
@@ -285,6 +313,7 @@ Description:	This file shows the MIPI M-PHY version number in BCD format.
 
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/raw_device_capacity
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/raw_device_capacity
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the total memory quantity available to
@@ -296,6 +325,7 @@ Description:	This file shows the total memory quantity available to
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/max_number_of_luns
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/max_number_of_luns
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the maximum number of logical units
@@ -306,6 +336,7 @@ Description:	This file shows the maximum number of logical units
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/segment_size
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/segment_size
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the segment size. This is one of the UFS
@@ -315,6 +346,7 @@ Description:	This file shows the segment size. This is one of the UFS
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/allocation_unit_size
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/allocation_unit_size
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the allocation unit size. This is one of
@@ -324,6 +356,7 @@ Description:	This file shows the allocation unit size. This is one of
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/min_addressable_block_size
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/min_addressable_block_size
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the minimum addressable block size. This
@@ -334,6 +367,7 @@ Description:	This file shows the minimum addressable block size. This
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/optimal_read_block_size
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/optimal_read_block_size
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the optimal read block size. This is one
@@ -344,6 +378,7 @@ Description:	This file shows the optimal read block size. This is one
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/optimal_write_block_size
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/optimal_write_block_size
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the optimal write block size. This is one
@@ -354,6 +389,7 @@ Description:	This file shows the optimal write block size. This is one
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/max_in_buffer_size
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/max_in_buffer_size
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the maximum data-in buffer size. This
@@ -364,6 +400,7 @@ Description:	This file shows the maximum data-in buffer size. This
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/max_out_buffer_size
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/max_out_buffer_size
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the maximum data-out buffer size. This
@@ -374,6 +411,7 @@ Description:	This file shows the maximum data-out buffer size. This
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/rpmb_rw_size
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/rpmb_rw_size
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the maximum number of RPMB frames allowed
@@ -384,6 +422,7 @@ Description:	This file shows the maximum number of RPMB frames allowed
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/dyn_capacity_resource_policy
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/dyn_capacity_resource_policy
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the dynamic capacity resource policy. This
@@ -394,6 +433,7 @@ Description:	This file shows the dynamic capacity resource policy. This
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/data_ordering
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/data_ordering
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows support for out-of-order data transfer.
@@ -404,6 +444,7 @@ Description:	This file shows support for out-of-order data transfer.
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/max_number_of_contexts
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/max_number_of_contexts
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows maximum available number of contexts which
@@ -414,6 +455,7 @@ Description:	This file shows maximum available number of contexts which
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/sys_data_tag_unit_size
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/sys_data_tag_unit_size
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows system data tag unit size. This is one of
@@ -423,6 +465,7 @@ Description:	This file shows system data tag unit size. This is one of
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/sys_data_tag_resource_size
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/sys_data_tag_resource_size
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows maximum storage area size allocated by
@@ -434,6 +477,7 @@ Description:	This file shows maximum storage area size allocated by
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/secure_removal_types
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/secure_removal_types
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows supported secure removal types. This is
@@ -444,6 +488,7 @@ Description:	This file shows supported secure removal types. This is
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/memory_types
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/memory_types
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows supported memory types. This is one of
@@ -454,6 +499,7 @@ Description:	This file shows supported memory types. This is one of
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/*_memory_max_alloc_units
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/*_memory_max_alloc_units
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the maximum number of allocation units for
@@ -465,6 +511,7 @@ Description:	This file shows the maximum number of allocation units for
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/*_memory_capacity_adjustment_factor
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/*_memory_capacity_adjustment_factor
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the memory capacity adjustment factor for
@@ -477,6 +524,7 @@ Description:	This file shows the memory capacity adjustment factor for
 
 
 What:		/sys/bus/platform/drivers/ufshcd/*/health_descriptor/eol_info
+What:		/sys/bus/platform/devices/*.ufs/health_descriptor/eol_info
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows preend of life information. This is one
@@ -487,6 +535,7 @@ Description:	This file shows preend of life information. This is one
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/health_descriptor/life_time_estimation_a
+What:		/sys/bus/platform/devices/*.ufs/health_descriptor/life_time_estimation_a
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows indication of the device life time
@@ -497,6 +546,7 @@ Description:	This file shows indication of the device life time
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/health_descriptor/life_time_estimation_b
+What:		/sys/bus/platform/devices/*.ufs/health_descriptor/life_time_estimation_b
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows indication of the device life time
@@ -508,6 +558,7 @@ Description:	This file shows indication of the device life time
 
 
 What:		/sys/bus/platform/drivers/ufshcd/*/power_descriptor/active_icc_levels_vcc*
+What:		/sys/bus/platform/devices/*.ufs/power_descriptor/active_icc_levels_vcc*
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows maximum VCC, VCCQ and VCCQ2 value for
@@ -519,6 +570,7 @@ Description:	This file shows maximum VCC, VCCQ and VCCQ2 value for
 
 
 What:		/sys/bus/platform/drivers/ufshcd/*/string_descriptors/manufacturer_name
+What:		/sys/bus/platform/devices/*.ufs/string_descriptors/manufacturer_name
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file contains a device manufacturer name string.
@@ -528,6 +580,7 @@ Description:	This file contains a device manufacturer name string.
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/string_descriptors/product_name
+What:		/sys/bus/platform/devices/*.ufs/string_descriptors/product_name
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file contains a product name string. The full information
@@ -536,6 +589,7 @@ Description:	This file contains a product name string. The full information
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/string_descriptors/oem_id
+What:		/sys/bus/platform/devices/*.ufs/string_descriptors/oem_id
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file contains a OEM ID string. The full information
@@ -544,6 +598,7 @@ Description:	This file contains a OEM ID string. The full information
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/string_descriptors/serial_number
+What:		/sys/bus/platform/devices/*.ufs/string_descriptors/serial_number
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file contains a device serial number string. The full
@@ -553,6 +608,7 @@ Description:	This file contains a device serial number string. The full
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/string_descriptors/product_revision
+What:		/sys/bus/platform/devices/*.ufs/string_descriptors/product_revision
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file contains a product revision string. The full
@@ -684,6 +740,7 @@ Description:	This file shows the granularity of the LUN. This is one of
 
 
 What:		/sys/bus/platform/drivers/ufshcd/*/flags/device_init
+What:		/sys/bus/platform/devices/*.ufs/flags/device_init
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the device init status. The full information
@@ -692,6 +749,7 @@ Description:	This file shows the device init status. The full information
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/flags/permanent_wpe
+What:		/sys/bus/platform/devices/*.ufs/flags/permanent_wpe
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows whether permanent write protection is enabled.
@@ -701,6 +759,7 @@ Description:	This file shows whether permanent write protection is enabled.
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/flags/power_on_wpe
+What:		/sys/bus/platform/devices/*.ufs/flags/power_on_wpe
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows whether write protection is enabled on all
@@ -711,6 +770,7 @@ Description:	This file shows whether write protection is enabled on all
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/flags/bkops_enable
+What:		/sys/bus/platform/devices/*.ufs/flags/bkops_enable
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows whether the device background operations are
@@ -720,6 +780,7 @@ Description:	This file shows whether the device background operations are
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/flags/life_span_mode_enable
+What:		/sys/bus/platform/devices/*.ufs/flags/life_span_mode_enable
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows whether the device life span mode is enabled.
@@ -729,6 +790,7 @@ Description:	This file shows whether the device life span mode is enabled.
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/flags/phy_resource_removal
+What:		/sys/bus/platform/devices/*.ufs/flags/phy_resource_removal
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows whether physical resource removal is enable.
@@ -738,6 +800,7 @@ Description:	This file shows whether physical resource removal is enable.
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/flags/busy_rtc
+What:		/sys/bus/platform/devices/*.ufs/flags/busy_rtc
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows whether the device is executing internal
@@ -747,6 +810,7 @@ Description:	This file shows whether the device is executing internal
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/flags/disable_fw_update
+What:		/sys/bus/platform/devices/*.ufs/flags/disable_fw_update
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows whether the device FW update is permanently
@@ -757,6 +821,7 @@ Description:	This file shows whether the device FW update is permanently
 
 
 What:		/sys/bus/platform/drivers/ufshcd/*/attributes/boot_lun_enabled
+What:		/sys/bus/platform/devices/*.ufs/attributes/boot_lun_enabled
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file provides the boot lun enabled UFS device attribute.
@@ -766,6 +831,7 @@ Description:	This file provides the boot lun enabled UFS device attribute.
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/attributes/current_power_mode
+What:		/sys/bus/platform/devices/*.ufs/attributes/current_power_mode
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file provides the current power mode UFS device attribute.
@@ -775,6 +841,7 @@ Description:	This file provides the current power mode UFS device attribute.
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/attributes/active_icc_level
+What:		/sys/bus/platform/devices/*.ufs/attributes/active_icc_level
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file provides the active icc level UFS device attribute.
@@ -784,6 +851,7 @@ Description:	This file provides the active icc level UFS device attribute.
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/attributes/ooo_data_enabled
+What:		/sys/bus/platform/devices/*.ufs/attributes/ooo_data_enabled
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file provides the out of order data transfer enabled UFS
@@ -793,6 +861,7 @@ Description:	This file provides the out of order data transfer enabled UFS
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/attributes/bkops_status
+What:		/sys/bus/platform/devices/*.ufs/attributes/bkops_status
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file provides the background operations status UFS device
@@ -802,6 +871,7 @@ Description:	This file provides the background operations status UFS device
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/attributes/purge_status
+What:		/sys/bus/platform/devices/*.ufs/attributes/purge_status
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file provides the purge operation status UFS device
@@ -811,6 +881,7 @@ Description:	This file provides the purge operation status UFS device
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/attributes/max_data_in_size
+What:		/sys/bus/platform/devices/*.ufs/attributes/max_data_in_size
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the maximum data size in a DATA IN
@@ -820,6 +891,7 @@ Description:	This file shows the maximum data size in a DATA IN
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/attributes/max_data_out_size
+What:		/sys/bus/platform/devices/*.ufs/attributes/max_data_out_size
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the maximum number of bytes that can be
@@ -829,6 +901,7 @@ Description:	This file shows the maximum number of bytes that can be
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/attributes/reference_clock_frequency
+What:		/sys/bus/platform/devices/*.ufs/attributes/reference_clock_frequency
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file provides the reference clock frequency UFS device
@@ -838,6 +911,7 @@ Description:	This file provides the reference clock frequency UFS device
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/attributes/configuration_descriptor_lock
+What:		/sys/bus/platform/devices/*.ufs/attributes/configuration_descriptor_lock
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows whether the configuration descriptor is locked.
@@ -845,6 +919,7 @@ Description:	This file shows whether the configuration descriptor is locked.
 		UFS specifications 2.1. The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/attributes/max_number_of_rtt
+What:		/sys/bus/platform/devices/*.ufs/attributes/max_number_of_rtt
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file provides the maximum current number of
@@ -855,6 +930,7 @@ Description:	This file provides the maximum current number of
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/attributes/exception_event_control
+What:		/sys/bus/platform/devices/*.ufs/attributes/exception_event_control
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file provides the exception event control UFS device
@@ -864,6 +940,7 @@ Description:	This file provides the exception event control UFS device
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/attributes/exception_event_status
+What:		/sys/bus/platform/devices/*.ufs/attributes/exception_event_status
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file provides the exception event status UFS device
@@ -873,6 +950,7 @@ Description:	This file provides the exception event status UFS device
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/attributes/ffu_status
+What:		/sys/bus/platform/devices/*.ufs/attributes/ffu_status
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file provides the ffu status UFS device attribute.
@@ -882,6 +960,7 @@ Description:	This file provides the ffu status UFS device attribute.
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/attributes/psa_state
+What:		/sys/bus/platform/devices/*.ufs/attributes/psa_state
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file show the PSA feature status. The full information
@@ -890,6 +969,7 @@ Description:	This file show the PSA feature status. The full information
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/attributes/psa_data_size
+What:		/sys/bus/platform/devices/*.ufs/attributes/psa_data_size
 Date:		February 2018
 Contact:	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
 Description:	This file shows the amount of data that the host plans to
@@ -912,6 +992,7 @@ Description:	This file shows the The amount of physical memory needed
 
 
 What:		/sys/bus/platform/drivers/ufshcd/*/rpm_lvl
+What:		/sys/bus/platform/devices/*.ufs/rpm_lvl
 Date:		September 2014
 Contact:	Subhash Jadavani <subhashj@codeaurora.org>
 Description:	This entry could be used to set or show the UFS device
@@ -938,6 +1019,7 @@ Description:	This entry could be used to set or show the UFS device
 		==  ====================================================
 
 What:		/sys/bus/platform/drivers/ufshcd/*/rpm_target_dev_state
+What:		/sys/bus/platform/devices/*.ufs/rpm_target_dev_state
 Date:		February 2018
 Contact:	Subhash Jadavani <subhashj@codeaurora.org>
 Description:	This entry shows the target power mode of an UFS device
@@ -946,6 +1028,7 @@ Description:	This entry shows the target power mode of an UFS device
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/rpm_target_link_state
+What:		/sys/bus/platform/devices/*.ufs/rpm_target_link_state
 Date:		February 2018
 Contact:	Subhash Jadavani <subhashj@codeaurora.org>
 Description:	This entry shows the target state of an UFS UIC link
@@ -954,6 +1037,7 @@ Description:	This entry shows the target state of an UFS UIC link
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/spm_lvl
+What:		/sys/bus/platform/devices/*.ufs/spm_lvl
 Date:		September 2014
 Contact:	Subhash Jadavani <subhashj@codeaurora.org>
 Description:	This entry could be used to set or show the UFS device
@@ -980,6 +1064,7 @@ Description:	This entry could be used to set or show the UFS device
 		==  ====================================================
 
 What:		/sys/bus/platform/drivers/ufshcd/*/spm_target_dev_state
+What:		/sys/bus/platform/devices/*.ufs/spm_target_dev_state
 Date:		February 2018
 Contact:	Subhash Jadavani <subhashj@codeaurora.org>
 Description:	This entry shows the target power mode of an UFS device
@@ -988,6 +1073,7 @@ Description:	This entry shows the target power mode of an UFS device
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/spm_target_link_state
+What:		/sys/bus/platform/devices/*.ufs/spm_target_link_state
 Date:		February 2018
 Contact:	Subhash Jadavani <subhashj@codeaurora.org>
 Description:	This entry shows the target state of an UFS UIC link
@@ -996,6 +1082,7 @@ Description:	This entry shows the target state of an UFS UIC link
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/monitor/monitor_enable
+What:		/sys/bus/platform/devices/*.ufs/monitor/monitor_enable
 Date:		January 2021
 Contact:	Can Guo <cang@codeaurora.org>
 Description:	This file shows the status of performance monitor enablement
@@ -1003,6 +1090,7 @@ Description:	This file shows the status of performance monitor enablement
 		is stopped, the performance data collected is also cleared.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/monitor/monitor_chunk_size
+What:		/sys/bus/platform/devices/*.ufs/monitor/monitor_chunk_size
 Date:		January 2021
 Contact:	Can Guo <cang@codeaurora.org>
 Description:	This file tells the monitor to focus on requests transferring
@@ -1010,6 +1098,7 @@ Description:	This file tells the monitor to focus on requests transferring
 		It can only be changed when monitor is disabled.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/monitor/read_total_sectors
+What:		/sys/bus/platform/devices/*.ufs/monitor/read_total_sectors
 Date:		January 2021
 Contact:	Can Guo <cang@codeaurora.org>
 Description:	This file shows how many sectors (in 512 Bytes) have been
@@ -1018,6 +1107,7 @@ Description:	This file shows how many sectors (in 512 Bytes) have been
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/monitor/read_total_busy
+What:		/sys/bus/platform/devices/*.ufs/monitor/read_total_busy
 Date:		January 2021
 Contact:	Can Guo <cang@codeaurora.org>
 Description:	This file shows how long (in micro seconds) has been spent
@@ -1026,6 +1116,7 @@ Description:	This file shows how long (in micro seconds) has been spent
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/monitor/read_nr_requests
+What:		/sys/bus/platform/devices/*.ufs/monitor/read_nr_requests
 Date:		January 2021
 Contact:	Can Guo <cang@codeaurora.org>
 Description:	This file shows how many read requests have been sent after
@@ -1034,6 +1125,7 @@ Description:	This file shows how many read requests have been sent after
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/monitor/read_req_latency_max
+What:		/sys/bus/platform/devices/*.ufs/monitor/read_req_latency_max
 Date:		January 2021
 Contact:	Can Guo <cang@codeaurora.org>
 Description:	This file shows the maximum latency (in micro seconds) of
@@ -1042,6 +1134,7 @@ Description:	This file shows the maximum latency (in micro seconds) of
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/monitor/read_req_latency_min
+What:		/sys/bus/platform/devices/*.ufs/monitor/read_req_latency_min
 Date:		January 2021
 Contact:	Can Guo <cang@codeaurora.org>
 Description:	This file shows the minimum latency (in micro seconds) of
@@ -1050,6 +1143,7 @@ Description:	This file shows the minimum latency (in micro seconds) of
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/monitor/read_req_latency_avg
+What:		/sys/bus/platform/devices/*.ufs/monitor/read_req_latency_avg
 Date:		January 2021
 Contact:	Can Guo <cang@codeaurora.org>
 Description:	This file shows the average latency (in micro seconds) of
@@ -1058,6 +1152,7 @@ Description:	This file shows the average latency (in micro seconds) of
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/monitor/read_req_latency_sum
+What:		/sys/bus/platform/devices/*.ufs/monitor/read_req_latency_sum
 Date:		January 2021
 Contact:	Can Guo <cang@codeaurora.org>
 Description:	This file shows the total latency (in micro seconds) of
@@ -1066,6 +1161,7 @@ Description:	This file shows the total latency (in micro seconds) of
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/monitor/write_total_sectors
+What:		/sys/bus/platform/devices/*.ufs/monitor/write_total_sectors
 Date:		January 2021
 Contact:	Can Guo <cang@codeaurora.org>
 Description:	This file shows how many sectors (in 512 Bytes) have been sent
@@ -1074,6 +1170,7 @@ Description:	This file shows how many sectors (in 512 Bytes) have been sent
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/monitor/write_total_busy
+What:		/sys/bus/platform/devices/*.ufs/monitor/write_total_busy
 Date:		January 2021
 Contact:	Can Guo <cang@codeaurora.org>
 Description:	This file shows how long (in micro seconds) has been spent
@@ -1082,6 +1179,7 @@ Description:	This file shows how long (in micro seconds) has been spent
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/monitor/write_nr_requests
+What:		/sys/bus/platform/devices/*.ufs/monitor/write_nr_requests
 Date:		January 2021
 Contact:	Can Guo <cang@codeaurora.org>
 Description:	This file shows how many write requests have been sent after
@@ -1090,6 +1188,7 @@ Description:	This file shows how many write requests have been sent after
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/monitor/write_req_latency_max
+What:		/sys/bus/platform/devices/*.ufs/monitor/write_req_latency_max
 Date:		January 2021
 Contact:	Can Guo <cang@codeaurora.org>
 Description:	This file shows the maximum latency (in micro seconds) of write
@@ -1098,6 +1197,7 @@ Description:	This file shows the maximum latency (in micro seconds) of write
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/monitor/write_req_latency_min
+What:		/sys/bus/platform/devices/*.ufs/monitor/write_req_latency_min
 Date:		January 2021
 Contact:	Can Guo <cang@codeaurora.org>
 Description:	This file shows the minimum latency (in micro seconds) of write
@@ -1106,6 +1206,7 @@ Description:	This file shows the minimum latency (in micro seconds) of write
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/monitor/write_req_latency_avg
+What:		/sys/bus/platform/devices/*.ufs/monitor/write_req_latency_avg
 Date:		January 2021
 Contact:	Can Guo <cang@codeaurora.org>
 Description:	This file shows the average latency (in micro seconds) of write
@@ -1114,6 +1215,7 @@ Description:	This file shows the average latency (in micro seconds) of write
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/monitor/write_req_latency_sum
+What:		/sys/bus/platform/devices/*.ufs/monitor/write_req_latency_sum
 Date:		January 2021
 Contact:	Can Guo <cang@codeaurora.org>
 Description:	This file shows the total latency (in micro seconds) of write
@@ -1122,6 +1224,7 @@ Description:	This file shows the total latency (in micro seconds) of write
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/wb_presv_us_en
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/wb_presv_us_en
 Date:		June 2020
 Contact:	Asutosh Das <asutoshd@codeaurora.org>
 Description:	This entry shows if preserve user-space was configured
@@ -1129,6 +1232,7 @@ Description:	This entry shows if preserve user-space was configured
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/wb_shared_alloc_units
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/wb_shared_alloc_units
 Date:		June 2020
 Contact:	Asutosh Das <asutoshd@codeaurora.org>
 Description:	This entry shows the shared allocated units of WB buffer
@@ -1136,6 +1240,7 @@ Description:	This entry shows the shared allocated units of WB buffer
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/wb_type
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/wb_type
 Date:		June 2020
 Contact:	Asutosh Das <asutoshd@codeaurora.org>
 Description:	This entry shows the configured WB type.
@@ -1144,6 +1249,7 @@ Description:	This entry shows the configured WB type.
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_buff_cap_adj
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/wb_buff_cap_adj
 Date:		June 2020
 Contact:	Asutosh Das <asutoshd@codeaurora.org>
 Description:	This entry shows the total user-space decrease in shared
@@ -1154,6 +1260,7 @@ Description:	This entry shows the total user-space decrease in shared
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_max_alloc_units
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/wb_max_alloc_units
 Date:		June 2020
 Contact:	Asutosh Das <asutoshd@codeaurora.org>
 Description:	This entry shows the Maximum total WriteBooster Buffer size
@@ -1162,6 +1269,7 @@ Description:	This entry shows the Maximum total WriteBooster Buffer size
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_max_wb_luns
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/wb_max_wb_luns
 Date:		June 2020
 Contact:	Asutosh Das <asutoshd@codeaurora.org>
 Description:	This entry shows the maximum number of luns that can support
@@ -1170,6 +1278,7 @@ Description:	This entry shows the maximum number of luns that can support
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_sup_red_type
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/wb_sup_red_type
 Date:		June 2020
 Contact:	Asutosh Das <asutoshd@codeaurora.org>
 Description:	The supportability of user space reduction mode
@@ -1184,6 +1293,7 @@ Description:	The supportability of user space reduction mode
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_sup_wb_type
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/wb_sup_wb_type
 Date:		June 2020
 Contact:	Asutosh Das <asutoshd@codeaurora.org>
 Description:	The supportability of WriteBooster Buffer type.
@@ -1198,6 +1308,7 @@ Description:	The supportability of WriteBooster Buffer type.
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/flags/wb_enable
+What:		/sys/bus/platform/devices/*.ufs/flags/wb_enable
 Date:		June 2020
 Contact:	Asutosh Das <asutoshd@codeaurora.org>
 Description:	This entry shows the status of WriteBooster.
@@ -1210,6 +1321,7 @@ Description:	This entry shows the status of WriteBooster.
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/flags/wb_flush_en
+What:		/sys/bus/platform/devices/*.ufs/flags/wb_flush_en
 Date:		June 2020
 Contact:	Asutosh Das <asutoshd@codeaurora.org>
 Description:	This entry shows if flush is enabled.
@@ -1222,6 +1334,7 @@ Description:	This entry shows if flush is enabled.
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/flags/wb_flush_during_h8
+What:		/sys/bus/platform/devices/*.ufs/flags/wb_flush_during_h8
 Date:		June 2020
 Contact:	Asutosh Das <asutoshd@codeaurora.org>
 Description:	Flush WriteBooster Buffer during hibernate state.
@@ -1236,6 +1349,7 @@ Description:	Flush WriteBooster Buffer during hibernate state.
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/attributes/wb_avail_buf
+What:		/sys/bus/platform/devices/*.ufs/attributes/wb_avail_buf
 Date:		June 2020
 Contact:	Asutosh Das <asutoshd@codeaurora.org>
 Description:	This entry shows the amount of unused WriteBooster buffer
@@ -1244,6 +1358,7 @@ Description:	This entry shows the amount of unused WriteBooster buffer
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/attributes/wb_cur_buf
+What:		/sys/bus/platform/devices/*.ufs/attributes/wb_cur_buf
 Date:		June 2020
 Contact:	Asutosh Das <asutoshd@codeaurora.org>
 Description:	This entry shows the amount of unused current buffer.
@@ -1251,6 +1366,7 @@ Description:	This entry shows the amount of unused current buffer.
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/attributes/wb_flush_status
+What:		/sys/bus/platform/devices/*.ufs/attributes/wb_flush_status
 Date:		June 2020
 Contact:	Asutosh Das <asutoshd@codeaurora.org>
 Description:	This entry shows the flush operation status.
@@ -1267,6 +1383,7 @@ Description:	This entry shows the flush operation status.
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/attributes/wb_life_time_est
+What:		/sys/bus/platform/devices/*.ufs/attributes/wb_life_time_est
 Date:		June 2020
 Contact:	Asutosh Das <asutoshd@codeaurora.org>
 Description:	This entry shows an indication of the WriteBooster Buffer
@@ -1289,6 +1406,7 @@ Description:	This entry shows the configured size of WriteBooster buffer.
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/wb_on
+What:		/sys/bus/platform/devices/*.ufs/wb_on
 Date:		January 2021
 Contact:	Bean Huo <beanhuo@micron.com>
 Description:	This node is used to set or display whether UFS WriteBooster is
@@ -1300,6 +1418,7 @@ Description:	This node is used to set or display whether UFS WriteBooster is
 		disable/enable WriteBooster through this sysfs node.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/hpb_version
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/hpb_version
 Date:		June 2021
 Contact:	Daejun Park <daejun7.park@samsung.com>
 Description:	This entry shows the HPB specification version.
@@ -1310,6 +1429,7 @@ Description:	This entry shows the HPB specification version.
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/hpb_control
+What:		/sys/bus/platform/devices/*.ufs/device_descriptor/hpb_control
 Date:		June 2021
 Contact:	Daejun Park <daejun7.park@samsung.com>
 Description:	This entry shows an indication of the HPB control mode.
@@ -1319,6 +1439,7 @@ Description:	This entry shows an indication of the HPB control mode.
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/hpb_region_size
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/hpb_region_size
 Date:		June 2021
 Contact:	Daejun Park <daejun7.park@samsung.com>
 Description:	This entry shows the bHPBRegionSize which can be calculated
@@ -1328,6 +1449,7 @@ Description:	This entry shows the bHPBRegionSize which can be calculated
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/hpb_number_lu
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/hpb_number_lu
 Date:		June 2021
 Contact:	Daejun Park <daejun7.park@samsung.com>
 Description:	This entry shows the maximum number of HPB LU supported	by
@@ -1338,6 +1460,7 @@ Description:	This entry shows the maximum number of HPB LU supported	by
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/hpb_subregion_size
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/hpb_subregion_size
 Date:		June 2021
 Contact:	Daejun Park <daejun7.park@samsung.com>
 Description:	This entry shows the bHPBSubRegionSize, which can be
@@ -1349,6 +1472,7 @@ Description:	This entry shows the bHPBSubRegionSize, which can be
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/hpb_max_active_regions
+What:		/sys/bus/platform/devices/*.ufs/geometry_descriptor/hpb_max_active_regions
 Date:		June 2021
 Contact:	Daejun Park <daejun7.park@samsung.com>
 Description:	This entry shows the maximum number of active HPB regions that
@@ -1434,6 +1558,7 @@ Description:	This entry shows the requeue timeout threshold for write buffer
 		this entry.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/attributes/max_data_size_hpb_single_cmd
+What:		/sys/bus/platform/devices/*.ufs/attributes/max_data_size_hpb_single_cmd
 Date:		June 2021
 Contact:	Daejun Park <daejun7.park@samsung.com>
 Description:	This entry shows the maximum HPB data size for using a single HPB
@@ -1450,6 +1575,7 @@ Description:	This entry shows the maximum HPB data size for using a single HPB
 		The file is read only.
 
 What:		/sys/bus/platform/drivers/ufshcd/*/flags/hpb_enable
+What:		/sys/bus/platform/devices/*.ufs/flags/hpb_enable
 Date:		June 2021
 Contact:	Daejun Park <daejun7.park@samsung.com>
 Description:	This entry shows the status of HPB.
-- 
2.31.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 17/17] ABI: sysfs-bus-platform: add modalias description
  2021-09-27 13:59 [PATCH 00/17] ABI: update files to reduce the documentation gap Mauro Carvalho Chehab
                   ` (15 preceding siblings ...)
  2021-09-27 13:59 ` [PATCH 16/17] ABI: sysfs-driver-ufs: Add another What for platform drivers Mauro Carvalho Chehab
@ 2021-09-27 13:59 ` Mauro Carvalho Chehab
  2021-09-27 21:00   ` Barry Song
  16 siblings, 1 reply; 27+ messages in thread
From: Mauro Carvalho Chehab @ 2021-09-27 13:59 UTC (permalink / raw)
  To: Linux Doc Mailing List, Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, Barry Song,
	Bjorn Helgaas, Marc Zyngier, Thomas Gleixner, linux-kernel

Define the modalias parameter for platform devices, including
the ones exposed via devicetree.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---

See [PATCH 00/17] at: https://lore.kernel.org/all/cover.1632750608.git.mchehab+huawei@kernel.org/

 Documentation/ABI/testing/sysfs-bus-platform | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-bus-platform b/Documentation/ABI/testing/sysfs-bus-platform
index ff30728595ef..c4dfe7355c2d 100644
--- a/Documentation/ABI/testing/sysfs-bus-platform
+++ b/Documentation/ABI/testing/sysfs-bus-platform
@@ -42,3 +42,15 @@ Date:		August 2021
 Contact:	Barry Song <song.bao.hua@hisilicon.com>
 Description:
 		This attribute will show "msi" if <N> is a valid msi irq
+
+What:		/sys/bus/platform/devices/.../modalias
+Description:
+		Same as MODALIAS in the uevent at device creation.
+
+		A platform device that it is exposed via devicetree uses:
+
+			- of:N`of node name`T`type`
+
+		Other platform devices use, instead:
+
+			- platform:`driver name`
-- 
2.31.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 17/17] ABI: sysfs-bus-platform: add modalias description
  2021-09-27 13:59 ` [PATCH 17/17] ABI: sysfs-bus-platform: add modalias description Mauro Carvalho Chehab
@ 2021-09-27 21:00   ` Barry Song
  0 siblings, 0 replies; 27+ messages in thread
From: Barry Song @ 2021-09-27 21:00 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Linux Doc Mailing List, Greg Kroah-Hartman, Jonathan Corbet,
	Barry Song, Bjorn Helgaas, Marc Zyngier, Thomas Gleixner, LKML

On Tue, Sep 28, 2021 at 3:02 AM Mauro Carvalho Chehab
<mchehab+huawei@kernel.org> wrote:
>
> Define the modalias parameter for platform devices, including
> the ones exposed via devicetree.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

Acked-by: Barry Song <song.bao.hua@hisilicon.com>

> ---
>
> See [PATCH 00/17] at: https://lore.kernel.org/all/cover.1632750608.git.mchehab+huawei@kernel.org/
>
>  Documentation/ABI/testing/sysfs-bus-platform | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/Documentation/ABI/testing/sysfs-bus-platform b/Documentation/ABI/testing/sysfs-bus-platform
> index ff30728595ef..c4dfe7355c2d 100644
> --- a/Documentation/ABI/testing/sysfs-bus-platform
> +++ b/Documentation/ABI/testing/sysfs-bus-platform
> @@ -42,3 +42,15 @@ Date:                August 2021
>  Contact:       Barry Song <song.bao.hua@hisilicon.com>
>  Description:
>                 This attribute will show "msi" if <N> is a valid msi irq
> +
> +What:          /sys/bus/platform/devices/.../modalias
> +Description:
> +               Same as MODALIAS in the uevent at device creation.
> +
> +               A platform device that it is exposed via devicetree uses:
> +
> +                       - of:N`of node name`T`type`
> +
> +               Other platform devices use, instead:
> +
> +                       - platform:`driver name`
> --
> 2.31.1
>

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 06/17] ABI: sysfs-bus-pci: add documentation for modalias
  2021-09-27 13:59 ` [PATCH 06/17] ABI: sysfs-bus-pci: add documentation for modalias Mauro Carvalho Chehab
@ 2021-09-28 10:48   ` Greg Kroah-Hartman
  2021-09-28 11:48     ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 27+ messages in thread
From: Greg Kroah-Hartman @ 2021-09-28 10:48 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Linux Doc Mailing List, Jonathan Corbet, Amey Narkhede,
	Bjorn Helgaas, Carlos Bilbao, Leon Romanovsky, Maximilian Luz,
	Niklas Schnelle, Suzuki K Poulose, linux-kernel

On Mon, Sep 27, 2021 at 03:59:39PM +0200, Mauro Carvalho Chehab wrote:
> Even being available since 2005, there's no documentation for
> modalias.
> 
> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> ---
> 
> See [PATCH 00/17] at: https://lore.kernel.org/all/cover.1632750608.git.mchehab+huawei@kernel.org/
> 
>  Documentation/ABI/testing/sysfs-bus-pci | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci
> index 191cbe9ae5ed..1eeac7f59672 100644
> --- a/Documentation/ABI/testing/sysfs-bus-pci
> +++ b/Documentation/ABI/testing/sysfs-bus-pci
> @@ -187,6 +187,24 @@ Description:
>  		The symbolic link points to the PCI device sysfs entry of the
>  		Physical Function this device associates with.
>  
> +What:		/sys/bus/pci/devices/.../modalias
> +Date:		May 2005

Wow, I was not good at documenting this stuff back then, sorry about
that :(

I'll queue this series up now, thanks so much for working on this!

greg k-h

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 06/17] ABI: sysfs-bus-pci: add documentation for modalias
  2021-09-28 10:48   ` Greg Kroah-Hartman
@ 2021-09-28 11:48     ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 27+ messages in thread
From: Mauro Carvalho Chehab @ 2021-09-28 11:48 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Linux Doc Mailing List, Jonathan Corbet, Amey Narkhede,
	Bjorn Helgaas, Carlos Bilbao, Leon Romanovsky, Maximilian Luz,
	Niklas Schnelle, Suzuki K Poulose, linux-kernel

Em Tue, 28 Sep 2021 12:48:10 +0200
Greg Kroah-Hartman <gregkh@linuxfoundation.org> escreveu:

> On Mon, Sep 27, 2021 at 03:59:39PM +0200, Mauro Carvalho Chehab wrote:
> > Even being available since 2005, there's no documentation for
> > modalias.
> > 
> > Acked-by: Bjorn Helgaas <bhelgaas@google.com>
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> > ---
> > 
> > See [PATCH 00/17] at: https://lore.kernel.org/all/cover.1632750608.git.mchehab+huawei@kernel.org/
> > 
> >  Documentation/ABI/testing/sysfs-bus-pci | 18 ++++++++++++++++++
> >  1 file changed, 18 insertions(+)
> > 
> > diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci
> > index 191cbe9ae5ed..1eeac7f59672 100644
> > --- a/Documentation/ABI/testing/sysfs-bus-pci
> > +++ b/Documentation/ABI/testing/sysfs-bus-pci
> > @@ -187,6 +187,24 @@ Description:
> >  		The symbolic link points to the PCI device sysfs entry of the
> >  		Physical Function this device associates with.
> >  
> > +What:		/sys/bus/pci/devices/.../modalias
> > +Date:		May 2005  
> 
> Wow, I was not good at documenting this stuff back then, sorry about
> that :(

Yeah, I guess most of the undocumented stuff comes from old times.
 
> I'll queue this series up now, thanks so much for working on this!

Anytime! I'm also glad with the results. 

-

I guess that there's still one missing feature at the script,
that should probably be easy to implement.

Right now, "./get_abi.pl search <foo>" doesn't evaluate regexes,
but searches for a substring match. This is very fast, but
we could do better, by changing the logic in order to use the
preparation part of the "undefined" logic, if the exact match
doesn't happen.

This way, a sys admin could use the script in order to find
documentation for a certain sysfs file on his system.

If I have some spare time left, I guess I'll try to implement
it.

Thanks,
Mauro

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 10/17] ABI: sysfs-bus-pci: add a alternative What fields
  2021-09-27 13:59 ` [PATCH 10/17] ABI: sysfs-bus-pci: add a alternative What fields Mauro Carvalho Chehab
@ 2021-09-28 18:34   ` Bjorn Helgaas
  2021-09-28 22:07     ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 27+ messages in thread
From: Bjorn Helgaas @ 2021-09-28 18:34 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Linux Doc Mailing List, Greg Kroah-Hartman, Jonathan Corbet,
	Amey Narkhede, Bjorn Helgaas, Carlos Bilbao, Leon Romanovsky,
	Maximilian Luz, Niklas Schnelle, Oded Gabbay, linux-kernel

Probably already queued up, but:

s/add a alternative/add alternative/ (in subject)

On Mon, Sep 27, 2021 at 03:59:43PM +0200, Mauro Carvalho Chehab wrote:
> There are some PCI ABI that aren't shown under:
> 
> 	/sys/bus/pci/drivers/.../
> 
> Because they're registered with a different class. That's
> the case of, for instance:
> 
> 	/sys/bus/i2c/drivers/CHT Whiskey Cove PMIC/unbind
> 
> This one is not present under /sys/bus/pci:
> 
> 	$ find /sys/bus/pci -name 'CHT Whiskey Cove PMIC'
> 
> Although clearly this is provided by a PCI driver:
> 
> 	/sys/devices/pci0000:00/0000:00:02.0/i2c-4/subsystem/drivers/CHT Whiskey Cove PMIC/unbind
> 
> So, add an altertate What location in order to match bind/unbind
> to such devices.

s/altertate/alternate/

> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> ---
> 
> See [PATCH 00/17] at: https://lore.kernel.org/all/cover.1632750608.git.mchehab+huawei@kernel.org/
> 
>  Documentation/ABI/testing/sysfs-bus-pci | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci
> index 1eeac7f59672..16afe3f59cbd 100644
> --- a/Documentation/ABI/testing/sysfs-bus-pci
> +++ b/Documentation/ABI/testing/sysfs-bus-pci
> @@ -1,4 +1,5 @@
>  What:		/sys/bus/pci/drivers/.../bind
> +What:		/sys/devices/pciX/.../bind

Wasn't somebody just updating these wildcard-ish items in pathnames?

Ah, it was you :)

  https://lore.kernel.org/all/4ede4ec98e295f054f3e5a6f3f9393b5e3d5d2a7.1631782432.git.mchehab+huawei@kernel.org/

Changing "virtfnN" to "virtfn<N>".

Is that same sort of thing applicable here?  My system has

  /sys/devices/pci0000:00/...

Bjorn

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 10/17] ABI: sysfs-bus-pci: add a alternative What fields
  2021-09-28 18:34   ` Bjorn Helgaas
@ 2021-09-28 22:07     ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 27+ messages in thread
From: Mauro Carvalho Chehab @ 2021-09-28 22:07 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Linux Doc Mailing List, Greg Kroah-Hartman, Jonathan Corbet,
	Amey Narkhede, Bjorn Helgaas, Carlos Bilbao, Leon Romanovsky,
	Maximilian Luz, Niklas Schnelle, Oded Gabbay, linux-kernel

Em Tue, 28 Sep 2021 13:34:03 -0500
Bjorn Helgaas <helgaas@kernel.org> escreveu:

> > diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci
> > index 1eeac7f59672..16afe3f59cbd 100644
> > --- a/Documentation/ABI/testing/sysfs-bus-pci
> > +++ b/Documentation/ABI/testing/sysfs-bus-pci
> > @@ -1,4 +1,5 @@
> >  What:		/sys/bus/pci/drivers/.../bind
> > +What:		/sys/devices/pciX/.../bind  
> 
> Wasn't somebody just updating these wildcard-ish items in pathnames?
> 
> Ah, it was you :)
> 
>   https://lore.kernel.org/all/4ede4ec98e295f054f3e5a6f3f9393b5e3d5d2a7.1631782432.git.mchehab+huawei@kernel.org/
> 
> Changing "virtfnN" to "virtfn<N>".
> 
> Is that same sort of thing applicable here?  My system has
> 
>   /sys/devices/pci0000:00/...

Yes and no ;-)

See, there are lots of places under Documentation/ABI that already use
X, Y and Z uppercase letters to identify wildcards. As there aren't any
sysfs entries that have those uppercase letters, I opted to teach the 
get_abi.pl script to threat such uppercase chars as wildcards. The same
can't be done with N, because the USB subsystem (and a couple of other
ABIs) use uppercase N as valid symbols like "bNum.*".

Long term, one alternative would be to replace the What fields by a 
regular expressions on ABI. That would avoid some magic inside 
get_abi.pl. However, a change like that would require touching almost
all files, and has a drawback to make them more obscure - even
if we use named group regexes.

Thanks,
Mauro

^ permalink raw reply	[flat|nested] 27+ messages in thread

* RE: [PATCH 16/17] ABI: sysfs-driver-ufs: Add another What for platform drivers
  2021-09-27 13:59 ` [PATCH 16/17] ABI: sysfs-driver-ufs: Add another What for platform drivers Mauro Carvalho Chehab
@ 2021-09-29  6:32   ` Avri Altman
  2021-09-29  7:03     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 27+ messages in thread
From: Avri Altman @ 2021-09-29  6:32 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Linux Doc Mailing List, Greg Kroah-Hartman
  Cc: Jonathan Corbet, Martin K. Petersen, Adrian Hunter, Bean Huo,
	Can Guo, Daejun Park, Lukas Bulwahn, linux-kernel

> The current what expressions:
>         What:          /sys/bus/platform/drivers/ufshcd/*/...
> 
> Doesn't actually match what (some?) platform drivers actually
> export. For instance, drivers/scsi/ufs/ufs-hisi.c actually
> creates the sysfs struct for ufshcd inside this directory:
> 
>         /sys/devices/platform/soc/ff3c0000.ufs
> 
> Which has those aliases:
> 
>         /sys/devices/virtual/devlink/platform:fff35000.crg_ctrl--
> platform:ff3c0000.ufs/consumer/
>         /sys/bus/platform/drivers/ufshcd-hisi/ff3c0000.ufs/
>         /sys/bus/platform/devices/soc/ff3c0000.ufs/
>         /sys/bus/platform/devices/ff3c0000.ufs/
> 
> So, add another What: for such files that will match the
> device ufs entries, e. g.:
> 
>         What:          /sys/bus/platform/devices/*.ufs/
On some platforms the suffix is .ufshc
So Maybe use:
/sys/bus/platform/devices/*.ufs*/

Thanks,
Avri
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 16/17] ABI: sysfs-driver-ufs: Add another What for platform drivers
  2021-09-29  6:32   ` Avri Altman
@ 2021-09-29  7:03     ` Greg Kroah-Hartman
  2021-09-29  7:23       ` Avri Altman
  0 siblings, 1 reply; 27+ messages in thread
From: Greg Kroah-Hartman @ 2021-09-29  7:03 UTC (permalink / raw)
  To: Avri Altman
  Cc: Mauro Carvalho Chehab, Linux Doc Mailing List, Jonathan Corbet,
	Martin K. Petersen, Adrian Hunter, Bean Huo, Can Guo,
	Daejun Park, Lukas Bulwahn, linux-kernel

On Wed, Sep 29, 2021 at 06:32:40AM +0000, Avri Altman wrote:
> > The current what expressions:
> >         What:          /sys/bus/platform/drivers/ufshcd/*/...
> > 
> > Doesn't actually match what (some?) platform drivers actually
> > export. For instance, drivers/scsi/ufs/ufs-hisi.c actually
> > creates the sysfs struct for ufshcd inside this directory:
> > 
> >         /sys/devices/platform/soc/ff3c0000.ufs
> > 
> > Which has those aliases:
> > 
> >         /sys/devices/virtual/devlink/platform:fff35000.crg_ctrl--
> > platform:ff3c0000.ufs/consumer/
> >         /sys/bus/platform/drivers/ufshcd-hisi/ff3c0000.ufs/
> >         /sys/bus/platform/devices/soc/ff3c0000.ufs/
> >         /sys/bus/platform/devices/ff3c0000.ufs/
> > 
> > So, add another What: for such files that will match the
> > device ufs entries, e. g.:
> > 
> >         What:          /sys/bus/platform/devices/*.ufs/
> On some platforms the suffix is .ufshc
> So Maybe use:
> /sys/bus/platform/devices/*.ufs*/

That's confusing.  How about describing why "ufshc" is used in another
entry?  You all must have picked the new name for some reason to
differentiate, right?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 27+ messages in thread

* RE: [PATCH 16/17] ABI: sysfs-driver-ufs: Add another What for platform drivers
  2021-09-29  7:03     ` Greg Kroah-Hartman
@ 2021-09-29  7:23       ` Avri Altman
  2021-09-29  7:39         ` Greg Kroah-Hartman
  0 siblings, 1 reply; 27+ messages in thread
From: Avri Altman @ 2021-09-29  7:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Linux Doc Mailing List, Jonathan Corbet,
	Martin K. Petersen, Adrian Hunter, Bean Huo, Can Guo,
	Daejun Park, Lukas Bulwahn, linux-kernel

> On Wed, Sep 29, 2021 at 06:32:40AM +0000, Avri Altman wrote:
> > > The current what expressions:
> > >         What:          /sys/bus/platform/drivers/ufshcd/*/...
> > >
> > > Doesn't actually match what (some?) platform drivers actually
> > > export. For instance, drivers/scsi/ufs/ufs-hisi.c actually creates
> > > the sysfs struct for ufshcd inside this directory:
> > >
> > >         /sys/devices/platform/soc/ff3c0000.ufs
> > >
> > > Which has those aliases:
> > >
> > >         /sys/devices/virtual/devlink/platform:fff35000.crg_ctrl--
> > > platform:ff3c0000.ufs/consumer/
> > >         /sys/bus/platform/drivers/ufshcd-hisi/ff3c0000.ufs/
> > >         /sys/bus/platform/devices/soc/ff3c0000.ufs/
> > >         /sys/bus/platform/devices/ff3c0000.ufs/
> > >
> > > So, add another What: for such files that will match the device ufs
> > > entries, e. g.:
> > >
> > >         What:          /sys/bus/platform/devices/*.ufs/
> > On some platforms the suffix is .ufshc So Maybe use:
> > /sys/bus/platform/devices/*.ufs*/
> 
> That's confusing.  How about describing why "ufshc" is used in another
> entry?  You all must have picked the new name for some reason to
> differentiate, right?
It's a platform thing. Better let the platform guys answer that.

Thanks,
Avri

> 
> thanks,
> 
> greg k-h

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 16/17] ABI: sysfs-driver-ufs: Add another What for platform drivers
  2021-09-29  7:23       ` Avri Altman
@ 2021-09-29  7:39         ` Greg Kroah-Hartman
  0 siblings, 0 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2021-09-29  7:39 UTC (permalink / raw)
  To: Avri Altman
  Cc: Mauro Carvalho Chehab, Linux Doc Mailing List, Jonathan Corbet,
	Martin K. Petersen, Adrian Hunter, Bean Huo, Can Guo,
	Daejun Park, Lukas Bulwahn, linux-kernel

On Wed, Sep 29, 2021 at 07:23:32AM +0000, Avri Altman wrote:
> > On Wed, Sep 29, 2021 at 06:32:40AM +0000, Avri Altman wrote:
> > > > The current what expressions:
> > > >         What:          /sys/bus/platform/drivers/ufshcd/*/...
> > > >
> > > > Doesn't actually match what (some?) platform drivers actually
> > > > export. For instance, drivers/scsi/ufs/ufs-hisi.c actually creates
> > > > the sysfs struct for ufshcd inside this directory:
> > > >
> > > >         /sys/devices/platform/soc/ff3c0000.ufs
> > > >
> > > > Which has those aliases:
> > > >
> > > >         /sys/devices/virtual/devlink/platform:fff35000.crg_ctrl--
> > > > platform:ff3c0000.ufs/consumer/
> > > >         /sys/bus/platform/drivers/ufshcd-hisi/ff3c0000.ufs/
> > > >         /sys/bus/platform/devices/soc/ff3c0000.ufs/
> > > >         /sys/bus/platform/devices/ff3c0000.ufs/
> > > >
> > > > So, add another What: for such files that will match the device ufs
> > > > entries, e. g.:
> > > >
> > > >         What:          /sys/bus/platform/devices/*.ufs/
> > > On some platforms the suffix is .ufshc So Maybe use:
> > > /sys/bus/platform/devices/*.ufs*/
> > 
> > That's confusing.  How about describing why "ufshc" is used in another
> > entry?  You all must have picked the new name for some reason to
> > differentiate, right?
> It's a platform thing. Better let the platform guys answer that.

What plaform people?

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2021-09-29  7:39 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 13:59 [PATCH 00/17] ABI: update files to reduce the documentation gap Mauro Carvalho Chehab
2021-09-27 13:59 ` [PATCH 01/17] ABI: stable/sysfs-module: better document modules Mauro Carvalho Chehab
2021-09-27 13:59 ` [PATCH 02/17] ABI: stable/sysfs-module: document version and srcversion Mauro Carvalho Chehab
2021-09-27 13:59 ` [PATCH 03/17] ABI: testing/sysfs-module: document initstate Mauro Carvalho Chehab
2021-09-27 13:59 ` [PATCH 04/17] ABI: sysfs-devices-power: document some RPM statistics Mauro Carvalho Chehab
2021-09-27 13:59 ` [PATCH 05/17] ABI: sysfs-devices: add /dev ABI Mauro Carvalho Chehab
2021-09-27 13:59 ` [PATCH 06/17] ABI: sysfs-bus-pci: add documentation for modalias Mauro Carvalho Chehab
2021-09-28 10:48   ` Greg Kroah-Hartman
2021-09-28 11:48     ` Mauro Carvalho Chehab
2021-09-27 13:59 ` [PATCH 07/17] ABI: o2cb: add an obsolete file for /sys/o2cb Mauro Carvalho Chehab
2021-09-27 13:59 ` [PATCH 08/17] ABI: sysfs-kernel-slab: Document some stats Mauro Carvalho Chehab
2021-09-27 13:59 ` [PATCH 09/17] ABI: sysfs-devices-power: add some debug sysfs files Mauro Carvalho Chehab
2021-09-27 13:59 ` [PATCH 10/17] ABI: sysfs-bus-pci: add a alternative What fields Mauro Carvalho Chehab
2021-09-28 18:34   ` Bjorn Helgaas
2021-09-28 22:07     ` Mauro Carvalho Chehab
2021-09-27 13:59 ` [PATCH 11/17] ABI: sysfs-class-bdi: use What: to describe each property Mauro Carvalho Chehab
2021-09-27 13:59 ` [PATCH 12/17] ABI: sysfs-bus-mdio: add alternate What for mdio symbols Mauro Carvalho Chehab
2021-09-27 13:59 ` [PATCH 13/17] ABI: sysfs-bus-usb: use a wildcard for interface name on What Mauro Carvalho Chehab
2021-09-27 13:59 ` [PATCH 14/17] ABI: sysfs-bus-usb: add missing sysfs fields Mauro Carvalho Chehab
2021-09-27 13:59 ` [PATCH 15/17] ABI: obsolete/sysfs-bus-iio: add some missing blank lines Mauro Carvalho Chehab
2021-09-27 13:59 ` [PATCH 16/17] ABI: sysfs-driver-ufs: Add another What for platform drivers Mauro Carvalho Chehab
2021-09-29  6:32   ` Avri Altman
2021-09-29  7:03     ` Greg Kroah-Hartman
2021-09-29  7:23       ` Avri Altman
2021-09-29  7:39         ` Greg Kroah-Hartman
2021-09-27 13:59 ` [PATCH 17/17] ABI: sysfs-bus-platform: add modalias description Mauro Carvalho Chehab
2021-09-27 21:00   ` Barry Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).