[PATCH v19 06/10] power: reset: Add psci-reboot-mode driver
Bartosz Golaszewski
brgl at kernel.org
Tue Jan 6 04:34:26 PST 2026
On Mon, Jan 5, 2026 at 7:06 PM Shivendra Pratap
<shivendra.pratap at oss.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
More information about the linux-arm-kernel
mailing list