[Intel-wired-lan] [PATCH net-next v2 03/12] dpll: Add helpers to find DPLL pin fwnode
Loktionov, Aleksandr
aleksandr.loktionov at intel.com
Tue Feb 10 07:19:05 UTC 2026
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf
> Of Ivan Vecera
> Sent: Friday, January 16, 2026 7:46 PM
> To: netdev at vger.kernel.org
> Cc: Eric Dumazet <edumazet at google.com>; Nguyen, Anthony L
> <anthony.l.nguyen at intel.com>; Rob Herring <robh at kernel.org>; Leon
> Romanovsky <leon at kernel.org>; Lobakin, Aleksander
> <aleksander.lobakin at intel.com>; linux-rdma at vger.kernel.org; Kitszel,
> Przemyslaw <przemyslaw.kitszel at intel.com>; Kubalewski, Arkadiusz
> <arkadiusz.kubalewski at intel.com>; intel-wired-lan at lists.osuosl.org;
> Jakub Kicinski <kuba at kernel.org>; Paolo Abeni <pabeni at redhat.com>;
> devicetree at vger.kernel.org; Conor Dooley <conor+dt at kernel.org>; Jiri
> Pirko <jiri at resnulli.us>; Richard Cochran <richardcochran at gmail.com>;
> Saravana Kannan <saravanak at kernel.org>; Prathosh Satish
> <Prathosh.Satish at microchip.com>; Vadim Fedorenko
> <vadim.fedorenko at linux.dev>; Mark Bloch <mbloch at nvidia.com>; linux-
> kernel at vger.kernel.org; Tariq Toukan <tariqt at nvidia.com>; Andrew Lunn
> <andrew+netdev at lunn.ch>; Jonathan Lemon <jonathan.lemon at gmail.com>;
> Krzysztof Kozlowski <krzk+dt at kernel.org>; Saeed Mahameed
> <saeedm at nvidia.com>; David S. Miller <davem at davemloft.net>
> 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 at redhat.com>
> ---
> 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 at intel.com>
More information about the Intel-wired-lan
mailing list