[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPTae5Jn_visQUHaHvb2yXZdBhFySz+24TJuY8uyVB1v7tVisA@mail.gmail.com>
Date: Mon, 6 Oct 2025 16:45:08 -0700
From: Badhri Jagan Sridharan <badhri@...gle.com>
To: Michael Grzeschik <m.grzeschik@...gutronix.de>
Cc: Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>, kernel@...gutronix.de,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
Hans de Goede <hdegoede@...hat.com>, jun.li@....com
Subject: Re: [PATCH] tcpm: switch check for role_sw device with fw_node
.
On Fri, Oct 3, 2025 at 3:34 AM Michael Grzeschik
<m.grzeschik@...gutronix.de> wrote:
>
> When there is no port entry in the tcpci entry itself, the driver will
> trigger an error message "OF: graph: no port node found in /...../typec" .
>
> It is documented that the dts node should contain an connector entry
> with ports and several port pointing to devices witch usb-role-switch
s/witch/with
> property set. Only when those connecter entry is missing, it should
s/connecter/connector
> check for port entries in the main node.
>
> We switch the search order for looking after ports, which will avoid the
> failure message while there are explicit connector entries.
>
Missing Fixes: tag ?
> Signed-off-by: Michael Grzeschik <m.grzeschik@...gutronix.de>
> ---
> drivers/usb/typec/tcpm/tcpm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
> index b2a568a5bc9b0ba5c50b7031d8e21ee09cefa349..cc78770509dbc6460d75816f544173d6ab4ef873 100644
> --- a/drivers/usb/typec/tcpm/tcpm.c
> +++ b/drivers/usb/typec/tcpm/tcpm.c
> @@ -7876,9 +7876,9 @@ struct tcpm_port *tcpm_register_port(struct device *dev, struct tcpc_dev *tcpc)
>
> port->partner_desc.identity = &port->partner_ident;
>
> - port->role_sw = usb_role_switch_get(port->dev);
> + port->role_sw = fwnode_usb_role_switch_get(tcpc->fwnode);
Seems to be a reasonable thing to do esp. given that bindings
documention mentions that port/ports node is part of connector
class:https://github.com/gregkh/linux/blob/master/Documentation/devicetree/bindings/connector/usb-connector.yaml#L189.
Adding hdegoede@, jun.li@ as they submitted patches for USB role switch in tcpm.
hdegoede@, jun.li@ Please let us know if there are any concerns from
your side regarding accepting this patch.
Thanks,
Badhri
>
> if (!port->role_sw)
> - port->role_sw = fwnode_usb_role_switch_get(tcpc->fwnode);
> + port->role_sw = usb_role_switch_get(port->dev);
> if (IS_ERR(port->role_sw)) {
> err = PTR_ERR(port->role_sw);
> goto out_destroy_wq;
>
> ---
> base-commit: e406d57be7bd2a4e73ea512c1ae36a40a44e499e
> change-id: 20251003-b4-ml-topic-tcpm-27146727d76a
>
> Best regards,
> --
> Michael Grzeschik <m.grzeschik@...gutronix.de>
>
Powered by blists - more mailing lists