[PATCH net-next v11 03/12] net: pcs: implement Firmware node support for PCS driver
Randy Dunlap
rdunlap at infradead.org
Fri Aug 7 13:29:41 PDT 2026
Hi--
On 8/7/26 6:12 AM, Christian Marangi wrote:
> Implement the foundation of Firmware node support for PCS driver.
>
>
> Co-developed-by: Daniel Golle <daniel at makrotopia.org>
> Signed-off-by: Daniel Golle <daniel at makrotopia.org>
> Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
> ---
> drivers/net/pcs/Kconfig | 6 +
> drivers/net/pcs/Makefile | 1 +
> drivers/net/pcs/pcs.c | 240 +++++++++++++++++++++++++++++++
> include/linux/pcs/pcs-provider.h | 65 +++++++++
> include/linux/pcs/pcs.h | 75 ++++++++++
> 5 files changed, 387 insertions(+)
> create mode 100644 drivers/net/pcs/pcs.c
> create mode 100644 include/linux/pcs/pcs-provider.h
> create mode 100644 include/linux/pcs/pcs.h
>
Please address these warnings:
WARNING: ../include/linux/pcs/pcs-provider.h:39 function parameter 'pp' not described in 'fwnode_pcs_del_provider'
WARNING: ../include/linux/pcs/pcs-provider.h:39 Excess function parameter 'fwnode' description in 'fwnode_pcs_del_provider'
WARNING: ../include/linux/pcs/pcs-provider.h:62 expecting prototype for fwnode_pcs_add_provider(). Prototype was for devm_fwnode_pcs_add_provider() instead
> diff --git a/include/linux/pcs/pcs-provider.h b/include/linux/pcs/pcs-provider.h
> new file mode 100644
> index 000000000000..5df48022bc6e
> --- /dev/null
> +++ b/include/linux/pcs/pcs-provider.h
> @@ -0,0 +1,65 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later */
> +#ifndef __LINUX_PCS_PROVIDER_H
> +#define __LINUX_PCS_PROVIDER_H
> +
> +struct fwnode_pcs_provider;
> +
> +/**
> + * fwnode_pcs_simple_get - Simple xlate function to retrieve PCS
> + * @pcsspec: reference arguments
> + * @data: Context data (assumed assigned to the single PCS)
> + *
> + * Returns: the PCS pointed by data.
> + */
> +struct phylink_pcs *fwnode_pcs_simple_get(struct fwnode_reference_args *pcsspec,
> + void *data);
> +
> +/**
> + * fwnode_pcs_add_provider - Registers a new PCS provider
> + * @fwnode: Firmware node
> + * @get: xlate function to retrieve the PCS
> + * @data: Context data
> + *
> + * Register and add a new PCS provider to the global providers list
> + * for the firmware node. The relevant PCS from the PCS provider
> + * is retrieved from the passed xlate function.
> + *
> + * Returns: A pointer to the registered PCS provider on success, or
> + * an ERR_PTR() encoded error code on failure.
> + */
> +struct fwnode_pcs_provider *
> +fwnode_pcs_add_provider(struct fwnode_handle *fwnode,
> + struct phylink_pcs *(*get)(struct fwnode_reference_args *pcsspec,
> + void *data),
> + void *data);
> +
> +/**
> + * fwnode_pcs_del_provider - Removes a PCS provider
> + * @fwnode: Firmware node
> + */
> +void fwnode_pcs_del_provider(struct fwnode_pcs_provider *pp);
> +
> +/**
> + * fwnode_pcs_add_provider - Registers a new PCS provider
> + * @dev: Device of the PCS provider
> + * @fwnode: Firmware node
> + * @get: xlate function to retrieve the PCS
> + * @data: Context data
> + *
> + * Register and add a new PCS provider to the global providers list
> + * for the firmware node. The relevant PCS from the PCS provider
> + * is retrieved from the passed xlate function. While at that, it
> + * also associates the device with the PCS provider using devres.
> + * On driver detach, release function is invoked on the devres data,
> + * then, devres data is freed.
> + *
> + * Returns: A pointer to the registered PCS provider on success, or
> + * an ERR_PTR() encoded error code on failure.
> + */
> +struct fwnode_pcs_provider *
> +devm_fwnode_pcs_add_provider(struct device *dev, struct fwnode_handle *fwnode,
> + struct phylink_pcs *(*get)(struct fwnode_reference_args *pcsspec,
> + void *data),
> + void *data);
> +
> +#endif /* __LINUX_PCS_PROVIDER_H */
thanks.
--
~Randy
More information about the linux-arm-kernel
mailing list