On Wed, May 17, 2023 at 2:22 PM Rafael J. Wysocki <rafael@xxxxxxxxxx> wrote: > > On Wed, May 17, 2023 at 1:54 PM Sakari Ailus > <sakari.ailus@xxxxxxxxxxxxxxx> wrote: [cut] > > > > + local_port = &local_swnodes->ports[local_index]; > > > > + local_node = &local_swnodes->nodes[ACPI_DEVICE_SWNODE_EP(local_index)]; > > > > + local_port->remote_ep_ref[0] = SOFTWARE_NODE_REFERENCE(local_node); > > > > > > This looks odd. Is local_port pointing to its own node as a remote > > > endpont, or am I confused? > > > > This is a reference to a software node that will be, in turn, referenced by > > the "remote-endpoint" property entry in the remote node. Look for > > ACPI_DEVICE_SWNODE_EP_REMOTE_EP a few lines below these. > > To be precise, IIUC, it is going to be the "remote-endpoint" value for > the remote node. > > OK, thanks for the explanation. This isn't exactly straightforward TBH. So I'd arrange it so that the value of the "remote-endpoint" property in a given node is stored in that node (the value itself being a reference to another endpoint).