linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vishnu Sanal T <t.v.s10123@gmail.com>
To: linux-doc@vger.kernel.org
Cc: corbet@lwn.net, linux-kernel@vger.kernel.org,
	Vishnu Sanal T <t.v.s10123@gmail.com>
Subject: [PATCH] docs: update sysfs docs
Date: Fri,  4 Oct 2024 19:43:04 +0530	[thread overview]
Message-ID: <20241004141303.46592-2-t.v.s10123@gmail.com> (raw)

update sysfs docs with documentation for all the subdirectories

Signed-off-by: Vishnu Sanal T <t.v.s10123@gmail.com>
---
 Documentation/filesystems/sysfs.rst | 57 ++++++++++++++++++++---------
 1 file changed, 39 insertions(+), 18 deletions(-)

diff --git a/Documentation/filesystems/sysfs.rst b/Documentation/filesystems/sysfs.rst
index c32993bc83c7..b455ab32aacc 100644
--- a/Documentation/filesystems/sysfs.rst
+++ b/Documentation/filesystems/sysfs.rst
@@ -302,43 +302,64 @@ The top level sysfs directory looks like::
     net/
     power/
 
-devices/ contains a filesystem representation of the device tree. It maps
-directly to the internal kernel device tree, which is a hierarchy of
-struct device.
+block/ contains subdirectories for each block device that has been
+discovered in the system. In each block device's directory are attributes
+that describe many things, including the size of the device and the
+dev_t number that it maps to.
 
 bus/ contains flat directory layout of the various bus types in the
 kernel. Each bus's directory contains two subdirectories::
 
-	devices/
-	drivers/
+	bus/devices/
+	bus/drivers/
 
-devices/ contains symlinks for each device discovered in the system
-that point to the device's directory under root/.
+        bus/devices/ contains symlinks for each device discovered in the system
+        that point to the device's directory under root/.
 
-drivers/ contains a directory for each device driver that is loaded
-for devices on that particular bus (this assumes that drivers do not
-span multiple bus types).
+        bus/drivers/ contains a directory for each device driver that is loaded
+        for devices on that particular bus (this assumes that drivers do not
+        span multiple bus types).
+
+class/ contains representations of every device class that is registered
+with the kernel. A device class describes a functional type of device.
+Each device class contains subdirectories for each class object that has
+been allocated and registered with that device class. For most of class
+device objects, their directories contain symbolic links to the device
+and driver directories that are associated with that class object.
+
+dev/ contains two directories: char/ and block/. Inside these two
+directories there are symlinks named <major>:<minor>.  These symlinks
+point to the sysfs directory for the given device.  /sys/dev provides a
+quick way to lookup the sysfs interface for a device from the result of
+
+devices/ contains a filesystem representation of the device tree. It maps
+directly to the internal kernel device tree, which is a hierarchy of
+struct device.
+
+firmware/ contains interfaces for viewing and manipulating firmware
+specific objects and attributes. Here, firmware refers to the
+platform-specific code that is executed on system power-on.
 
 fs/ contains a directory for some filesystems.  Currently each
 filesystem wanting to export attributes must create its own hierarchy
 below fs/ (see ./fuse.rst for an example).
 
+hypervisor/ is the mount point for hypervisor file systems.
+
+kernel/ contains various files and subdirectories that provide
+information about the running kernel.
+
 module/ contains parameter values and state information for all
 loaded system modules, for both builtin and loadable modules.
 
-dev/ contains two directories: char/ and block/. Inside these two
-directories there are symlinks named <major>:<minor>.  These symlinks
-point to the sysfs directory for the given device.  /sys/dev provides a
-quick way to lookup the sysfs interface for a device from the result of
-a stat(2) operation.
+net/ is the interface to the networking parts of the kernel.
+
+power/ directory represents the underused power subsystem.
 
 More information on driver-model specific features can be found in
 Documentation/driver-api/driver-model/.
 
 
-TODO: Finish this section.
-
-
 Current Interfaces
 ~~~~~~~~~~~~~~~~~~
 
-- 
2.46.2


             reply	other threads:[~2024-10-04 14:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-04 14:13 Vishnu Sanal T [this message]
2024-10-14 19:28 ` [PATCH] docs: update sysfs docs Jonathan Corbet

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=20241004141303.46592-2-t.v.s10123@gmail.com \
    --to=t.v.s10123@gmail.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

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

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).