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 v21 08/13] mfd: core: Add firmware-node support to MFD cells
Date: Wed, 29 Apr 2026 15:15:56 +0530 [thread overview]
Message-ID: <ce92a493-5016-41a2-8337-d2227cdf760a@oss.qualcomm.com> (raw)
In-Reply-To: <d6112b9c-01ea-483c-98fe-b480e78872e5@oss.qualcomm.com>
On 28-04-2026 18:33, Shivendra Pratap wrote:
>
>
> On 28-04-2026 18:21, Bartosz Golaszewski wrote:
>> On Tue, Apr 28, 2026 at 2:18 PM Shivendra Pratap
>> <shivendra.pratap@oss.qualcomm.com> wrote:
>>>
>>>
>>>
>>> On 28-04-2026 13:33, Bartosz Golaszewski wrote:
>>>> On Mon, 27 Apr 2026 19:34:48 +0200, Shivendra Pratap
>>>> <shivendra.pratap@oss.qualcomm.com> said:
>>>>> MFD core has no way to register a child device using an explicit
>>>>> firmware
>>>>> node. This prevents drivers from registering child nodes when those
>>>>> nodes
>>>>> do not define a compatible string. One such example is the PSCI
>>>>> "reboot-mode" node, which omits a compatible string as it describes
>>>>> boot-states provided by the underlying firmware.
>>>>>
>>>>> Extend struct mfd_cell with an optional fwnode pointer and attach
>>>>> it to the
>>>>> child device during registration when no firmware node is already
>>>>> assigned.
>>>>>
>>>>> Signed-off-by: Shivendra Pratap <shivendra.pratap@oss.qualcomm.com>
>>>>> ---
>>>>
>>>> In the following patch you use this and violate the supposed
>>>> constness of
>>>> MFD cells. This also mean you need to modify the mfd_cell at run-
>>>> time. I would
>>>> prefer introducing a field in mfd_cell: bool use_parent_fwnode which
>>>> would
>>>> indicate to MFD core that - in case no fwnode was assigned from
>>>> other sources:
>>>> DT or software node - it should reuse the parent MFD device's node.
>>>
>>> Have one doubt on this, When we fallback to use_parent_fwnode for cell:
>>> psci-reboot-mode, at psci_reboot_mode_probe(), pDev->dev->of_node point
>>> to psci node.
>>>
>>> But we want dev->of_node to point to "reboot-mode" node. This may need
>>> an explicit assignment again of of_node?
>>>
>>
>> Ah, sorry you're right. I'd like to avoid having to modify the
>> mfd_cell entry at run-time if possible.
>>
>> How about a callback in mfd_cell like:
>>
>> struct fwnode_handle *(*get_fwnode)(struct device *parent);
>>
>> If set, it would be called from MFD core and would do the name lookup
>> and return the fwnode which would then be assigned to the cell device?
>
Or should we just drop this patch for fwnode in mfd-core?
Export a new call in reboot-mode framework as:
reboot_mode_register_node(struct reboot_mode_driver *reboot,
struct device_node *np / fwnode)
Use the parent node in psci-reboot-mode and find reboot-mode and call
reboot_mode_register_node?
thanks,
Shivendra
> sure. thanks. We can make it a callback from MFD core.
>
> thanks,
> Shivendra
next prev parent reply other threads:[~2026-04-29 9:46 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
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 [this message]
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=ce92a493-5016-41a2-8337-d2227cdf760a@oss.qualcomm.com \
--to=shivendra.pratap@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=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