[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250710-arm-psci-system_reset2-vendor-reboots-v10-9-b2d3b882be85@oss.qualcomm.com>
Date: Thu, 10 Jul 2025 14:45:51 +0530
From: Shivendra Pratap <shivendra.pratap@....qualcomm.com>
To: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>,
Bjorn Andersson <andersson@...nel.org>,
Sebastian Reichel <sre@...nel.org>, Rob Herring <robh@...nel.org>,
Sudeep Holla <sudeep.holla@....com>,
Souvik Chakravarty <Souvik.Chakravarty@....com>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Andy Yan <andy.yan@...k-chips.com>,
Mark Rutland <mark.rutland@....com>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Arnd Bergmann <arnd@...db.de>, Olof Johansson <olof@...om.net>,
Konrad Dybcio <konradybcio@...nel.org>,
cros-qcom-dts-watchers@...omium.org, Vinod Koul <vkoul@...nel.org>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Florian Fainelli <florian.fainelli@...adcom.com>,
Elliot Berman <elliotb317@...il.com>
Cc: Stephen Boyd <swboyd@...omium.org>, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-arm-msm@...r.kernel.org,
Andre Draszik <andre.draszik@...aro.org>,
Alim Akhtar <alim.akhtar@...sung.com>,
linux-samsung-soc@...r.kernel.org, Wei Xu <xuwei5@...ilicon.com>,
linux-rockchip@...ts.infradead.org,
Baolin Wang <baolin.wang@...ux.alibaba.com>,
Sen Chu <sen.chu@...iatek.com>, Sean Wang <sean.wang@...iatek.com>,
Macpaul Lin <macpaul.lin@...iatek.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Ray Jui <rjui@...adcom.com>, Scott Branden <sbranden@...adcom.com>,
bcm-kernel-feedback-list@...adcom.com,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Elliot Berman <quic_eberman@...cinc.com>,
Shivendra Pratap <shivendra.pratap@....qualcomm.com>,
Srinivas Kandagatla <srini@...nel.org>
Subject: [PATCH v10 09/10] Documentation: ABI: Add
sysfs-class-reboot-mode-reboot_modes
Add ABI documentation for /sys/class/reboot-mode/*/reboot_modes,
a read-only sysfs attribute exposing the list of supported
reboot-mode arguments. This file is created by reboot-mode
framework and provides a user-readable interface to query
available reboot-mode arguments.
Signed-off-by: Shivendra Pratap <shivendra.pratap@....qualcomm.com>
---
.../testing/sysfs-class-reboot-mode-reboot_modes | 39 ++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-class-reboot-mode-reboot_modes b/Documentation/ABI/testing/sysfs-class-reboot-mode-reboot_modes
new file mode 100644
index 0000000000000000000000000000000000000000..bf49e6c1dee6f48d791987a50c3d0b349e6714bc
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-reboot-mode-reboot_modes
@@ -0,0 +1,39 @@
+What: /sys/class/reboot-mode/<driver>/reboot_modes
+Date: July 2025
+KernelVersion: 6.16
+Contact: linux-pm@...r.kernel.org
+ Description:
+ This interface exposes the reboot-mode arguments
+ registered with the reboot-mode framework. It is
+ a read-only interface and provides a comma
+ separated list of reboot-mode arguments supported
+ on the current platform.
+ Example:
+ normal,recovery,fastboot,bootloader
+
+ The exact sysfs path may vary depending on the
+ driver that registers the arguments.
+ Example:
+ /sys/class/reboot-mode/reboot-mode/reboot_modes
+ /sys/class/reboot-mode/pon/reboot_modes
+ /sys/class/reboot-mode/reset-types/reboot_modes
+
+ The supported arguments can be used by userspace
+ to invoke device reset using the reboot() system
+ call, with the "argument" as string to "*arg"
+ parameter along with LINUX_REBOOT_CMD_RESTART2.
+ Example:
+ reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2,
+ LINUX_REBOOT_CMD_RESTART2, "bootloader");
+
+ A driver can expose the supported arguments by
+ registering them with the reboot-mode framework
+ using the property names that follow the
+ mode-<argument> format.
+ Example:
+ mode-bootloader, mode-recovery.
+
+ This attribute is useful for scripts or initramfs
+ logic that need to programmatically determine
+ which reboot-mode arguments are valid before
+ triggering a reboot.
--
2.34.1
Powered by blists - more mailing lists