public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: Shivendra Pratap <shivendra.pratap@oss•qualcomm.com>
To: Bartosz Golaszewski <brgl@kernel•org>
Cc: linux-pm@vger•kernel.org, linux-kernel@vger•kernel.org,
	linux-arm-msm@vger•kernel.org,
	linux-arm-kernel@lists•infradead.org, devicetree@vger•kernel.org,
	Florian Fainelli <florian.fainelli@broadcom•com>,
	Krzysztof Kozlowski <krzk@kernel•org>,
	Dmitry Baryshkov <dmitry.baryshkov@oss•qualcomm.com>,
	Mukesh Ojha <mukesh.ojha@oss•qualcomm.com>,
	Andre Draszik <andre.draszik@linaro•org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation•org>,
	Kathiravan Thirumoorthy
	<kathiravan.thirumoorthy@oss•qualcomm.com>,
	Srinivas Kandagatla <srini@kernel•org>,
	Sebastian Reichel <sre@kernel•org>,
	Mark Rutland <mark.rutland@arm•com>,
	Lorenzo Pieralisi <lpieralisi@kernel•org>,
	"Rafael J. Wysocki" <rafael@kernel•org>,
	Daniel Lezcano <daniel.lezcano@kernel•org>,
	Christian Loehle <christian.loehle@arm•com>,
	Ulf Hansson <ulfh@kernel•org>, Lee Jones <lee@kernel•org>,
	Rob Herring <robh@kernel•org>,
	Krzysztof Kozlowski <krzk+dt@kernel•org>,
	Conor Dooley <conor+dt@kernel•org>,
	Bjorn Andersson <andersson@kernel•org>,
	Konrad Dybcio <konradybcio@kernel•org>,
	Arnd Bergmann <arnd@arndb•de>,
	Souvik Chakravarty <Souvik.Chakravarty@arm•com>,
	Andy Yan <andy.yan@rock-chips•com>,
	Matthias Brugger <matthias.bgg@gmail•com>,
	John Stultz <john.stultz@linaro•org>,
	Moritz Fischer <moritz.fischer@ettus•com>,
	Sudeep Holla <sudeep.holla@kernel•org>
Subject: Re: [PATCH v22 07/13] power: reset: Add psci-reboot-mode driver
Date: Mon, 18 May 2026 22:15:35 +0530	[thread overview]
Message-ID: <bb032ac7-d818-48ff-9b9e-6f4534a5292d@oss.qualcomm.com> (raw)
In-Reply-To: <CAMRc=MdNVBKH_4Ps_QSG_YzW3=BgsMo0bDk6vuJuH7VheY9PmQ@mail.gmail.com>



On 18-05-2026 14:28, Bartosz Golaszewski wrote:
> On Thu, 14 May 2026 16:25:48 +0200, Shivendra Pratap
> <shivendra.pratap@oss•qualcomm.com> said:
>> PSCI supports different types of resets like SYSTEM_RESET, SYSTEM_RESET2
>> ARCH WARM reset and SYSTEM_RESET2 vendor-specific resets. Currently
>> there is no common driver that handles all supported psci resets at one
>> place. Additionally, there is no common mechanism to issue the supported
>> psci resets from userspace.
>>
>> Add a psci-reboot-mode driver, and define two types of PSCI resets,
>> predefined-resets and vendor-specific resets. Predefined-resets are
>> defined by psci driver and vendor-specific resets are defined by SoC
>> vendors, under the psci:reboot-mode node of SoC device tree.
>>
>> Register the driver with the reboot-mode framework to interface these
>> resets to userspace. When userspace initiates a supported command, pass
>> the reset arguments to the PSCI driver to enable command-based reset.
>>
>> This change allows userspace to issue supported PSCI reset commands
>> using the standard reboot system calls while enabling SoC vendors to
>> define their specific resets for PSCI.
>>
>> Signed-off-by: Shivendra Pratap <shivendra.pratap@oss•qualcomm.com>
>> ---
>>   MAINTAINERS                            |  1 +
>>   drivers/power/reset/Kconfig            | 10 +++++
>>   drivers/power/reset/Makefile           |  1 +
>>   drivers/power/reset/psci-reboot-mode.c | 72 ++++++++++++++++++++++++++++++++++
>>   4 files changed, 84 insertions(+)
>>
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index 36ba42209c0b332813a296880cd55798a5592d2a..4b0815c31679550f5ab719de4a5852990c7cc643 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -21342,6 +21342,7 @@ S:	Maintained
>>   F:	Documentation/devicetree/bindings/arm/psci.yaml
>>   F:	drivers/firmware/psci/
>>   F:	drivers/mfd/psci-mfd.c
>> +F:	drivers/power/reset/psci-reboot-mode.c
>>   F:	include/linux/psci.h
>>   F:	include/uapi/linux/psci.h
>>
>> diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
>> index 124afb99febe92450b6ae322aeed3b63fa2070df..d9d1f768b8691abc3b32f2675519f2ddbaf19b84 100644
>> --- a/drivers/power/reset/Kconfig
>> +++ b/drivers/power/reset/Kconfig
>> @@ -348,6 +348,16 @@ config NVMEM_REBOOT_MODE
>>   	  then the bootloader can read it and take different
>>   	  action according to the mode.
>>
>> +config PSCI_REBOOT_MODE
>> +	bool "PSCI reboot mode driver"
>> +	depends on OF && ARM_PSCI_FW
> 
> Can you add COMPILE_TEST coverage here too please?

Ack. thanks.

