• Home
  • Raw
  • Download

Lines Matching refs:phydev

783 	void (*phy_link_change)(struct phy_device *phydev, bool up);
900 struct phy_device *phydev; member
942 int (*soft_reset)(struct phy_device *phydev);
948 int (*config_init)(struct phy_device *phydev);
954 int (*probe)(struct phy_device *phydev);
960 int (*get_features)(struct phy_device *phydev);
971 int (*get_rate_matching)(struct phy_device *phydev,
976 int (*suspend)(struct phy_device *phydev);
978 int (*resume)(struct phy_device *phydev);
986 int (*config_aneg)(struct phy_device *phydev);
989 int (*aneg_done)(struct phy_device *phydev);
992 int (*read_status)(struct phy_device *phydev);
999 int (*config_intr)(struct phy_device *phydev);
1002 irqreturn_t (*handle_interrupt)(struct phy_device *phydev);
1005 void (*remove)(struct phy_device *phydev);
1012 int (*match_phy_device)(struct phy_device *phydev);
1262 static inline bool phydev_id_compare(struct phy_device *phydev, u32 id) in phydev_id_compare() argument
1264 return phy_id_compare(id, phydev->phy_id, phydev->drv->phy_id_mask); in phydev_id_compare()
1273 int (*run)(struct phy_device *phydev);
1296 void of_set_phy_supported(struct phy_device *phydev);
1297 void of_set_phy_eee_broken(struct phy_device *phydev);
1298 int phy_speed_down_core(struct phy_device *phydev);
1304 static inline bool phy_is_started(struct phy_device *phydev) in phy_is_started() argument
1306 return phydev->state >= PHY_UP; in phy_is_started()
1309 void phy_resolve_aneg_pause(struct phy_device *phydev);
1310 void phy_resolve_aneg_linkmode(struct phy_device *phydev);
1311 void phy_check_downshift(struct phy_device *phydev);
1322 static inline int phy_read(struct phy_device *phydev, u32 regnum) in phy_read() argument
1324 return mdiobus_read(phydev->mdio.bus, phydev->mdio.addr, regnum); in phy_read()
1327 #define phy_read_poll_timeout(phydev, regnum, val, cond, sleep_us, \ argument
1333 sleep_us, timeout_us, sleep_before_read, phydev, regnum); \
1337 phydev_err(phydev, "%s failed: %d\n", __func__, __ret); \
1348 static inline int __phy_read(struct phy_device *phydev, u32 regnum) in __phy_read() argument
1350 return __mdiobus_read(phydev->mdio.bus, phydev->mdio.addr, regnum); in __phy_read()
1363 static inline int phy_write(struct phy_device *phydev, u32 regnum, u16 val) in phy_write() argument
1365 return mdiobus_write(phydev->mdio.bus, phydev->mdio.addr, regnum, val); in phy_write()
1376 static inline int __phy_write(struct phy_device *phydev, u32 regnum, u16 val) in __phy_write() argument
1378 return __mdiobus_write(phydev->mdio.bus, phydev->mdio.addr, regnum, in __phy_write()
1394 static inline int __phy_modify_changed(struct phy_device *phydev, u32 regnum, in __phy_modify_changed() argument
1397 return __mdiobus_modify_changed(phydev->mdio.bus, phydev->mdio.addr, in __phy_modify_changed()
1405 int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum);
1425 #define phy_read_mmd_poll_timeout(phydev, devaddr, regnum, val, cond, \ argument
1432 phydev, devaddr, regnum); \
1436 phydev_err(phydev, "%s failed: %d\n", __func__, __ret); \
1444 int __phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum);
1450 int phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val);
1456 int __phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val);
1458 int __phy_modify_changed(struct phy_device *phydev, u32 regnum, u16 mask,
1460 int phy_modify_changed(struct phy_device *phydev, u32 regnum, u16 mask,
1462 int __phy_modify(struct phy_device *phydev, u32 regnum, u16 mask, u16 set);
1463 int phy_modify(struct phy_device *phydev, u32 regnum, u16 mask, u16 set);
1465 int __phy_modify_mmd_changed(struct phy_device *phydev, int devad, u32 regnum,
1467 int phy_modify_mmd_changed(struct phy_device *phydev, int devad, u32 regnum,
1469 int __phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum,
1471 int phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum,
1482 static inline int __phy_set_bits(struct phy_device *phydev, u32 regnum, u16 val) in __phy_set_bits() argument
1484 return __phy_modify(phydev, regnum, 0, val); in __phy_set_bits()
1495 static inline int __phy_clear_bits(struct phy_device *phydev, u32 regnum, in __phy_clear_bits() argument
1498 return __phy_modify(phydev, regnum, val, 0); in __phy_clear_bits()
1507 static inline int phy_set_bits(struct phy_device *phydev, u32 regnum, u16 val) in phy_set_bits() argument
1509 return phy_modify(phydev, regnum, 0, val); in phy_set_bits()
1518 static inline int phy_clear_bits(struct phy_device *phydev, u32 regnum, u16 val) in phy_clear_bits() argument
1520 return phy_modify(phydev, regnum, val, 0); in phy_clear_bits()
1533 static inline int __phy_set_bits_mmd(struct phy_device *phydev, int devad, in __phy_set_bits_mmd() argument
1536 return __phy_modify_mmd(phydev, devad, regnum, 0, val); in __phy_set_bits_mmd()
1549 static inline int __phy_clear_bits_mmd(struct phy_device *phydev, int devad, in __phy_clear_bits_mmd() argument
1552 return __phy_modify_mmd(phydev, devad, regnum, val, 0); in __phy_clear_bits_mmd()
1563 static inline int phy_set_bits_mmd(struct phy_device *phydev, int devad, in phy_set_bits_mmd() argument
1566 return phy_modify_mmd(phydev, devad, regnum, 0, val); in phy_set_bits_mmd()
1577 static inline int phy_clear_bits_mmd(struct phy_device *phydev, int devad, in phy_clear_bits_mmd() argument
1580 return phy_modify_mmd(phydev, devad, regnum, val, 0); in phy_clear_bits_mmd()
1590 static inline bool phy_interrupt_is_valid(struct phy_device *phydev) in phy_interrupt_is_valid() argument
1592 return phydev->irq != PHY_POLL && phydev->irq != PHY_MAC_INTERRUPT; in phy_interrupt_is_valid()
1600 static inline bool phy_polling_mode(struct phy_device *phydev) in phy_polling_mode() argument
1602 if (phydev->state == PHY_CABLETEST) in phy_polling_mode()
1603 if (phydev->drv->flags & PHY_POLL_CABLE_TEST) in phy_polling_mode()
1606 return phydev->irq == PHY_POLL; in phy_polling_mode()
1613 static inline bool phy_has_hwtstamp(struct phy_device *phydev) in phy_has_hwtstamp() argument
1615 return phydev && phydev->mii_ts && phydev->mii_ts->hwtstamp; in phy_has_hwtstamp()
1622 static inline bool phy_has_rxtstamp(struct phy_device *phydev) in phy_has_rxtstamp() argument
1624 return phydev && phydev->mii_ts && phydev->mii_ts->rxtstamp; in phy_has_rxtstamp()
1632 static inline bool phy_has_tsinfo(struct phy_device *phydev) in phy_has_tsinfo() argument
1634 return phydev && phydev->mii_ts && phydev->mii_ts->ts_info; in phy_has_tsinfo()
1641 static inline bool phy_has_txtstamp(struct phy_device *phydev) in phy_has_txtstamp() argument
1643 return phydev && phydev->mii_ts && phydev->mii_ts->txtstamp; in phy_has_txtstamp()
1646 static inline int phy_hwtstamp(struct phy_device *phydev, in phy_hwtstamp() argument
1650 return phydev->mii_ts->hwtstamp(phydev->mii_ts, cfg, extack); in phy_hwtstamp()
1653 static inline bool phy_rxtstamp(struct phy_device *phydev, struct sk_buff *skb, in phy_rxtstamp() argument
1656 return phydev->mii_ts->rxtstamp(phydev->mii_ts, skb, type); in phy_rxtstamp()
1659 static inline int phy_ts_info(struct phy_device *phydev, in phy_ts_info() argument
1662 return phydev->mii_ts->ts_info(phydev->mii_ts, tsinfo); in phy_ts_info()
1665 static inline void phy_txtstamp(struct phy_device *phydev, struct sk_buff *skb, in phy_txtstamp() argument
1668 phydev->mii_ts->txtstamp(phydev->mii_ts, skb, type); in phy_txtstamp()
1681 static inline bool phy_is_default_hwtstamp(struct phy_device *phydev) in phy_is_default_hwtstamp() argument
1683 return phy_has_hwtstamp(phydev) && phydev->default_timestamp; in phy_is_default_hwtstamp()
1690 static inline bool phy_is_internal(struct phy_device *phydev) in phy_is_internal() argument
1692 return phydev->is_internal; in phy_is_internal()
1699 static inline bool phy_on_sfp(struct phy_device *phydev) in phy_on_sfp() argument
1701 return phydev->is_on_sfp_module; in phy_on_sfp()
1734 static inline bool phy_interface_is_rgmii(struct phy_device *phydev) in phy_interface_is_rgmii() argument
1736 return phy_interface_mode_is_rgmii(phydev->interface); in phy_interface_is_rgmii()
1744 static inline bool phy_is_pseudo_fixed_link(struct phy_device *phydev) in phy_is_pseudo_fixed_link() argument
1746 return phydev->is_pseudo_fixed_link; in phy_is_pseudo_fixed_link()
1749 int phy_save_page(struct phy_device *phydev);
1750 int phy_select_page(struct phy_device *phydev, int page);
1751 int phy_restore_page(struct phy_device *phydev, int oldpage, int ret);
1752 int phy_read_paged(struct phy_device *phydev, int page, u32 regnum);
1753 int phy_write_paged(struct phy_device *phydev, int page, u32 regnum, u16 val);
1754 int phy_modify_paged_changed(struct phy_device *phydev, int page, u32 regnum,
1756 int phy_modify_paged(struct phy_device *phydev, int page, u32 regnum,
1770 void phy_device_free(struct phy_device *phydev);
1810 static inline void phy_device_free(struct phy_device *phydev) { } in phy_device_free() argument
1812 void phy_device_remove(struct phy_device *phydev);
1813 int phy_get_c45_ids(struct phy_device *phydev);
1814 int phy_init_hw(struct phy_device *phydev);
1815 int phy_suspend(struct phy_device *phydev);
1816 int phy_resume(struct phy_device *phydev);
1817 int __phy_resume(struct phy_device *phydev);
1818 int phy_loopback(struct phy_device *phydev, bool enable);
1823 int phy_sfp_probe(struct phy_device *phydev,
1828 int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
1830 int phy_connect_direct(struct net_device *dev, struct phy_device *phydev,
1836 void phy_disconnect(struct phy_device *phydev);
1837 void phy_detach(struct phy_device *phydev);
1838 void phy_start(struct phy_device *phydev);
1839 void phy_stop(struct phy_device *phydev);
1840 int phy_config_aneg(struct phy_device *phydev);
1841 int _phy_start_aneg(struct phy_device *phydev);
1842 int phy_start_aneg(struct phy_device *phydev);
1843 int phy_aneg_done(struct phy_device *phydev);
1844 int phy_speed_down(struct phy_device *phydev, bool sync);
1845 int phy_speed_up(struct phy_device *phydev);
1848 int phy_restart_aneg(struct phy_device *phydev);
1849 int phy_reset_after_clk_enable(struct phy_device *phydev);
1852 int phy_start_cable_test(struct phy_device *phydev,
1854 int phy_start_cable_test_tdr(struct phy_device *phydev,
1859 int phy_start_cable_test(struct phy_device *phydev, in phy_start_cable_test() argument
1866 int phy_start_cable_test_tdr(struct phy_device *phydev, in phy_start_cable_test_tdr() argument
1875 static inline void phy_device_reset(struct phy_device *phydev, int value) in phy_device_reset() argument
1877 mdio_device_reset(&phydev->mdio, value); in phy_device_reset()
1895 static inline const char *phydev_name(const struct phy_device *phydev) in phydev_name() argument
1897 return dev_name(&phydev->mdio.dev); in phydev_name()
1900 static inline void phy_lock_mdio_bus(struct phy_device *phydev) in phy_lock_mdio_bus() argument
1902 mutex_lock(&phydev->mdio.bus->mdio_lock); in phy_lock_mdio_bus()
1905 static inline void phy_unlock_mdio_bus(struct phy_device *phydev) in phy_unlock_mdio_bus() argument
1907 mutex_unlock(&phydev->mdio.bus->mdio_lock); in phy_unlock_mdio_bus()
1910 void phy_attached_print(struct phy_device *phydev, const char *fmt, ...)
1912 char *phy_attached_info_irq(struct phy_device *phydev)
1914 void phy_attached_info(struct phy_device *phydev);
1917 int genphy_read_abilities(struct phy_device *phydev);
1918 int genphy_setup_forced(struct phy_device *phydev);
1919 int genphy_restart_aneg(struct phy_device *phydev);
1920 int genphy_check_and_restart_aneg(struct phy_device *phydev, bool restart);
1921 int genphy_config_eee_advert(struct phy_device *phydev);
1922 int __genphy_config_aneg(struct phy_device *phydev, bool changed);
1923 int genphy_aneg_done(struct phy_device *phydev);
1924 int genphy_update_link(struct phy_device *phydev);
1925 int genphy_read_lpa(struct phy_device *phydev);
1926 int genphy_read_status_fixed(struct phy_device *phydev);
1927 int genphy_read_status(struct phy_device *phydev);
1928 int genphy_read_master_slave(struct phy_device *phydev);
1929 int genphy_suspend(struct phy_device *phydev);
1930 int genphy_resume(struct phy_device *phydev);
1931 int genphy_loopback(struct phy_device *phydev, bool enable);
1932 int genphy_soft_reset(struct phy_device *phydev);
1933 irqreturn_t genphy_handle_interrupt_no_ack(struct phy_device *phydev);
1935 static inline int genphy_config_aneg(struct phy_device *phydev) in genphy_config_aneg() argument
1937 return __genphy_config_aneg(phydev, false); in genphy_config_aneg()
1940 static inline int genphy_no_config_intr(struct phy_device *phydev) in genphy_no_config_intr() argument
1950 int genphy_c37_config_aneg(struct phy_device *phydev);
1951 int genphy_c37_read_status(struct phy_device *phydev, bool *changed);
1954 int genphy_c45_restart_aneg(struct phy_device *phydev);
1955 int genphy_c45_check_and_restart_aneg(struct phy_device *phydev, bool restart);
1956 int genphy_c45_aneg_done(struct phy_device *phydev);
1957 int genphy_c45_read_link(struct phy_device *phydev);
1958 int genphy_c45_read_lpa(struct phy_device *phydev);
1959 int genphy_c45_read_pma(struct phy_device *phydev);
1960 int genphy_c45_pma_setup_forced(struct phy_device *phydev);
1961 int genphy_c45_pma_baset1_setup_master_slave(struct phy_device *phydev);
1962 int genphy_c45_an_config_aneg(struct phy_device *phydev);
1963 int genphy_c45_an_disable_aneg(struct phy_device *phydev);
1964 int genphy_c45_read_mdix(struct phy_device *phydev);
1965 int genphy_c45_pma_read_abilities(struct phy_device *phydev);
1966 int genphy_c45_pma_read_ext_abilities(struct phy_device *phydev);
1967 int genphy_c45_pma_baset1_read_abilities(struct phy_device *phydev);
1968 int genphy_c45_read_eee_abilities(struct phy_device *phydev);
1969 int genphy_c45_pma_baset1_read_master_slave(struct phy_device *phydev);
1970 int genphy_c45_read_status(struct phy_device *phydev);
1971 int genphy_c45_baset1_read_status(struct phy_device *phydev);
1972 int genphy_c45_config_aneg(struct phy_device *phydev);
1973 int genphy_c45_loopback(struct phy_device *phydev, bool enable);
1974 int genphy_c45_pma_resume(struct phy_device *phydev);
1975 int genphy_c45_pma_suspend(struct phy_device *phydev);
1976 int genphy_c45_fast_retrain(struct phy_device *phydev, bool enable);
1977 int genphy_c45_plca_get_cfg(struct phy_device *phydev,
1979 int genphy_c45_plca_set_cfg(struct phy_device *phydev,
1981 int genphy_c45_plca_get_status(struct phy_device *phydev,
1983 int genphy_c45_eee_is_active(struct phy_device *phydev, unsigned long *adv,
1985 int genphy_c45_ethtool_get_eee(struct phy_device *phydev,
1987 int genphy_c45_ethtool_set_eee(struct phy_device *phydev,
1989 int genphy_c45_write_eee_adv(struct phy_device *phydev, unsigned long *adv);
1990 int genphy_c45_an_config_eee_aneg(struct phy_device *phydev);
1991 int genphy_c45_read_eee_adv(struct phy_device *phydev, unsigned long *adv);
1997 int gen10g_config_aneg(struct phy_device *phydev);
1999 static inline int phy_read_status(struct phy_device *phydev) in phy_read_status() argument
2001 if (!phydev->drv) in phy_read_status()
2004 if (phydev->drv->read_status) in phy_read_status()
2005 return phydev->drv->read_status(phydev); in phy_read_status()
2007 return genphy_read_status(phydev); in phy_read_status()
2015 void phy_error(struct phy_device *phydev);
2017 void phy_queue_state_machine(struct phy_device *phydev, unsigned long jiffies);
2018 void phy_trigger_machine(struct phy_device *phydev);
2019 void phy_mac_interrupt(struct phy_device *phydev);
2020 void phy_start_machine(struct phy_device *phydev);
2021 void phy_stop_machine(struct phy_device *phydev);
2022 void phy_ethtool_ksettings_get(struct phy_device *phydev,
2024 int phy_ethtool_ksettings_set(struct phy_device *phydev,
2026 int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd);
2029 int phy_disable_interrupts(struct phy_device *phydev);
2030 void phy_request_interrupt(struct phy_device *phydev);
2031 void phy_free_interrupt(struct phy_device *phydev);
2032 void phy_print_status(struct phy_device *phydev);
2033 int phy_get_rate_matching(struct phy_device *phydev,
2035 void phy_set_max_speed(struct phy_device *phydev, u32 max_speed);
2036 void phy_remove_link_mode(struct phy_device *phydev, u32 link_mode);
2037 void phy_advertise_supported(struct phy_device *phydev);
2038 void phy_advertise_eee_all(struct phy_device *phydev);
2039 void phy_support_sym_pause(struct phy_device *phydev);
2040 void phy_support_asym_pause(struct phy_device *phydev);
2041 void phy_support_eee(struct phy_device *phydev);
2042 void phy_set_sym_pause(struct phy_device *phydev, bool rx, bool tx,
2044 void phy_set_asym_pause(struct phy_device *phydev, bool rx, bool tx);
2045 bool phy_validate_pause(struct phy_device *phydev,
2047 void phy_get_pause(struct phy_device *phydev, bool *tx_pause, bool *rx_pause);
2049 s32 phy_get_internal_delay(struct phy_device *phydev, struct device *dev,
2066 int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable);
2067 int phy_get_eee_err(struct phy_device *phydev);
2068 int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_keee *data);
2069 int phy_ethtool_get_eee(struct phy_device *phydev, struct ethtool_keee *data);
2070 int phy_ethtool_set_wol(struct phy_device *phydev, struct ethtool_wolinfo *wol);
2071 void phy_ethtool_get_wol(struct phy_device *phydev,
2078 int phy_package_join(struct phy_device *phydev, int base_addr, size_t priv_size);
2079 int of_phy_package_join(struct phy_device *phydev, size_t priv_size);
2080 void phy_package_leave(struct phy_device *phydev);
2081 int devm_phy_package_join(struct device *dev, struct phy_device *phydev,
2083 int devm_of_phy_package_join(struct device *dev, struct phy_device *phydev,
2089 int phy_ethtool_get_strings(struct phy_device *phydev, u8 *data);
2090 int phy_ethtool_get_sset_count(struct phy_device *phydev);
2091 int phy_ethtool_get_stats(struct phy_device *phydev,
2094 void __phy_ethtool_get_phy_stats(struct phy_device *phydev,
2097 void __phy_ethtool_get_link_ext_stats(struct phy_device *phydev,
2100 int phy_ethtool_get_plca_cfg(struct phy_device *phydev,
2102 int phy_ethtool_set_plca_cfg(struct phy_device *phydev,
2105 int phy_ethtool_get_plca_status(struct phy_device *phydev,
2108 int __phy_hwtstamp_get(struct phy_device *phydev,
2110 int __phy_hwtstamp_set(struct phy_device *phydev,
2114 static inline int phy_package_address(struct phy_device *phydev, in phy_package_address() argument
2117 struct phy_package_shared *shared = phydev->shared; in phy_package_address()
2129 static inline int phy_package_read(struct phy_device *phydev, in phy_package_read() argument
2132 int addr = phy_package_address(phydev, addr_offset); in phy_package_read()
2137 return mdiobus_read(phydev->mdio.bus, addr, regnum); in phy_package_read()
2140 static inline int __phy_package_read(struct phy_device *phydev, in __phy_package_read() argument
2143 int addr = phy_package_address(phydev, addr_offset); in __phy_package_read()
2148 return __mdiobus_read(phydev->mdio.bus, addr, regnum); in __phy_package_read()
2151 static inline int phy_package_write(struct phy_device *phydev, in phy_package_write() argument
2155 int addr = phy_package_address(phydev, addr_offset); in phy_package_write()
2160 return mdiobus_write(phydev->mdio.bus, addr, regnum, val); in phy_package_write()
2163 static inline int __phy_package_write(struct phy_device *phydev, in __phy_package_write() argument
2167 int addr = phy_package_address(phydev, addr_offset); in __phy_package_write()
2172 return __mdiobus_write(phydev->mdio.bus, addr, regnum, val); in __phy_package_write()
2175 int __phy_package_read_mmd(struct phy_device *phydev,
2179 int phy_package_read_mmd(struct phy_device *phydev,
2183 int __phy_package_write_mmd(struct phy_device *phydev,
2187 int phy_package_write_mmd(struct phy_device *phydev,
2191 static inline bool __phy_package_set_once(struct phy_device *phydev, in __phy_package_set_once() argument
2194 struct phy_package_shared *shared = phydev->shared; in __phy_package_set_once()
2202 static inline bool phy_package_init_once(struct phy_device *phydev) in phy_package_init_once() argument
2204 return __phy_package_set_once(phydev, PHY_SHARED_F_INIT_DONE); in phy_package_init_once()
2207 static inline bool phy_package_probe_once(struct phy_device *phydev) in phy_package_probe_once() argument
2209 return __phy_package_set_once(phydev, PHY_SHARED_F_PROBE_DONE); in phy_package_probe_once()
2257 bool phy_driver_is_genphy(struct phy_device *phydev);
2258 bool phy_driver_is_genphy_10g(struct phy_device *phydev);