Thread (30 messages) flat view 30 messages, 7 authors, 12h ago

Re: [PATCH v8 02/16] device property: Add fwnode_graph_get_next_port_endpoint()

From: Sakari Ailus <sakari.ailus@linux.intel.com>
Date: 2026-09-04 20:22:45
Also in: driver-core, linux-acpi, linux-arm-kernel, linux-mediatek, linux-pm, linux-usb, lkml

On Fri, Sep 04, 2026 at 04:41:41PM +0800, Chen-Yu Tsai wrote:
Due to design constraints of the power sequencing API, the consumer
must first be sure that the other side is actually a provider, or it
will continually get -EPROBE_DEFER when requesting the power
sequencing descriptor.

In the upcoming USB power sequencing integration, the USB hub driver
first needs to check whether a graph connection exists, and whether
the other side of the connection is a supported connector type. The
USB port is tied to a "port" firmware node, and this new helper will
be used to get the endpoint under the known "port" firmware node.

Sashiko points out that the |prev| reference put is not done if |port|
is NULL. However it seems that the fwnode_*() and of_*() API design
implicitly makes the functions no-ops if the passed in node is NULL.
So this new addition follows the same pattern.
I'd put this last paragraph after the '---' line.
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bartosz Golaszewski <redacted>
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>

-- 
Sakari Ailus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help