[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMRc=McH6jsaKROyMGAhH_gGSiQtqvuVmrUODgtSp0hX8g06=A@mail.gmail.com>
Date: Tue, 6 Jan 2026 13:34:26 +0100
From: Bartosz Golaszewski <brgl@...nel.org>
To: Shivendra Pratap <shivendra.pratap@....qualcomm.com>
Cc: Lorenzo Pieralisi <lpieralisi@...nel.org>, Arnd Bergmann <arnd@...db.de>,
Bjorn Andersson <andersson@...nel.org>, Sebastian Reichel <sre@...nel.org>, Rob Herring <robh@...nel.org>,
Sudeep Holla <sudeep.holla@....com>, Souvik Chakravarty <Souvik.Chakravarty@....com>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Andy Yan <andy.yan@...k-chips.com>,
John Stultz <john.stultz@...aro.org>, Matthias Brugger <matthias.bgg@...il.com>,
Moritz Fischer <moritz.fischer@...us.com>, Mark Rutland <mark.rutland@....com>,
Conor Dooley <conor+dt@...nel.org>, Konrad Dybcio <konradybcio@...nel.org>,
Florian Fainelli <florian.fainelli@...adcom.com>, Krzysztof Kozlowski <krzk@...nel.org>,
Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>,
Mukesh Ojha <mukesh.ojha@....qualcomm.com>, Andre Draszik <andre.draszik@...aro.org>,
Kathiravan Thirumoorthy <kathiravan.thirumoorthy@....qualcomm.com>, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
Srinivas Kandagatla <srini@...nel.org>
Subject: Re: [PATCH v19 06/10] power: reset: Add psci-reboot-mode driver
On Mon, Jan 5, 2026 at 7:06 PM Shivendra Pratap
<shivendra.pratap@....qualcomm.com> wrote:
>
> >> +static int __init psci_reboot_mode_init(void)
> >> +{
> >> + struct faux_device *fdev;
> >> +
> >> + fdev = faux_device_create("psci-reboot-mode", NULL, &psci_reboot_mode_ops);
> >> + if (!fdev)
> >> + return -ENODEV;
> >
> > This will always create this device for everyone who includes this
> > module. Move the of_find_compatible_node(NULL, NULL, "arm,psci-1.0")
> > call from probe() here instead and don't create the device if it
> > fails.
>
> Ack.
> Will move both calls to init before creating the faux device.
>
> psci_np = of_find_compatible_node(NULL, NULL, "arm,psci-1.0");
> and
> np = of_find_node_by_name(psci_np, "reboot-mode");
> --
>
On a second glance - and I may be totally wrong - would it be possible
to switch to using the auxiliary bus and create this device from
drivers/firmware/psci/psci.c? That would be even cleaner.
Bart
Powered by blists - more mailing lists