Re: [PATCH v2 2/2] dt-bindings: xen: Add xen,scmi-devid property description for SCMI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 28, 2022 at 08:52:04AM +0000, Oleksii Moisieiev wrote:

[...]

>
> Based on what Sudeep have suggested, I think we may think about the approach
> of the Generic Linux device-id, which can be used for SCMI needs as the
> device id.
>
> I have some ideas, how the generic device_id can be implemented.
> From my understanding - the Generic Device Id is the unique identifier, which
> can be set for the Device node in the Device-tree. This identifier is
> already set for each node by DTC and called phandle.
>

IIUC phandle is used as reference to the device node in the device tree
and it is generated by DTC. I assume we can't use that for the "device ID"
being discussed under the $subject.

> I've tried setting phandle for the device-nodes, such as:
>
> &usb0 {
>     /* .... */
> 	phandle = <0x10>;
> }
>
> DTC seems to work properly with this constant phandle. All links works
> for usb0 and all nodes, which doesn't have constant phandle receives
> calculated phandle during device-tree compilation.
>

Indeed.

> Also DTC will fail if I set 2 same phandle values in different
> device nodes. So we can rely on phandle as on the unique device id.
>
> What do you think about using phandle to set the device_id?
>
> The alternative way I see for now is to itroduce additional property to SCMI
> node, which includes list of the device-ids, such as:
>

I don't like this idea as this means every user of the "device ID" property
will now have to add such a list which sounds like a duplication to me.

> scmi {
> 	compatible = "arm,scmi-smc";
> 	/* ... */
> 	device-ids = <&usb0 17,
> 				  &usb1 42,
> 				  ....
> 				>;
> }
>
> Looking forward for your opinion.
> Maybe you can share some ideas about how the device-id can be
> implemented?

--
Regards,
Sudeep



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux