mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-23 14:43:46 +00:00
Add lynx_pcs_create_mdiodev() to simplify the creation of the mdio device associated with lynx PCS. In order to allow lynx_pcs_destroy() to clean this up, we need to arrange for lynx_pcs_create() to take a refcount on the mdiodev, and lynx_pcs_destroy() to put it. Adding the refcounting to lynx_pcs_create()..lynx_pcs_destroy() will be transparent to existing users of these interfaces. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com> Tested-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
20 lines
501 B
C
20 lines
501 B
C
/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
|
|
/* Copyright 2020 NXP
|
|
* Lynx PCS helpers
|
|
*/
|
|
|
|
#ifndef __LINUX_PCS_LYNX_H
|
|
#define __LINUX_PCS_LYNX_H
|
|
|
|
#include <linux/mdio.h>
|
|
#include <linux/phylink.h>
|
|
|
|
struct mdio_device *lynx_get_mdio_device(struct phylink_pcs *pcs);
|
|
|
|
struct phylink_pcs *lynx_pcs_create(struct mdio_device *mdio);
|
|
struct phylink_pcs *lynx_pcs_create_mdiodev(struct mii_bus *bus, int addr);
|
|
|
|
void lynx_pcs_destroy(struct phylink_pcs *pcs);
|
|
|
|
#endif /* __LINUX_PCS_LYNX_H */
|