On Mon, Aug 19, 2024 at 03:38:24PM -0700, Stephen Boyd wrote: > When a single DT node has a graph connected to more than one > usb-c-connector node we can't differentiate which typec switch > registered for the device is associated with the USB connector because > the devcon matcher code assumes a 1:1 relationship between remote node > and typec switch. Furthermore, we don't have a #typec-switch-cells > property so there can only be one node per typec switch. > > Support multiple USB typec switches exposed by one node by passing the > remote endpoint node in addition to the remote node to the devcon > matcher function (devcon_match_fn_t). With this change, typec switch > drivers can register switches with the device node pointer for a graph > endpoint so that they can support more than one typec switch if > necessary. Either way, a DT property like 'mode-switch' is always in the > graph's parent node and not in the endpoint node.
> Cc: Andy Shevchenko <[email protected]> > Cc: Daniel Scally <[email protected]> > Cc: Heikki Krogerus <[email protected]> > Cc: Sakari Ailus <[email protected]> > Cc: Greg Kroah-Hartman <[email protected]> > Cc: Vinod Koul <[email protected]> > Cc: "Rafael J. Wysocki" <[email protected]> > Cc: Mika Westerberg <[email protected]> > Cc: Alexandre Belloni <[email protected]> > Cc: Ivan Orlov <[email protected]> > Cc: Rob Herring <[email protected]> > Cc: Krzysztof Kozlowski <[email protected]> > Cc: Conor Dooley <[email protected]> > Cc: <[email protected]> > Cc: <[email protected]> > Cc: <[email protected]> > Cc: Pin-yen Lin <[email protected]> Move these after --- line below. ... > drivers/base/property.c | 7 +++++-- The changes here are fine to me. ... > include/linux/property.h | 5 +++-- > -typedef void *(*devcon_match_fn_t)(const struct fwnode_handle *fwnode, const > char *id, > - void *data); > +typedef void *(*devcon_match_fn_t)(const struct fwnode_handle *fwnode, > + const struct fwnode_handle *endpoint, > + const char *id, void *data); Seems there is no explanation of the parameters here, can we add a kernel-doc to this typedef (may be a separate patch)? -- With Best Regards, Andy Shevchenko
