Re: [PATCH v20 06/10] power: reset: Add psci-reboot-mode driver

Shivendra Pratap
2026-03-05T17:07:09Z

On 05-03-2026 15:32, Bartosz Golaszewski wrote:
> On Wed, 4 Mar 2026 19:03:06 +0100, Shivendra Pratap
> <shivendra.pratap@oss.qualcomm.com> said:
>> PSCI supports different types of resets like COLD reset, ARCH WARM
>> reset, vendor-specific resets. Currently there is no common driver that
>> handles all supported psci resets at one place. Additionally, there is

[snip..]

>> +static int psci_reboot_mode_register_device(struct faux_device *fdev)
>> +{
>> + struct reboot_mode_driver *reboot;
>> + int ret;
>> +
>> + reboot = devm_kzalloc(&fdev->dev, sizeof(*reboot), GFP_KERNEL);
>
> Have you verified that the faux device is actually getting bound? This is not
> probe(), you don't supply any faux operations when calling faux_device_create().

yes. It was verified. faux device got created like below and the
end-to-end use-cases are also working fine.

few logs from device:
--
# find / -name psci-reboot-mode
/sys/devices/faux/psci-reboot-mode
/sys/bus/faux/devices/psci-reboot-mode
/sys/bus/faux/drivers/faux_driver/psci-reboot-mode

# ls ./sys/devices/faux/psci-reboot-mode
driver subsystem uevent

--

>
> You should pass the address of this function in faux_device_ops instead of
> calling it directly.

In last patch, we were using a probe function. As faux_device_create,
calls the probe from its internal operations, "of_node" can only be
assigned from inside of faux device probe.

As our primary requirement is to assign reboot-mode of_node to the faux
device, thought to make it this way. (As we did not want to assign it
inside the faux device probe).

thanks,
Shivendra