[PATCH v5 2/3] phy: qcom: qmp-combo: get the USB3 & DisplayPort lanes mapping from DT
Konrad Dybcio
konrad.dybcio at oss.qualcomm.com
Fri Oct 10 01:49:53 PDT 2025
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 at oss.qualcomm.com>
>>> Signed-off-by: Neil Armstrong <neil.armstrong at linaro.org>
>>> ---
[...]
>>> +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
Konrad
More information about the linux-phy
mailing list