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 <andriy.shevche...@linux.intel.com>
> Cc: Daniel Scally <djrsca...@gmail.com>
> Cc: Heikki Krogerus <heikki.kroge...@linux.intel.com>
> Cc: Sakari Ailus <sakari.ai...@linux.intel.com>
> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org>
> Cc: Vinod Koul <vk...@kernel.org>
> Cc: "Rafael J. Wysocki" <rafael.j.wyso...@intel.com>
> Cc: Mika Westerberg <mika.westerb...@linux.intel.com>
> Cc: Alexandre Belloni <alexandre.bell...@bootlin.com>
> Cc: Ivan Orlov <ivan.orlov0...@gmail.com>
> Cc: Rob Herring <robh...@kernel.org>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski...@linaro.org>
> Cc: Conor Dooley <conor...@kernel.org>
> Cc: <devicet...@vger.kernel.org>
> Cc: <linux-...@vger.kernel.org>
> Cc: <linux-a...@vger.kernel.org>
> Cc: Pin-yen Lin <treapk...@chromium.org>

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


Reply via email to