Files
Wayne Chang 3dbe65baaa NVIDIA: SAUCE: usb: typec: ucsi: Find connector fwnode without relying on order
BugLink: https://bugs.launchpad.net/bugs/2072591

The previous code relied on the order of "connector" nodes under the
ucsi device node to determine the correct fwnode handle for a connector.
However, the order of nodes should not be relied upon when parsing device
trees, especially when using live DT overlays.

This change modifies ucsi_find_fwnode() to find the correct connector
fwnode by reading the "reg" property of each connector node and
comparing it to the connector number. If only a single connector node
exists without a "reg" property, that single node is returned.

This ensures the correct connector fwnode is found regardless of node
order in the DT.

http://nvbugs/3960851
http://nvbugs/4063694

Signed-off-by: Wayne Chang <waynec@nvidia.com>
Reviewed-by: Prathamesh Shete <pshete@nvidia.com>
Tested-by: Prathamesh Shete <pshete@nvidia.com>
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Jacob Martin <jacob.martin@canonical.com>
Acked-by: Noah Wager <noah.wager@canonical.com>
Signed-off-by: Noah Wager <noah.wager@canonical.com>
2025-07-09 14:46:05 -07:00
..