xref: /linux/drivers/net/phy/bcm-phy-lib.h (revision a1cba5613edf50c2a213fa90c30aa10500b241b7)
1*a1cba561SArun Parameswaran /*
2*a1cba561SArun Parameswaran  * Copyright (C) 2015 Broadcom Corporation
3*a1cba561SArun Parameswaran  *
4*a1cba561SArun Parameswaran  * This program is free software; you can redistribute it and/or
5*a1cba561SArun Parameswaran  * modify it under the terms of the GNU General Public License as
6*a1cba561SArun Parameswaran  * published by the Free Software Foundation version 2.
7*a1cba561SArun Parameswaran  *
8*a1cba561SArun Parameswaran  * This program is distributed "as is" WITHOUT ANY WARRANTY of any
9*a1cba561SArun Parameswaran  * kind, whether express or implied; without even the implied warranty
10*a1cba561SArun Parameswaran  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11*a1cba561SArun Parameswaran  * GNU General Public License for more details.
12*a1cba561SArun Parameswaran  */
13*a1cba561SArun Parameswaran 
14*a1cba561SArun Parameswaran #ifndef _LINUX_BCM_PHY_LIB_H
15*a1cba561SArun Parameswaran #define _LINUX_BCM_PHY_LIB_H
16*a1cba561SArun Parameswaran 
17*a1cba561SArun Parameswaran #include <linux/phy.h>
18*a1cba561SArun Parameswaran 
19*a1cba561SArun Parameswaran int bcm_phy_write_exp(struct phy_device *phydev, u16 reg, u16 val);
20*a1cba561SArun Parameswaran int bcm_phy_read_exp(struct phy_device *phydev, u16 reg);
21*a1cba561SArun Parameswaran 
22*a1cba561SArun Parameswaran int bcm_phy_write_misc(struct phy_device *phydev,
23*a1cba561SArun Parameswaran 		       u16 reg, u16 chl, u16 value);
24*a1cba561SArun Parameswaran int bcm_phy_read_misc(struct phy_device *phydev,
25*a1cba561SArun Parameswaran 		      u16 reg, u16 chl);
26*a1cba561SArun Parameswaran 
27*a1cba561SArun Parameswaran int bcm_phy_write_shadow(struct phy_device *phydev, u16 shadow,
28*a1cba561SArun Parameswaran 			 u16 val);
29*a1cba561SArun Parameswaran int bcm_phy_read_shadow(struct phy_device *phydev, u16 shadow);
30*a1cba561SArun Parameswaran 
31*a1cba561SArun Parameswaran int bcm_phy_ack_intr(struct phy_device *phydev);
32*a1cba561SArun Parameswaran int bcm_phy_config_intr(struct phy_device *phydev);
33*a1cba561SArun Parameswaran 
34*a1cba561SArun Parameswaran int bcm_phy_enable_apd(struct phy_device *phydev, bool dll_pwr_down);
35*a1cba561SArun Parameswaran 
36*a1cba561SArun Parameswaran int bcm_phy_enable_eee(struct phy_device *phydev);
37*a1cba561SArun Parameswaran #endif /* _LINUX_BCM_PHY_LIB_H */
38