From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC72237E30C; Mon, 19 Oct 2026 07:39:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792395557; cv=none; b=RI6uRoxp1ppaQnMUHeAlVqcQGZvZwaohAFCzmGwAgku7oBTjG/8UhMQgQdnvsn3H8erQ3ALy4LEcZBQga2DFcL6GHxQTRN9fJFNLKlpxD50/Bl5FyjAP2odaPwBhy0st4+e0t4h82c37XZ1wmbSDYiTpYYOhA/6EirxqWpR6hww= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792395557; c=relaxed/simple; bh=3AqohxTP7jF81MBR+vgDfVOlIX/iumcOMiokaZpO9Qo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Fb0wu8LjPqYMPuj85GSB0eA9mr2g/w+8rWmDzaZNPjtIC+JvkqyuDGBgi/c78kdRcPYdjAAprPeM+lPnH1KP4wThnwmSgbOvkzgyu5LFJpc9llNnRbVc6pHDBEwtZHsppIcY9fTJmN0aiGMC6ioamHSkWPdi6jNNnFiQ1tnS+3o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=oZxn5V+V; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="oZxn5V+V" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69J4j2XY2819163; Mon, 19 Oct 2026 07:39:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= blZmFdfNSSjqpjrk9wXKAfQJnrp3tUCVQ4pLWtXOH+s=; b=oZxn5V+Vlt1T6jqc EfQuOro0kV7e0jO8LcB36uwtHDks+fEUaMtdFZeWBchgcWRBqVezIndB1pEPjkhw LngpNESbQCuf+e6okBJxVx8JSqsnUvhwcKgXIS5q7itw7fbcv3itg0X6u/TYnMRQ ggKn4b/Rk8PvXsptoSPSZ/+UZZLIUGzBt3xFPXmwIU6gTptdAooKSONAXo6Rc728 tegtMCTyNvFBubs0WZBvIGVJH1zfmgqAB17DvJyrIzxd5v+Ney4IhuGDxJ08b1YJ PwGoHH+juTRJMkKPPOIvdJeoB8mZy2mYGT6kZkBgjqFqPiGkA07KXgO4sMYYX+gs om7t2w== Received: from apblrppmta01.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hbxqfwt22-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 19 Oct 2026 07:39:02 +0000 (GMT) Received: from pps.filterd (apblrppmta01.qualcomm.com [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (8.18.1.11/8.18.1.11) with ESMTP id 69J7cxv3104349; Mon, 19 Oct 2026 07:38:59 GMT Received: from hu-ffaruque-hyd.qualcomm.com (hu-ffaruque-hyd.qualcomm.com [10.147.245.31]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 69J7cuGb104238; Mon, 19 Oct 2026 07:38:59 +0000 (GMT) From: Faruque Ansari Date: Mon, 19 Oct 2026 13:08:37 +0530 Subject: [PATCH v17 6/6] Documentation: Add sysfs documentation for PSCRR Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261019-pscrr-framework-v17-6-69ea6cdf4731@oss.qualcomm.com> References: <20261019-pscrr-framework-v17-0-69ea6cdf4731@oss.qualcomm.com> In-Reply-To: <20261019-pscrr-framework-v17-0-69ea6cdf4731@oss.qualcomm.com> To: Sebastian Reichel , Benson Leung , Tzung-Bi Shih , Guenter Roeck , Liam Girdwood , Mark Brown , Matti Vaittinen , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Oleksij Rempel , Pengutronix Kernel Team Cc: linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, chrome-platform@lists.linux.dev, avaneesh.dwivedi@oss.qualcomm.com, Umang Chheda , Ulf Hansson , Sebastian Reichel , Faruque Ansari , Daniel Lezcano X-Mailer: b4 0.14.3 X-Proofpoint-Reinject: loops=2 maxloops=12 X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Spam-Info: AW1haW4tMjYxMDE5MDAzMCBTYWx0ZWRfX9PlQoH7asWj3 rwVKBfwQlJrZDlcoVMqDiW/iggjsFBZbpFDGfLw+EEneaFjF6cHfU6aVBKd1ohDq+wRHjZ+wJP7 XQOiew+wKONhR6AsJtJ5rtq8Kvj1LyA= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDE5MDAzMCBTYWx0ZWRfX/N18mtgbhSgR M2rU+krj8b+js0NpjD3usjQ8NVrDYy1G2ngKE5Skdu4XAKh4V9UZ39Ni1ISF0ctHAXyVjzsF6yX txRbr226zClGCAkSHLcddmfwf/FB6iUwEAgNirA22tEdwk2hTTu0bZDEw7AFbKp/mFHN7XroacF WR2Xm1VQ8wx1LeFzyrazARPh53ZHygztt8GeP/c2Lyun8488X1+snsu/+cJ2JObBNCtiXu68v5M VZL77fzE//HeyEifPVAJUxXWqyVFyxqyk9ks9ynJQ4jtduu9Dnad/gAUCH9qNBaZ35sM5/7isu1 8xsbsr0L5F26HBZipAukK2VU3EYJIQFiEyEfNOGg+xsVIr1ryOCS94qzJrczzB19NZo3aljsTao HkqsB3kLKMLSqYPOiH+ld9q+sRT39/CjvRK8SfPepLuoWamfdZ57QLAC9JKpzcPQsSqobAhpLTO xOyka6joAJnncVMb21Q== X-Proofpoint-ORIG-GUID: 3NENsxv6ZEVfgSViT2DMfprfBLLdM3Yj X-Proofpoint-GUID: 3NENsxv6ZEVfgSViT2DMfprfBLLdM3Yj X-Authority-Analysis: v=2.4 cv=RYMFmFtv c=1 sm=1 tr=0 ts=6ad5c916 cx=c_pps a=Ou0eQOY4+eZoSc0qltEV5Q==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=pGLkceISAAAA:8 a=EUspDBNiAAAA:8 a=eG3WmpGALsbKIvMRAg8A:9 a=QEXdDO2ut3YA:10 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-10-19_02,2026-10-14_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 impostorscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 phishscore=0 bulkscore=0 suspectscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610080000 definitions=main-2610190030 Document the Power State Change Reasons Recording (PSCRR) sysfs interface under /sys/kernel/pscrr/: the per-provider directories and their name, device, reason, caps, supported_reasons and record_policy attributes, including the stable reason token values. Co-developed-by: Oleksij Rempel Signed-off-by: Oleksij Rempel Reviewed-by: Matti Vaittinen Reviewed-by: Daniel Lezcano Signed-off-by: Faruque Ansari Chnages V17: - Add Reviewed-by tags from Daniel Lezcano Changes v15: - Add Reviewed-by tags from Matti Vaittinen. changes v12: - rewrite for the per-provider interface (providerN/ directories with caps, supported_reasons and record_policy) - rename the file to sysfs-kernel-pscrr to match the sysfs path - refresh KernelVersion/Date - drop Reviewed-by: Matti Vaittinen; the documentation was rewritten changes v8: - simplify and clarify example sysfs value comments - add note that not all values are meaningful on every system changes v7: - document expected values --- Documentation/ABI/testing/sysfs-kernel-pscrr | 108 +++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-kernel-pscrr b/Documentation/ABI/testing/sysfs-kernel-pscrr new file mode 100644 index 000000000000..63aa411b7362 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-kernel-pscrr @@ -0,0 +1,108 @@ +What: /sys/kernel/pscrr/ +Date: July 2026 +KernelVersion: 7.2 +Contact: Oleksij Rempel +Description: + Root directory of the Power State Change Reason Recording + (PSCRR) framework. It contains one subdirectory per registered + reason provider, named providerN (N is an arbitrary, stable + index assigned at registration). + + A provider is either a hardware reason source (a PMIC, SoC + reset controller or watchdog exposing a reset cause) or a + recorder that persists the current reason across a power cycle + (e.g. an NVMEM or RTC scratch cell). The set of reasons is + deliberately not collapsed to a single "winning" cause, since + resets are often multi-causal. + +What: /sys/kernel/pscrr/providerN/name +Date: July 2026 +KernelVersion: 7.2 +Contact: Oleksij Rempel +Description: + (RO) Human-readable label identifying the provider, e.g. + "pca9450" or "nvmem". + +What: /sys/kernel/pscrr/providerN/device +Date: July 2026 +KernelVersion: 7.2 +Contact: Oleksij Rempel +Description: + Symbolic link to the backing struct device of the provider. + Present only for providers that are bound to a device. + +What: /sys/kernel/pscrr/providerN/reason +Date: July 2026 +KernelVersion: 7.2 +Contact: Oleksij Rempel +Description: + The set of power state change reasons observed by this + provider, as a space-separated list of reason tokens (an + empty line means no reason is recorded). + + The attribute is writable only for providers that can record + a reason; for a pure hardware source it is read-only. A write + records one reason and accepts either a reason token or its + decimal index. The tokens and their stable numeric values are: + + == ================= ============================================ + 0 unknown Unknown or unspecified reason + 1 under-voltage Supply voltage dropped below a safe level + 2 over-current Excessive current draw / possible short + 3 regulator-failure Voltage regulator failure + 4 over-temperature Unsafe temperature detected + 5 ec-panic Embedded controller (EC) panic + 6 power-on Regular cold power-on + 7 watchdog Watchdog timeout + 8 software Software-initiated reset or reboot + 9 external External reset input asserted + 10 rtc RTC-triggered wake-up or power-on + 11 reset-button User reset button + 12 cpu-clock-failure CPU clock failure + 13 crystal-failure Crystal oscillator failure + == ================= ============================================ + + The numeric order is stable ABI: new reasons are only ever + appended. A provider may support only a subset of these; see + "supported_reasons". + +What: /sys/kernel/pscrr/providerN/caps +Date: July 2026 +KernelVersion: 7.2 +Contact: Oleksij Rempel +Description: + (RO) Space-separated list of the provider's non-default + capabilities. Being readable and storing a single reason are + the defaults and are not listed. Currently defined: + + ======== ============================================== + writable the provider can record a reason (see "reason" + and "record_policy") + ======== ============================================== + + An empty line therefore denotes a read-only, single-slot + provider. + +What: /sys/kernel/pscrr/providerN/supported_reasons +Date: July 2026 +KernelVersion: 7.2 +Contact: Oleksij Rempel +Description: + (RO) Space-separated list of the reason tokens (see "reason") + this provider is able to report or record. A provider that + supports every reason lists them all. + +What: /sys/kernel/pscrr/providerN/record_policy +Date: July 2026 +KernelVersion: 7.2 +Contact: Oleksij Rempel +Description: + (RW) Policy used when more than one reason is recorded during a + single power cycle. Present only for providers that can record + (see "caps"). Valid values are: + + ===== ================================================= + first keep the first reason recorded this cycle (the + root cause); this is the default + last overwrite with the most recently recorded reason + ===== ================================================= -- 2.34.1