[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <IA3PR11MB89868F74CB8737AA5B67B1F7E562A@IA3PR11MB8986.namprd11.prod.outlook.com>
Date: Tue, 10 Feb 2026 07:19:05 +0000
From: "Loktionov, Aleksandr" <aleksandr.loktionov@...el.com>
To: "Vecera, Ivan" <ivecera@...hat.com>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>
CC: Eric Dumazet <edumazet@...gle.com>, "Nguyen, Anthony L"
<anthony.l.nguyen@...el.com>, Rob Herring <robh@...nel.org>, Leon Romanovsky
<leon@...nel.org>, "Lobakin, Aleksander" <aleksander.lobakin@...el.com>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>, "Kitszel,
Przemyslaw" <przemyslaw.kitszel@...el.com>, "Kubalewski, Arkadiusz"
<arkadiusz.kubalewski@...el.com>, "intel-wired-lan@...ts.osuosl.org"
<intel-wired-lan@...ts.osuosl.org>, Jakub Kicinski <kuba@...nel.org>, "Paolo
Abeni" <pabeni@...hat.com>, "devicetree@...r.kernel.org"
<devicetree@...r.kernel.org>, Conor Dooley <conor+dt@...nel.org>, Jiri Pirko
<jiri@...nulli.us>, Richard Cochran <richardcochran@...il.com>, "Saravana
Kannan" <saravanak@...nel.org>, Prathosh Satish
<Prathosh.Satish@...rochip.com>, Vadim Fedorenko <vadim.fedorenko@...ux.dev>,
Mark Bloch <mbloch@...dia.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, Tariq Toukan <tariqt@...dia.com>, Andrew Lunn
<andrew+netdev@...n.ch>, Jonathan Lemon <jonathan.lemon@...il.com>, Krzysztof
Kozlowski <krzk+dt@...nel.org>, Saeed Mahameed <saeedm@...dia.com>, "David S.
Miller" <davem@...emloft.net>
Subject: RE: [Intel-wired-lan] [PATCH net-next v2 03/12] dpll: Add helpers to
find DPLL pin fwnode
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf
> Of Ivan Vecera
> Sent: Friday, January 16, 2026 7:46 PM
> To: netdev@...r.kernel.org
> Cc: Eric Dumazet <edumazet@...gle.com>; Nguyen, Anthony L
> <anthony.l.nguyen@...el.com>; Rob Herring <robh@...nel.org>; Leon
> Romanovsky <leon@...nel.org>; Lobakin, Aleksander
> <aleksander.lobakin@...el.com>; linux-rdma@...r.kernel.org; Kitszel,
> Przemyslaw <przemyslaw.kitszel@...el.com>; Kubalewski, Arkadiusz
> <arkadiusz.kubalewski@...el.com>; intel-wired-lan@...ts.osuosl.org;
> Jakub Kicinski <kuba@...nel.org>; Paolo Abeni <pabeni@...hat.com>;
> devicetree@...r.kernel.org; Conor Dooley <conor+dt@...nel.org>; Jiri
> Pirko <jiri@...nulli.us>; Richard Cochran <richardcochran@...il.com>;
> Saravana Kannan <saravanak@...nel.org>; Prathosh Satish
> <Prathosh.Satish@...rochip.com>; Vadim Fedorenko
> <vadim.fedorenko@...ux.dev>; Mark Bloch <mbloch@...dia.com>; linux-
> kernel@...r.kernel.org; Tariq Toukan <tariqt@...dia.com>; Andrew Lunn
> <andrew+netdev@...n.ch>; Jonathan Lemon <jonathan.lemon@...il.com>;
> Krzysztof Kozlowski <krzk+dt@...nel.org>; Saeed Mahameed
> <saeedm@...dia.com>; David S. Miller <davem@...emloft.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@...hat.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@...el.com>
Powered by blists - more mailing lists