From: Pankaj Patil <pankaj.patil@oss.qualcomm.com>
To: Shivendra Pratap <shivendra.pratap@oss.qualcomm.com>,
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>,
Bartosz Golaszewski <brgl@kernel.org>,
Sudeep Holla <sudeep.holla@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>
Subject: Re: [PATCH v21 05/13] mfd: psci-mfd: Add PSCI MFD driver for cpuidle-psci-domain cell
Date: Wed, 29 Apr 2026 20:10:24 +0530 [thread overview]
Message-ID: <e494ba66-3f8d-4d71-a82e-b37f5b34d45d@oss.qualcomm.com> (raw)
In-Reply-To: <20260427-arm-psci-system_reset2-vendor-reboots-v21-5-dcf937775e73@oss.qualcomm.com>
On 4/27/2026 11:04 PM, Shivendra Pratap wrote:
> PSCI has multiple kernel consumers, such as cpuidle-psci-domain.
> Currently, both the PSCI core driver and cpuidle-psci-domain bind
> directly to the same PSCI node "arm,psci-1.0". Additional consumers, if
> introduced, would also need to bind in the same way, leading to several
> drivers attached to a single device node.
>
> Introduce a PSCI MFD driver that binds to "arm,psci-1.0" and registers
> PSCI child cells. As the first user, register cpuidle-psci-domain as a
> child cell.
>
> Update cpuidle-psci-domain to probe as an MFD child and use the parent
> PSCI node for power-domain traversal.
>
> Signed-off-by: Shivendra Pratap <shivendra.pratap@oss.qualcomm.com>
> ---
> MAINTAINERS | 1 +
> drivers/cpuidle/Kconfig.arm | 1 +
> drivers/cpuidle/cpuidle-psci-domain.c | 9 +-------
> drivers/mfd/Kconfig | 10 ++++++++
> drivers/mfd/Makefile | 2 ++
> drivers/mfd/psci-mfd.c | 43 +++++++++++++++++++++++++++++++++++
> 6 files changed, 58 insertions(+), 8 deletions(-)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index c871acf2179ce16c80b404027e6b969c7787a6bb..333b01fa00b8fbd15e6f31a6b9af47600411624e 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -21239,6 +21239,7 @@ L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
> S: Maintained
> F: Documentation/devicetree/bindings/arm/psci.yaml
> F: drivers/firmware/psci/
> +F: drivers/mfd/psci-mfd.c
> F: include/linux/psci.h
> F: include/uapi/linux/psci.h
>
> diff --git a/drivers/cpuidle/Kconfig.arm b/drivers/cpuidle/Kconfig.arm
> index a1ee475d180dacab245510674514811aec337ad3..1a1316d11e0a2e4f61801586229f5104e2435865 100644
> --- a/drivers/cpuidle/Kconfig.arm
> +++ b/drivers/cpuidle/Kconfig.arm
> @@ -36,6 +36,7 @@ config ARM_PSCI_CPUIDLE_DOMAIN
> bool "PSCI CPU idle Domain"
> depends on ARM_PSCI_CPUIDLE
> depends on PM_GENERIC_DOMAINS_OF
> + depends on MFD_PSCI
Should this be select MFD_PSCI?
We're seeing bootup issues on Glymur when MFD_PSCI is not y
> select DT_IDLE_GENPD
> default y
> help
> diff --git a/drivers/cpuidle/cpuidle-psci-domain.c b/drivers/cpuidle/cpuidle-psci-domain.c
> index b9e4ad7d43a3310a76ce62018dff0af1488e33d2..a2d01810f2957abdfa52ae66503dc0cbb205f163 100644
> --- a/drivers/cpuidle/cpuidle-psci-domain.c
> +++ b/drivers/cpuidle/cpuidle-psci-domain.c
> @@ -17,7 +17,6 @@
> #include <linux/pm_runtime.h>
> #include <linux/psci.h>
> #include <linux/slab.h>
> -#include <linux/string.h>
>
> #include "cpuidle-psci.h"
> #include "dt_idle_genpd.h"
> @@ -122,14 +121,9 @@ static void psci_pd_remove(void)
> }
> }
>
> -static const struct of_device_id psci_of_match[] = {
> - { .compatible = "arm,psci-1.0" },
> - {}
> -};
> -
> static int psci_cpuidle_domain_probe(struct platform_device *pdev)
> {
> - struct device_node *np = pdev->dev.of_node;
> + struct device_node *np = pdev->dev.parent->of_node;
> bool use_osi = psci_has_osi_support();
> int ret = 0, pd_count = 0;
>
> @@ -181,7 +175,6 @@ static struct platform_driver psci_cpuidle_domain_driver = {
> .probe = psci_cpuidle_domain_probe,
> .driver = {
> .name = "psci-cpuidle-domain",
> - .of_match_table = psci_of_match,
> },
> };
>
> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index 7192c9d1d268e93d1557ca6519ac96056e37e221..75ea5b47315cedfd1153899eef28614a165a14f5 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -2376,6 +2376,16 @@ config MFD_KHADAS_MCU
> additional drivers must be enabled in order to use the functionality
> of the device.
>
> +config MFD_PSCI
> + bool "PSCI MFD for psci child cells"
> + depends on ARM_PSCI_FW
> + select MFD_CORE
> + help
> + PSCI MFD registers PSCI child cells and exposes them as
> + platform devices. Child drivers are probed only if enabled in the
> + kernel configuration. Select this option whenever a supported PSCI
> + child driver is selected.
> +
> config MFD_ACER_A500_EC
> tristate "Support for Acer Iconia Tab A500 Embedded Controller"
> depends on I2C
> diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
> index e75e8045c28afae975ac61d282b3b85af5440119..36e872b11b995135a04ca24c33fd3a4d08e4f49a 100644
> --- a/drivers/mfd/Makefile
> +++ b/drivers/mfd/Makefile
> @@ -24,6 +24,8 @@ obj-$(CONFIG_MFD_EXYNOS_LPASS) += exynos-lpass.o
> obj-$(CONFIG_MFD_GATEWORKS_GSC) += gateworks-gsc.o
> obj-$(CONFIG_MFD_MACSMC) += macsmc.o
>
> +obj-$(CONFIG_MFD_PSCI) += psci-mfd.o
> +
> obj-$(CONFIG_MFD_TI_LP873X) += lp873x.o
> obj-$(CONFIG_MFD_TI_LP87565) += lp87565.o
> obj-$(CONFIG_MFD_TI_AM335X_TSCADC) += ti_am335x_tscadc.o
> diff --git a/drivers/mfd/psci-mfd.c b/drivers/mfd/psci-mfd.c
> new file mode 100644
> index 0000000000000000000000000000000000000000..7affd6bb09dd83452664edeccb09290fe4f43186
> --- /dev/null
> +++ b/drivers/mfd/psci-mfd.c
> @@ -0,0 +1,43 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
> + */
> +
> +#include <linux/mfd/core.h>
> +#include <linux/module.h>
> +#include <linux/of.h>
> +#include <linux/platform_device.h>
> +
> +static const struct mfd_cell psci_cells[] = {
> + {
> + .name = "psci-cpuidle-domain",
> + },
> +};
> +
> +static int psci_mfd_probe(struct platform_device *pdev)
> +{
> + return devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO, psci_cells,
> + ARRAY_SIZE(psci_cells), NULL, 0, NULL);
> +}
> +
> +static const struct of_device_id psci_mfd_of_match[] = {
> + { .compatible = "arm,psci-1.0" },
> + { }
> +};
> +
> +static struct platform_driver psci_mfd_driver = {
> + .probe = psci_mfd_probe,
> + .driver = {
> + .name = "psci-mfd",
> + .of_match_table = psci_mfd_of_match,
> + },
> +};
> +
> +static int __init psci_mfd_init(void)
> +{
> + return platform_driver_register(&psci_mfd_driver);
> +}
> +
> +core_initcall(psci_mfd_init);
> +
> +MODULE_LICENSE("GPL");
>
next prev parent reply other threads:[~2026-04-29 14:40 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 17:34 [PATCH v21 00/13] Implement PSCI reboot mode driver for PSCI resets Shivendra Pratap
2026-04-27 17:34 ` [PATCH v21 01/13] power: reset: reboot-mode: Remove devres based allocations Shivendra Pratap
2026-04-27 17:34 ` [PATCH v21 02/13] power: reset: reboot-mode: Add support for 64 bit magic Shivendra Pratap
2026-04-28 7:38 ` Bartosz Golaszewski
2026-04-27 17:34 ` [PATCH v21 03/13] power: reset: reboot-mode: Add support for predefined reboot modes Shivendra Pratap
2026-04-28 7:46 ` Bartosz Golaszewski
2026-04-27 17:34 ` [PATCH v21 04/13] firmware: psci: Introduce command-based with magic Shivendra Pratap
2026-04-28 16:27 ` Shivendra Pratap
2026-04-27 17:34 ` [PATCH v21 05/13] mfd: psci-mfd: Add PSCI MFD driver for cpuidle-psci-domain cell Shivendra Pratap
2026-04-28 7:52 ` Bartosz Golaszewski
2026-04-29 14:40 ` Pankaj Patil [this message]
2026-04-29 17:16 ` Shivendra Pratap
2026-04-27 17:34 ` [PATCH v21 06/13] dt-bindings: arm: Document reboot mode magic Shivendra Pratap
2026-04-28 7:52 ` Bartosz Golaszewski
2026-04-27 17:34 ` [PATCH v21 07/13] power: reset: Add psci-reboot-mode driver Shivendra Pratap
2026-04-28 7:56 ` Bartosz Golaszewski
2026-04-28 12:33 ` Shivendra Pratap
2026-04-27 17:34 ` [PATCH v21 08/13] mfd: core: Add firmware-node support to MFD cells Shivendra Pratap
2026-04-28 8:03 ` Bartosz Golaszewski
2026-04-28 12:17 ` Shivendra Pratap
2026-04-28 12:51 ` Bartosz Golaszewski
2026-04-28 13:03 ` Shivendra Pratap
2026-04-29 9:45 ` Shivendra Pratap
2026-04-29 9:50 ` Bartosz Golaszewski
2026-04-29 16:10 ` Shivendra Pratap
2026-04-30 12:46 ` Bartosz Golaszewski
2026-04-27 17:34 ` [PATCH v21 09/13] mfd: psci-mfd: Add psci-reboot-mode child cell Shivendra Pratap
2026-04-27 17:34 ` [PATCH v21 10/13] arm64: dts: qcom: Add psci reboot-modes for kodiak boards Shivendra Pratap
2026-04-28 8:03 ` Bartosz Golaszewski
2026-04-27 17:34 ` [PATCH v21 11/13] arm64: dts: qcom: Add psci reboot-modes for lemans boards Shivendra Pratap
2026-04-28 8:04 ` Bartosz Golaszewski
2026-04-27 17:34 ` [PATCH v21 12/13] arm64: dts: qcom: Add psci reboot-modes for monaco boards Shivendra Pratap
2026-04-28 8:04 ` Bartosz Golaszewski
2026-04-27 17:34 ` [PATCH v21 13/13] arm64: dts: qcom: Add psci reboot-modes for talos boards Shivendra Pratap
2026-04-28 8:04 ` Bartosz Golaszewski
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=e494ba66-3f8d-4d71-a82e-b37f5b34d45d@oss.qualcomm.com \
--to=pankaj.patil@oss.qualcomm.com \
--cc=Souvik.Chakravarty@arm.com \
--cc=andersson@kernel.org \
--cc=andre.draszik@linaro.org \
--cc=andy.yan@rock-chips.com \
--cc=arnd@arndb.de \
--cc=brgl@kernel.org \
--cc=christian.loehle@arm.com \
--cc=conor+dt@kernel.org \
--cc=daniel.lezcano@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=florian.fainelli@broadcom.com \
--cc=gregkh@linuxfoundation.org \
--cc=john.stultz@linaro.org \
--cc=kathiravan.thirumoorthy@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mark.rutland@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=moritz.fischer@ettus.com \
--cc=mukesh.ojha@oss.qualcomm.com \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=shivendra.pratap@oss.qualcomm.com \
--cc=sre@kernel.org \
--cc=srini@kernel.org \
--cc=sudeep.holla@kernel.org \
--cc=ulfh@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