[PATCH v19 06/10] power: reset: Add psci-reboot-mode driver
Shivendra Pratap
shivendra.pratap at oss.qualcomm.com
Mon Mar 2 04:30:52 PST 2026
On 02-01-2026 17:27, Bartosz Golaszewski wrote:
> On Sun, Dec 28, 2025 at 6:21 PM Shivendra Pratap
> <shivendra.pratap at oss.qualcomm.com> wrote:
>>
>
> [snip]
>
>> +
>> +static int psci_reboot_mode_probe(struct faux_device *fdev)
>> +{
>> + struct reboot_mode_driver *reboot;
>> + struct device_node *psci_np;
>> + struct device_node *np;
>> + int ret;
>> +
>> + psci_np = of_find_compatible_node(NULL, NULL, "arm,psci-1.0");
>> + if (!psci_np)
>> + return -ENODEV;
>> +
>> + /*
>> + * Find the psci:reboot-mode node.
>> + * If NULL, continue to register predefined modes.
>> + * np refcount to be handled by dev;
>> + * psci_np refcount is decremented by of_find_node_by_name;
>> + */
>
> Can you make this comment into full sentences, I had trouble parsing
> the meaning for a minute.
>
>> + np = of_find_node_by_name(psci_np, "reboot-mode");
>> + fdev->dev.of_node = np;
>
> The logic of the device assigning its own node is a bit sketchy,
> ideally this should be done before the device probes.
Got one doubt while trying to move it to init.
We used a faux_device_create() in init.
faux_device_create() calls the probe function from within its
implementation, so do not find a way to set the node "fdev->dev.of_node
= np" before the probe call when using faux device.
thanks,
Shivendra
More information about the linux-arm-kernel
mailing list