Re: [RFC 01/10] property: add fwnode_match_node()

From: Clément Léger
Date: Tue Feb 22 2022 - 03:38:28 EST


Le Mon, 21 Feb 2022 19:44:52 +0200,
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> a écrit :

> On Mon, Feb 21, 2022 at 05:26:43PM +0100, Clément Léger wrote:
> > Add a function equivalent to of_match_node() which is usable for
> > fwnode support. Matching is based on the compatible property and it
> > returns the best matches for the node according to the compatible
> > list ordering.
>
> Not sure I understand the purpose of this API.
> We have device_get_match_data(), maybe you want similar for fwnode?
>

Hi Andy,

Actually device_get_match_data() is calling the .device_get_match_data
callback of the dev fwnode. This function is meant to be used by the
next patch (fwnode_get_match_data()) to be used as a generic fwnode
operation and thus be usable with software_node.

--
Clément Léger,
Embedded Linux and Kernel engineer at Bootlin
https://bootlin.com