Re: [PATCH v5 2/3] phy: qcom: qmp-combo: get the USB3 & DisplayPort lanes mapping from DT

From: Neil Armstrong
Date: Fri Oct 10 2025 - 11:28:51 EST


On 10/10/25 10:49, Konrad Dybcio wrote:
On 10/9/25 6:42 PM, Neil Armstrong wrote:
On 10/8/25 11:31, Konrad Dybcio wrote:
On 10/6/25 3:55 PM, Neil Armstrong wrote:
The QMP USB3/DP Combo PHY hosts an USB3 phy and a DP PHY on top
of a combo glue to route either lanes to the 4 shared physical lanes.

The routing of the lanes can be:
- 2 DP + 2 USB3
- 4 DP
- 2 USB3

Get the lanes mapping from DT and stop registering the USB-C
muxes in favor of a static mode and orientation detemined
by the lanes mapping.

This allows supporting boards with direct connection of USB3 and
DisplayPort lanes to the QMP Combo PHY lanes, not using the
USB-C Altmode feature.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
Signed-off-by: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
---

[...]

+err_node_put:
+    of_node_put(ep);

__free(device_node)

why ? ep is not allocated, it goes up to:

static struct device_node *__of_get_next_child(const struct device_node *node,
                        struct device_node *prev)
{
    struct device_node *next;

    if (!node)
        return NULL;

    next = prev ? prev->sibling : node->child;
    of_node_get(next);
    of_node_put(prev);
    return next;
}

_free(device_node) calls device_node_put() without you having to
add explicit gotos

Oh, yeah this one, of course. Indeed I'll use that.

Neil



Konrad