> 
>> +	select REBOOT_MODE
>> +	help
>> +	  Say y here will enable PSCI reboot mode driver. This gets
>> +	  the PSCI reboot mode arguments and passes them to psci
>> +	  driver. psci driver uses these arguments for issuing
>> +	  device reset into different boot states.
>> +
>>   config POWER_MLXBF
>>   	tristate "Mellanox BlueField power handling driver"
>>   	depends on (GPIO_MLXBF2 || GPIO_MLXBF3) && ACPI
[SNIP..]

>> +static struct platform_driver psci_reboot_mode_driver = {
>> +	.probe  = psci_reboot_mode_probe,
>> +	.driver = {
>> +		.name	= "psci-reboot-mode",
>> +	},
>> +};
>> +
> 
> You can drop the newline here.

Ack.

thanks,
Shivendra


  reply	other threads:[~2026-05-18 16:45 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-14 14:25 [PATCH v22 00/13] Implement PSCI reboot mode driver for PSCI resets Shivendra Pratap
2026-05-14 14:25 ` [PATCH v22 01/13] power: reset: reboot-mode: Remove devres based allocations Shivendra Pratap
2026-05-14 14:25 ` [PATCH v22 02/13] power: reset: reboot-mode: Add support for 64 bit magic Shivendra Pratap
2026-05-14 14:25 ` [PATCH v22 03/13] power: reset: reboot-mode: Add support for predefined reboot modes Shivendra Pratap
2026-05-14 14:25 ` [PATCH v22 04/13] firmware: psci: Introduce command-based resets Shivendra Pratap
2026-05-14 14:25 ` [PATCH v22 05/13] mfd: psci-mfd: Add PSCI MFD driver for cpuidle-psci-domain cell Shivendra Pratap
2026-05-14 14:25 ` [PATCH v22 06/13] dt-bindings: arm: Document reboot mode magic Shivendra Pratap
2026-05-14 14:25 ` [PATCH v22 07/13] power: reset: Add psci-reboot-mode driver Shivendra Pratap
2026-05-18  8:58   ` Bartosz Golaszewski
2026-05-18 16:45     ` Shivendra Pratap [this message]
2026-05-14 14:25 ` [PATCH v22 08/13] mfd: core: Add firmware-node support to MFD cells Shivendra Pratap
2026-05-18  8:57   ` Bartosz Golaszewski
2026-05-18 16:41     ` Shivendra Pratap
2026-05-20 17:51       ` Shivendra Pratap
2026-05-21 11:26   ` Lee Jones
2026-05-21 12:29     ` Bartosz Golaszewski
2026-05-21 13:24       ` Lee Jones
2026-05-21 13:36         ` Bartosz Golaszewski
2026-05-21 16:27           ` Lee Jones
2026-05-22  9:08             ` Bartosz Golaszewski
2026-05-25  9:34               ` Shivendra Pratap
2026-06-03 18:51                 ` Shivendra Pratap
2026-05-14 14:25 ` [PATCH v22 09/13] mfd: psci-mfd: Add psci-reboot-mode child cell Shivendra Pratap
2026-05-18  8:53   ` Bartosz Golaszewski
2026-05-14 14:25 ` [PATCH v22 10/13] arm64: dts: qcom: Add psci reboot-modes for kodiak boards Shivendra Pratap
2026-05-14 14:25 ` [PATCH v22 11/13] arm64: dts: qcom: Add psci reboot-modes for lemans boards Shivendra Pratap
2026-05-14 14:25 ` [PATCH v22 12/13] arm64: dts: qcom: Add psci reboot-modes for monaco boards Shivendra Pratap
2026-05-14 14:25 ` [PATCH v22 13/13] arm64: dts: qcom: Add psci reboot-modes for talos boards Shivendra Pratap
2026-05-29 13:30 ` [PATCH v22 00/13] Implement PSCI reboot mode driver for PSCI resets Shivendra Pratap

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=bb032ac7-d818-48ff-9b9e-6f4534a5292d@oss.qualcomm.com \
    --to=shivendra.pratap@oss$(echo .)qualcomm.com \
    --cc=Souvik.Chakravarty@arm$(echo .)com \
    --cc=andersson@kernel$(echo .)org \
    --cc=andre.draszik@linaro$(echo .)org \
    --cc=andy.yan@rock-chips$(echo .)com \
    --cc=arnd@arndb$(echo .)de \
    --cc=brgl@kernel$(echo .)org \
    --cc=christian.loehle@arm$(echo .)com \
    --cc=conor+dt@kernel$(echo .)org \
    --cc=daniel.lezcano@kernel$(echo .)org \
    --cc=devicetree@vger$(echo .)kernel.org \
    --cc=dmitry.baryshkov@oss$(echo .)qualcomm.com \
    --cc=florian.fainelli@broadcom$(echo .)com \
    --cc=gregkh@linuxfoundation$(echo .)org \
    --cc=john.stultz@linaro$(echo .)org \
    --cc=kathiravan.thirumoorthy@oss$(echo .)qualcomm.com \
    --cc=konradybcio@kernel$(echo .)org \
    --cc=krzk+dt@kernel$(echo .)org \
    --cc=krzk@kernel$(echo .)org \
    --cc=lee@kernel$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-arm-msm@vger$(echo .)kernel.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-pm@vger$(echo .)kernel.org \
    --cc=lpieralisi@kernel$(echo .)org \
    --cc=mark.rutland@arm$(echo .)com \
    --cc=matthias.bgg@gmail$(echo .)com \
    --cc=moritz.fischer@ettus$(echo .)com \
    --cc=mukesh.ojha@oss$(echo .)qualcomm.com \
    --cc=rafael@kernel$(echo .)org \
    --cc=robh@kernel$(echo .)org \
    --cc=sre@kernel$(echo .)org \
    --cc=srini@kernel$(echo .)org \
    --cc=sudeep.holla@kernel$(echo .)org \
    --cc=ulfh@kernel$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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