From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 7A97724DD17 for ; Tue, 15 Jul 2025 04:47:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752554880; cv=none; b=qYYCH+IvYvJAfCnU7CCHMDuLytzJuBbpD7c1XtEP9kiKmOU+CfMfBAoIB270YPJoXmCF1KeFiIL+CY1URRlj2KBlSmxk64xE8SQ2CiOToIDxH3s6wjTF/arsu03XsTTp6t0BJXBlcjEYjtjpD4F7H8/KvyD+ZXIuXtm2vB8JHHY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752554880; c=relaxed/simple; bh=X5WcdvGOR4ZnxxgkKRanPZQzRvjeUHxMPCMuzd9RT9M=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=OSUtzSVjeblLFpvAl/zHeCLWC5DM6WdQ0VIYCateQuN0RAcY5pb3ciUL2dMZYRP147q3z+/UW8y7tUoMoKI9ziJ2XMXupxrunEMM0e8dkImFXjVmX/MY6EZd9kznkKwH9YrDQbaM/nwE+FsUsZ31V4rqdUXCvLo9cyZitzjgPWk= 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=lTHCMFWJ; arc=none smtp.client-ip=205.220.180.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="lTHCMFWJ" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 56EIL5vr028415 for ; Tue, 15 Jul 2025 04:47:57 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= 1G81B60xsleyJTfUNHppUdfBzYqz0JcVfIPyN+RmVmM=; b=lTHCMFWJPCu8e0E9 V/AAabygrTtorP9ChfuHJ9QbaufTRbwAtIY2Rnsv6uzT8ZS6xO8bM8WClCszfr+3 2UESTZeWJreQfs82l6td3wsLsNo7xAOgkgkMFCVK1nxaq0nL16cVvLakSs4lN89J WI/HZUoYudLihQS+dLl2FY30gwZV4AIZufsJl3kaOVET2/9yrljJ0YedI4ElPHlF nypIZuCALT0fhRhoUCP92kBc2JHq8t5L8/TG0IZzx2QRtDJhe4uc8AqC8RkeqZUF csLwdvEUN5twDhMSZpwg9ST71WieDwSh9lhcEKT1jzmlpYdexbtdvTGQO07ozx5H +o57kw== Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47ufut6r8q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 15 Jul 2025 04:47:57 +0000 (GMT) Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-748efefedb5so4723980b3a.2 for ; Mon, 14 Jul 2025 21:47:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752554876; x=1753159676; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1G81B60xsleyJTfUNHppUdfBzYqz0JcVfIPyN+RmVmM=; b=RXPmKzsqMX+A5oCljtHW2oLuSftJX71RQU6bGJ6IGdCSC/Vk6uxIJZDxHkVKYQjHYt k9jVN17/puHea5CQplV8j3zoWYY3DQKU736Rz+DGwiErcxO79TfTexSCJn5Ddp+SPkw9 U+iCJYw9GACuE2PVNUvGx9fLxsxl7/sK4Xr+4xCNFIy4tMJyv6ZhUT0Z7Hw8bTVSsS6z eGlNKiSHGQ+aE/7TXQm2qJ9nmOAqfPzyZGHK++F86r5unRfzY/hxMhDku87ePCRrdY/0 lCr+dUD8EO+9/Fiswuq/+Fgo2uIWltH/2vLCiD3eGT08k9uarorB9sH82L6mKUA/gedV EgbA== X-Forwarded-Encrypted: i=1; AJvYcCWuxuSiYHknFkTmeM0bXUAc96hwveDYcrVOOZyzcdBpJXXu7+p7Q64Ek6K4L7UCNgrmkIyD6bL6Xx8cEog=@vger.kernel.org X-Gm-Message-State: AOJu0YzX1AWhplVNS6BdgqSoxXKMnEaS74XD92kqSZVyLIqxztFDsv2h JdlTqOu2NN4X7DjRMuws16QwPve4D9XiegJUEAUPDwTswpESxLVRNJg4UklQfQco4/eQtDebGbL FDFlzyQj3jT+9bHgG3S4XKShOnNTcG8wyZYSftYD8ExMgaEDgL6SXcKyrG3dkMMFDYok= X-Gm-Gg: ASbGncsZirMX63nsJLiWKQmjLsNTMxtv4G41B6LEroxjGkSijuWfjUc+bfuaXIOTX7Z l9MqKdjkMdA/cxsi71LwZ5Hnz/zMIeGnmJMUFPuxWKp6BTwXIIHzj1dybzNR2PKmHtnqTLfmt/2 q1lstckDPjvPXjOGxkmBhXeFoyO5uriv3yt4HsKPWKWTCRyunOoG4yhvO9JRnZr3AxhNfT6ocCv jswKk7eoVnFSk3Wxmt56iqEfHqwLDleQH7KBCXUSNAXWPxRrLDfKTXWMHS/gjCVhoBVsXRIlYB8 iNng7VYzrNf6L9lwLz+Fwq7g/GZ4hSCX5GAEceSEJTfZMEvlmNkrT2SYjhW1Vbveb0OZNNk= X-Received: by 2002:a05:6a00:148c:b0:740:9d7c:aeb9 with SMTP id d2e1a72fcca58-755b4cb576cmr2345396b3a.21.1752554875861; Mon, 14 Jul 2025 21:47:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFLw7QsQsRMoAC5kgpjcNQia8kN0Ju9KrU7l9OxO3SkPSGi12dP1bd89nTq4dVCoxD0vfJycQ== X-Received: by 2002:a05:6a00:148c:b0:740:9d7c:aeb9 with SMTP id d2e1a72fcca58-755b4cb576cmr2345327b3a.21.1752554875237; Mon, 14 Jul 2025 21:47:55 -0700 (PDT) Received: from [10.219.56.108] ([202.46.23.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74eb9dd5d30sm11715343b3a.5.2025.07.14.21.47.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Jul 2025 21:47:54 -0700 (PDT) Message-ID: <08a0b50c-76e3-5c34-22b0-74b8d20c8e63@oss.qualcomm.com> Date: Tue, 15 Jul 2025 10:17:41 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH v10 01/10] power: reset: reboot-mode: Add device tree node-based registration Content-Language: en-US To: Dmitry Baryshkov Cc: Bartosz Golaszewski , Bjorn Andersson , Sebastian Reichel , Rob Herring , Sudeep Holla , Souvik Chakravarty , Krzysztof Kozlowski , Conor Dooley , Andy Yan , Mark Rutland , Lorenzo Pieralisi , Arnd Bergmann , Olof Johansson , Konrad Dybcio , cros-qcom-dts-watchers@chromium.org, Vinod Koul , Catalin Marinas , Will Deacon , Florian Fainelli , Elliot Berman , Stephen Boyd , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Andre Draszik , Alim Akhtar , linux-samsung-soc@vger.kernel.org, Wei Xu , linux-rockchip@lists.infradead.org, Baolin Wang , Sen Chu , Sean Wang , Macpaul Lin , AngeloGioacchino Del Regno , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Nicolas Ferre , Alexandre Belloni , Elliot Berman , Srinivas Kandagatla References: <20250710-arm-psci-system_reset2-vendor-reboots-v10-0-b2d3b882be85@oss.qualcomm.com> <20250710-arm-psci-system_reset2-vendor-reboots-v10-1-b2d3b882be85@oss.qualcomm.com> <5zlix4hfxkz447g6e6imjlatmnf26pvunnsmfkol7mhvropq6o@k7wr6h4hyqtg> From: Shivendra Pratap In-Reply-To: <5zlix4hfxkz447g6e6imjlatmnf26pvunnsmfkol7mhvropq6o@k7wr6h4hyqtg> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Authority-Analysis: v=2.4 cv=e7gGSbp/ c=1 sm=1 tr=0 ts=6875dd7d cx=c_pps a=rEQLjTOiSrHUhVqRoksmgQ==:117 a=j4ogTh8yFefVWWEFDRgCtg==:17 a=IkcTkHD0fZMA:10 a=Wb1JkmetP80A:10 a=EUspDBNiAAAA:8 a=w5sRTUNUNuywR65qw8YA:9 a=QEXdDO2ut3YA:10 a=2VI0MkxyNR6bbpdq8BZq:22 X-Proofpoint-GUID: Wrc0ylHhdVBHHHmS5s3wXzcPDoLife6r X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNzE1MDA0MSBTYWx0ZWRfX6Gb5u/xTovNT NX17jQHrNRCMIW6prh80byteB5SgjXNIuwf/i4+pNWR5z0/75EWiM7N0YE+b6m8ffAWKnWjsLCE WMBaBe2EPNu8rY4EG4YWcHCMChmUedkIOZHi0zq+kpAIN+sFBKFYD1KC0fjJgg25VZNwx4C+jTU f6V5r6B0yrAChCNZjaOec9NM7EmB0mCYtBY5alQbaxaq4u134uwOrVtgKltm9+eXlpxp1xIPD85 dkoAiPtHI5uHQOWJFFUVgYEsC9JFXD/rw/bCgFVhwGQTlL5qaayJ9glxL/ObyhvIlnbX7HaoT9h m4y/2tiqPF8ESU8FWMzeRJ72TSXWmM1ewpFZ6+ROxtia9gZ9f322cFc0IrG1pRwgR5hpHxmESLI RmtBY4tSJEJXZUordkWpOzBJnYQSP6lv4zs7eDut1XDWaGK7WLnbeRSto192fyWdSC4gBy87 X-Proofpoint-ORIG-GUID: Wrc0ylHhdVBHHHmS5s3wXzcPDoLife6r X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.7,FMLib:17.12.80.40 definitions=2025-07-14_03,2025-07-14_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 priorityscore=1501 mlxscore=0 spamscore=0 suspectscore=0 phishscore=0 bulkscore=0 impostorscore=0 clxscore=1015 adultscore=0 malwarescore=0 mlxlogscore=999 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2507150041 On 7/15/2025 4:41 AM, Dmitry Baryshkov wrote: > On Thu, Jul 10, 2025 at 02:45:43PM +0530, Shivendra Pratap wrote: >> The reboot-mode driver does not have a strict requirement for >> device-based registration. It primarily uses the device's of_node >> to read mode- properties and the device pointer for logging. >> >> Remove the dependency on struct device and introduce support for >> Device Tree (DT) node-based registration. This enables drivers >> that are not associated with a struct device to leverage the >> reboot-mode framework. >> >> Signed-off-by: Shivendra Pratap >> --- >> drivers/power/reset/reboot-mode.c | 23 +++++++++++++---------- >> include/linux/reboot-mode.h | 2 +- >> 2 files changed, 14 insertions(+), 11 deletions(-) >> >> diff --git a/drivers/power/reset/reboot-mode.c b/drivers/power/reset/reboot-mode.c >> index fba53f638da04655e756b5f8b7d2d666d1379535..61f647b23959789a313f3af0bd967abcad45fa43 100644 >> --- a/drivers/power/reset/reboot-mode.c >> +++ b/drivers/power/reset/reboot-mode.c >> @@ -12,6 +12,7 @@ >> #include >> >> #define PREFIX "mode-" >> +#define pr_fmt(fmt) "reboot-mode: " fmt > > This wasn't really tested. If I remember correctly, it should be defined > before the first include. yes. fixing this in next patch. > >> >> struct mode_info { >> const char *mode; >