Hi, On Sun, Jun 21, 2026 at 10:06:42AM +0800, Peng Fan (OSS) wrote: > From: Peng Fan <[email protected]> > > Check the pd-disable property in the connector node during > tcpm_post_probe(). When set, skip tcpm_port_init() and > tcpm_poll_event() so the TCPCI driver is probed (I2C accessible, > ops available) but the PD state machine does not run. > > This is needed for dual-role data ports where running the state > machine during probe would disrupt an already-established USB > connection. > > Signed-off-by: Peng Fan <[email protected]> > ---
Reviewed-by: Sebastian Reichel <[email protected]> -- Sebastian > drivers/usb/tcpm/tcpm.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/drivers/usb/tcpm/tcpm.c b/drivers/usb/tcpm/tcpm.c > index 1ce46118fea..32c67b8886e 100644 > --- a/drivers/usb/tcpm/tcpm.c > +++ b/drivers/usb/tcpm/tcpm.c > @@ -2306,8 +2306,15 @@ static void tcpm_poll_event(struct udevice *dev) > > int tcpm_post_probe(struct udevice *dev) > { > - int ret = tcpm_port_init(dev); > + const struct dm_tcpm_ops *drvops = dev_get_driver_ops(dev); > + ofnode connector; > + int ret; > + > + ret = drvops->get_connector_node(dev, &connector); > + if (!ret && ofnode_read_bool(connector, "pd-disable")) > + return 0; > > + ret = tcpm_port_init(dev); > if (ret < 0) { > dev_err(dev, "failed to tcpm port init\n"); > return ret; > > -- > 2.51.0 >
signature.asc
Description: PGP signature
