Re: [PATCH net-next v11 03/12] net: pcs: implement Firmware node support for PCS driver
flat view
From: Christian Marangi <ansuelsmth@gmail.com>
Date: 2026-08-07 20:49:22
Also in:
linux-arm-kernel, linux-devicetree, linux-doc, linux-mediatek, lkml, llvm
On Fri, Aug 07, 2026 at 01:29:41PM -0700, Randy Dunlap wrote:
Hi-- On 8/7/26 6:12 AM, Christian Marangi wrote:quoted
Implement the foundation of Firmware node support for PCS driver.quoted
Co-developed-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Christian Marangi <ansuelsmth@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.hPlease 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
Yep, they slipped in the rework. I already fixed these, just waiting the usual 24h.
quoted
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
-- Ansuel