RE: [Intel-wired-lan] [PATCH net-next v2 03/12] dpll: Add helpers to find DPLL pin fwnode

From: Loktionov, Aleksandr

Date: Tue Feb 10 2026 - 02:22:07 EST




> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@xxxxxxxxxx> On Behalf
> Of Ivan Vecera
> Sent: Friday, January 16, 2026 7:46 PM
> To: netdev@xxxxxxxxxxxxxxx
> Cc: Eric Dumazet <edumazet@xxxxxxxxxx>; Nguyen, Anthony L
> <anthony.l.nguyen@xxxxxxxxx>; Rob Herring <robh@xxxxxxxxxx>; Leon
> Romanovsky <leon@xxxxxxxxxx>; Lobakin, Aleksander
> <aleksander.lobakin@xxxxxxxxx>; linux-rdma@xxxxxxxxxxxxxxx; Kitszel,
> Przemyslaw <przemyslaw.kitszel@xxxxxxxxx>; Kubalewski, Arkadiusz
> <arkadiusz.kubalewski@xxxxxxxxx>; intel-wired-lan@xxxxxxxxxxxxxxxx;
> Jakub Kicinski <kuba@xxxxxxxxxx>; Paolo Abeni <pabeni@xxxxxxxxxx>;
> devicetree@xxxxxxxxxxxxxxx; Conor Dooley <conor+dt@xxxxxxxxxx>; Jiri
> Pirko <jiri@xxxxxxxxxxx>; Richard Cochran <richardcochran@xxxxxxxxx>;
> Saravana Kannan <saravanak@xxxxxxxxxx>; Prathosh Satish
> <Prathosh.Satish@xxxxxxxxxxxxx>; Vadim Fedorenko
> <vadim.fedorenko@xxxxxxxxx>; Mark Bloch <mbloch@xxxxxxxxxx>; linux-
> kernel@xxxxxxxxxxxxxxx; Tariq Toukan <tariqt@xxxxxxxxxx>; Andrew Lunn
> <andrew+netdev@xxxxxxx>; Jonathan Lemon <jonathan.lemon@xxxxxxxxx>;
> Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>; Saeed Mahameed
> <saeedm@xxxxxxxxxx>; David S. Miller <davem@xxxxxxxxxxxxx>
> Subject: [Intel-wired-lan] [PATCH net-next v2 03/12] dpll: Add helpers
> to find DPLL pin fwnode
>
> dpll: core: add helpers to find DPLL pin fwnode
>
> Add helper functions to the DPLL core to retrieve a DPLL pin's
> firmware node handle based on the 'dpll-pins' and 'dpll-pin-names'
> properties.
>
> Unlike simple phandle arrays, 'dpll-pins' entries typically contain a
> pin specifier (index and direction) as defined by '#dpll-pin-cells'.
> The new helper fwnode_dpll_pin_node_get() parses these specifiers
> using fwnode_property_get_reference_args(). It resolves the target pin
> by:
> 1. Identifying the DPLL device node from the phandle.
> 2. Selecting the correct sub-node ('input-pins' or 'output-pins')
> based
> on the direction argument.
> 3. Matching the pin index argument against the 'reg' property of
> the child nodes.
>
> Additionally, register 'dpll-pins' in drivers/of/property.c to enable
> proper parsing of the supplier bindings by the OF core.
>
> Signed-off-by: Ivan Vecera <ivecera@xxxxxxxxxx>
> ---
> v2:
> * added check for fwnode_property_match_string() return value
> * reworked searching for the pin using dpll device phandle and
> pin specifier
> * added dpll-pins into OF core supplier_bindings
> ---
> drivers/dpll/dpll_core.c | 74
> ++++++++++++++++++++++++++++++++++++++++
> drivers/of/property.c | 2 ++
> include/linux/dpll.h | 15 ++++++++
> 3 files changed, 91 insertions(+)
>
> diff --git a/drivers/dpll/dpll_core.c b/drivers/dpll/dpll_core.c index
> fb68b5e19b480..b0083b5c10aa4 100644
> --- a/drivers/dpll/dpll_core.c
> +++ b/drivers/dpll/dpll_core.c
> @@ -13,6 +13,7 @@
> #include <linux/property.h>
> #include <linux/slab.h>
> #include <linux/string.h>
> +#include <dt-bindings/dpll/dpll.h>
>
> #include "dpll_core.h"
> #include "dpll_netlink.h"
> @@ -654,6 +655,79 @@ struct dpll_pin *fwnode_dpll_pin_find(struct
> fwnode_handle *fwnode) } EXPORT_SYMBOL_GPL(fwnode_dpll_pin_find);
>
> +/**
> + * fwnode_dpll_pin_node_get - get dpll pin node from given fw node
> and
> +pin name
> + * @fwnode: firmware node that uses the dpll pin
> + * @name: dpll pin name from dpll-pin-names property
> + *
> + * Return: ERR_PTR() on error or a valid firmware node handle on
> success.
> + */
> +struct fwnode_handle *fwnode_dpll_pin_node_get(struct fwnode_handle
> *fwnode,
> + const char *name)

...

>
> --
> 2.52.0

Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@xxxxxxxxx>