Re: [PATCH v12 0/8] Implement vendor resets for PSCI SYSTEM_RESET2

Krzysztof Kozlowski
2025-07-24T14:38:19Z

On 24/07/2025 16:04, Shivendra Pratap wrote:
>>>> For the sysfs bits, should not we be seeing "psci" instead of "reboot-mode" twice in this path:
>>>>
>>>> # cat /sys/class/reboot-mode/reboot-mode/reboot_modes
>>>> powercycle
>>> As per current patch, we create a class named - "reboot-mode".
>>> /sys/class/reboot-mode
>>>
>>> Then comes the DT node name of the registering driver.
>>> /sys/class/reboot-mode/ /
>>
>> This means that node name becomes part of the ABI? I am not happy about
>> it. Where is such ABI documented? Because your last patch tells
>> something completely else!
>>
>> I strongly insist using compatible as way to find your device, not node
>> names.
> It will look better to switch to compatible. Will define a compatible for
> psci reboot-mode binding and align the patch to use the compatible for sysfs.
> Current patch defines reboot-mode as a property to psci, hope its fine to
> define a compatible for this property like "psci-vendor-reset" or
> "psci-reboot-modes"?

Hm, sorry, what? That's not what I ask, but considering inconsistency
mentioned here and in actual ABI document I do not even know what to
suggest.

>
>>
>> In any case you need to document such ABI in Devicetree bindings,
>> because sysfs ABI is not enough.
> should reboot-mode Devicetree binding document this ABI? Can you
> please share some more detail on this?

The binding for the device, whose node name you are using here as ABI,
should document the ABI.

Best regards,
Krzysztof