Lines Matching refs:phy_device
204 unsigned int phy_supported_speeds(struct phy_device *phy,
461 struct phy_device *mdiobus_scan_c22(struct mii_bus *bus, int addr);
621 struct phy_device { struct
742 void (*phy_link_change)(struct phy_device *phydev, bool up); argument
754 static inline struct phy_device *to_phy_device(const struct device *dev) in to_phy_device()
756 return container_of(to_mdio_device(dev), struct phy_device, mdio); in to_phy_device()
872 int (*soft_reset)(struct phy_device *phydev);
878 int (*config_init)(struct phy_device *phydev);
884 int (*probe)(struct phy_device *phydev);
890 int (*get_features)(struct phy_device *phydev);
901 int (*get_rate_matching)(struct phy_device *phydev,
906 int (*suspend)(struct phy_device *phydev);
908 int (*resume)(struct phy_device *phydev);
916 int (*config_aneg)(struct phy_device *phydev);
919 int (*aneg_done)(struct phy_device *phydev);
922 int (*read_status)(struct phy_device *phydev);
929 int (*config_intr)(struct phy_device *phydev);
932 irqreturn_t (*handle_interrupt)(struct phy_device *phydev);
935 void (*remove)(struct phy_device *phydev);
942 int (*match_phy_device)(struct phy_device *phydev);
950 int (*set_wol)(struct phy_device *dev, struct ethtool_wolinfo *wol);
956 void (*get_wol)(struct phy_device *dev, struct ethtool_wolinfo *wol);
966 void (*link_change_notify)(struct phy_device *dev);
978 int (*read_mmd)(struct phy_device *dev, int devnum, u16 regnum);
990 int (*write_mmd)(struct phy_device *dev, int devnum, u16 regnum,
994 int (*read_page)(struct phy_device *dev);
996 int (*write_page)(struct phy_device *dev, int page);
1002 int (*module_info)(struct phy_device *dev,
1009 int (*module_eeprom)(struct phy_device *dev,
1013 int (*cable_test_start)(struct phy_device *dev);
1016 int (*cable_test_tdr_start)(struct phy_device *dev,
1023 int (*cable_test_get_status)(struct phy_device *dev, bool *finished);
1027 int (*get_sset_count)(struct phy_device *dev);
1029 void (*get_strings)(struct phy_device *dev, u8 *data);
1031 void (*get_stats)(struct phy_device *dev,
1036 int (*get_tunable)(struct phy_device *dev,
1039 int (*set_tunable)(struct phy_device *dev,
1043 int (*set_loopback)(struct phy_device *dev, bool enable);
1045 int (*get_sqi)(struct phy_device *dev);
1047 int (*get_sqi_max)(struct phy_device *dev);
1051 int (*get_plca_cfg)(struct phy_device *dev,
1054 int (*set_plca_cfg)(struct phy_device *dev,
1057 int (*get_plca_status)(struct phy_device *dev,
1076 int (*run)(struct phy_device *phydev);
1099 void of_set_phy_supported(struct phy_device *phydev);
1100 void of_set_phy_eee_broken(struct phy_device *phydev);
1101 int phy_speed_down_core(struct phy_device *phydev);
1107 static inline bool phy_is_started(struct phy_device *phydev) in phy_is_started()
1112 void phy_resolve_aneg_pause(struct phy_device *phydev);
1113 void phy_resolve_aneg_linkmode(struct phy_device *phydev);
1114 void phy_check_downshift(struct phy_device *phydev);
1125 static inline int phy_read(struct phy_device *phydev, u32 regnum) in phy_read()
1150 static inline int __phy_read(struct phy_device *phydev, u32 regnum) in __phy_read()
1165 static inline int phy_write(struct phy_device *phydev, u32 regnum, u16 val) in phy_write()
1178 static inline int __phy_write(struct phy_device *phydev, u32 regnum, u16 val) in __phy_write()
1196 static inline int __phy_modify_changed(struct phy_device *phydev, u32 regnum, in __phy_modify_changed()
1207 int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum);
1244 int __phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum);
1250 int phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val);
1256 int __phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val);
1258 int __phy_modify_changed(struct phy_device *phydev, u32 regnum, u16 mask,
1260 int phy_modify_changed(struct phy_device *phydev, u32 regnum, u16 mask,
1262 int __phy_modify(struct phy_device *phydev, u32 regnum, u16 mask, u16 set);
1263 int phy_modify(struct phy_device *phydev, u32 regnum, u16 mask, u16 set);
1265 int __phy_modify_mmd_changed(struct phy_device *phydev, int devad, u32 regnum,
1267 int phy_modify_mmd_changed(struct phy_device *phydev, int devad, u32 regnum,
1269 int __phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum,
1271 int phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum,
1282 static inline int __phy_set_bits(struct phy_device *phydev, u32 regnum, u16 val) in __phy_set_bits()
1295 static inline int __phy_clear_bits(struct phy_device *phydev, u32 regnum, in __phy_clear_bits()
1307 static inline int phy_set_bits(struct phy_device *phydev, u32 regnum, u16 val) in phy_set_bits()
1318 static inline int phy_clear_bits(struct phy_device *phydev, u32 regnum, u16 val) in phy_clear_bits()
1333 static inline int __phy_set_bits_mmd(struct phy_device *phydev, int devad, in __phy_set_bits_mmd()
1349 static inline int __phy_clear_bits_mmd(struct phy_device *phydev, int devad, in __phy_clear_bits_mmd()
1363 static inline int phy_set_bits_mmd(struct phy_device *phydev, int devad, in phy_set_bits_mmd()
1377 static inline int phy_clear_bits_mmd(struct phy_device *phydev, int devad, in phy_clear_bits_mmd()
1390 static inline bool phy_interrupt_is_valid(struct phy_device *phydev) in phy_interrupt_is_valid()
1400 static inline bool phy_polling_mode(struct phy_device *phydev) in phy_polling_mode()
1413 static inline bool phy_has_hwtstamp(struct phy_device *phydev) in phy_has_hwtstamp()
1422 static inline bool phy_has_rxtstamp(struct phy_device *phydev) in phy_has_rxtstamp()
1432 static inline bool phy_has_tsinfo(struct phy_device *phydev) in phy_has_tsinfo()
1441 static inline bool phy_has_txtstamp(struct phy_device *phydev) in phy_has_txtstamp()
1446 static inline int phy_hwtstamp(struct phy_device *phydev, struct ifreq *ifr) in phy_hwtstamp()
1451 static inline bool phy_rxtstamp(struct phy_device *phydev, struct sk_buff *skb, in phy_rxtstamp()
1457 static inline int phy_ts_info(struct phy_device *phydev, in phy_ts_info()
1463 static inline void phy_txtstamp(struct phy_device *phydev, struct sk_buff *skb, in phy_txtstamp()
1473 static inline bool phy_is_internal(struct phy_device *phydev) in phy_is_internal()
1482 static inline bool phy_on_sfp(struct phy_device *phydev) in phy_on_sfp()
1517 static inline bool phy_interface_is_rgmii(struct phy_device *phydev) in phy_interface_is_rgmii()
1527 static inline bool phy_is_pseudo_fixed_link(struct phy_device *phydev) in phy_is_pseudo_fixed_link()
1532 int phy_save_page(struct phy_device *phydev);
1533 int phy_select_page(struct phy_device *phydev, int page);
1534 int phy_restore_page(struct phy_device *phydev, int oldpage, int ret);
1535 int phy_read_paged(struct phy_device *phydev, int page, u32 regnum);
1536 int phy_write_paged(struct phy_device *phydev, int page, u32 regnum, u16 val);
1537 int phy_modify_paged_changed(struct phy_device *phydev, int page, u32 regnum,
1539 int phy_modify_paged(struct phy_device *phydev, int page, u32 regnum,
1542 struct phy_device *phy_device_create(struct mii_bus *bus, int addr, u32 phy_id,
1548 struct phy_device *fwnode_phy_find_device(struct fwnode_handle *phy_fwnode);
1549 struct phy_device *device_phy_find_device(struct device *dev);
1551 struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45);
1552 int phy_device_register(struct phy_device *phy);
1553 void phy_device_free(struct phy_device *phydev);
1566 struct phy_device *fwnode_phy_find_device(struct fwnode_handle *phy_fwnode) in fwnode_phy_find_device()
1571 static inline struct phy_device *device_phy_find_device(struct device *dev) in device_phy_find_device()
1583 struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45) in get_phy_device()
1588 static inline int phy_device_register(struct phy_device *phy) in phy_device_register()
1593 static inline void phy_device_free(struct phy_device *phydev) { } in phy_device_free()
1595 void phy_device_remove(struct phy_device *phydev);
1596 int phy_get_c45_ids(struct phy_device *phydev);
1597 int phy_init_hw(struct phy_device *phydev);
1598 int phy_suspend(struct phy_device *phydev);
1599 int phy_resume(struct phy_device *phydev);
1600 int __phy_resume(struct phy_device *phydev);
1601 int phy_loopback(struct phy_device *phydev, bool enable);
1604 int phy_sfp_probe(struct phy_device *phydev,
1606 struct phy_device *phy_attach(struct net_device *dev, const char *bus_id,
1608 struct phy_device *phy_find_first(struct mii_bus *bus);
1609 int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
1611 int phy_connect_direct(struct net_device *dev, struct phy_device *phydev,
1614 struct phy_device *phy_connect(struct net_device *dev, const char *bus_id,
1617 void phy_disconnect(struct phy_device *phydev);
1618 void phy_detach(struct phy_device *phydev);
1619 void phy_start(struct phy_device *phydev);
1620 void phy_stop(struct phy_device *phydev);
1621 int phy_config_aneg(struct phy_device *phydev);
1622 int phy_start_aneg(struct phy_device *phydev);
1623 int phy_aneg_done(struct phy_device *phydev);
1624 int phy_speed_down(struct phy_device *phydev, bool sync);
1625 int phy_speed_up(struct phy_device *phydev);
1628 int phy_restart_aneg(struct phy_device *phydev);
1629 int phy_reset_after_clk_enable(struct phy_device *phydev);
1632 int phy_start_cable_test(struct phy_device *phydev,
1634 int phy_start_cable_test_tdr(struct phy_device *phydev,
1639 int phy_start_cable_test(struct phy_device *phydev, in phy_start_cable_test()
1646 int phy_start_cable_test_tdr(struct phy_device *phydev, in phy_start_cable_test_tdr()
1655 int phy_cable_test_result(struct phy_device *phydev, u8 pair, u16 result);
1656 int phy_cable_test_fault_length(struct phy_device *phydev, u8 pair,
1659 static inline void phy_device_reset(struct phy_device *phydev, int value) in phy_device_reset()
1679 static inline const char *phydev_name(const struct phy_device *phydev) in phydev_name()
1684 static inline void phy_lock_mdio_bus(struct phy_device *phydev) in phy_lock_mdio_bus()
1689 static inline void phy_unlock_mdio_bus(struct phy_device *phydev) in phy_unlock_mdio_bus()
1694 void phy_attached_print(struct phy_device *phydev, const char *fmt, ...)
1696 char *phy_attached_info_irq(struct phy_device *phydev)
1698 void phy_attached_info(struct phy_device *phydev);
1701 int genphy_read_abilities(struct phy_device *phydev);
1702 int genphy_setup_forced(struct phy_device *phydev);
1703 int genphy_restart_aneg(struct phy_device *phydev);
1704 int genphy_check_and_restart_aneg(struct phy_device *phydev, bool restart);
1705 int genphy_config_eee_advert(struct phy_device *phydev);
1706 int __genphy_config_aneg(struct phy_device *phydev, bool changed);
1707 int genphy_aneg_done(struct phy_device *phydev);
1708 int genphy_update_link(struct phy_device *phydev);
1709 int genphy_read_lpa(struct phy_device *phydev);
1710 int genphy_read_status_fixed(struct phy_device *phydev);
1711 int genphy_read_status(struct phy_device *phydev);
1712 int genphy_read_master_slave(struct phy_device *phydev);
1713 int genphy_suspend(struct phy_device *phydev);
1714 int genphy_resume(struct phy_device *phydev);
1715 int genphy_loopback(struct phy_device *phydev, bool enable);
1716 int genphy_soft_reset(struct phy_device *phydev);
1717 irqreturn_t genphy_handle_interrupt_no_ack(struct phy_device *phydev);
1719 static inline int genphy_config_aneg(struct phy_device *phydev) in genphy_config_aneg()
1724 static inline int genphy_no_config_intr(struct phy_device *phydev) in genphy_no_config_intr()
1728 int genphy_read_mmd_unsupported(struct phy_device *phdev, int devad,
1730 int genphy_write_mmd_unsupported(struct phy_device *phdev, int devnum,
1734 int genphy_c37_config_aneg(struct phy_device *phydev);
1735 int genphy_c37_read_status(struct phy_device *phydev);
1738 int genphy_c45_restart_aneg(struct phy_device *phydev);
1739 int genphy_c45_check_and_restart_aneg(struct phy_device *phydev, bool restart);
1740 int genphy_c45_aneg_done(struct phy_device *phydev);
1741 int genphy_c45_read_link(struct phy_device *phydev);
1742 int genphy_c45_read_lpa(struct phy_device *phydev);
1743 int genphy_c45_read_pma(struct phy_device *phydev);
1744 int genphy_c45_pma_setup_forced(struct phy_device *phydev);
1745 int genphy_c45_pma_baset1_setup_master_slave(struct phy_device *phydev);
1746 int genphy_c45_an_config_aneg(struct phy_device *phydev);
1747 int genphy_c45_an_disable_aneg(struct phy_device *phydev);
1748 int genphy_c45_read_mdix(struct phy_device *phydev);
1749 int genphy_c45_pma_read_abilities(struct phy_device *phydev);
1750 int genphy_c45_read_eee_abilities(struct phy_device *phydev);
1751 int genphy_c45_pma_baset1_read_master_slave(struct phy_device *phydev);
1752 int genphy_c45_read_status(struct phy_device *phydev);
1753 int genphy_c45_baset1_read_status(struct phy_device *phydev);
1754 int genphy_c45_config_aneg(struct phy_device *phydev);
1755 int genphy_c45_loopback(struct phy_device *phydev, bool enable);
1756 int genphy_c45_pma_resume(struct phy_device *phydev);
1757 int genphy_c45_pma_suspend(struct phy_device *phydev);
1758 int genphy_c45_fast_retrain(struct phy_device *phydev, bool enable);
1759 int genphy_c45_plca_get_cfg(struct phy_device *phydev,
1761 int genphy_c45_plca_set_cfg(struct phy_device *phydev,
1763 int genphy_c45_plca_get_status(struct phy_device *phydev,
1765 int genphy_c45_eee_is_active(struct phy_device *phydev, unsigned long *adv,
1767 int genphy_c45_ethtool_get_eee(struct phy_device *phydev,
1769 int genphy_c45_ethtool_set_eee(struct phy_device *phydev,
1771 int genphy_c45_write_eee_adv(struct phy_device *phydev, unsigned long *adv);
1772 int genphy_c45_an_config_eee_aneg(struct phy_device *phydev);
1773 int genphy_c45_read_eee_adv(struct phy_device *phydev, unsigned long *adv);
1779 int gen10g_config_aneg(struct phy_device *phydev);
1781 static inline int phy_read_status(struct phy_device *phydev) in phy_read_status()
1797 void phy_error(struct phy_device *phydev);
1799 void phy_queue_state_machine(struct phy_device *phydev, unsigned long jiffies);
1800 void phy_trigger_machine(struct phy_device *phydev);
1801 void phy_mac_interrupt(struct phy_device *phydev);
1802 void phy_start_machine(struct phy_device *phydev);
1803 void phy_stop_machine(struct phy_device *phydev);
1804 void phy_ethtool_ksettings_get(struct phy_device *phydev,
1806 int phy_ethtool_ksettings_set(struct phy_device *phydev,
1808 int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd);
1811 int phy_disable_interrupts(struct phy_device *phydev);
1812 void phy_request_interrupt(struct phy_device *phydev);
1813 void phy_free_interrupt(struct phy_device *phydev);
1814 void phy_print_status(struct phy_device *phydev);
1815 int phy_get_rate_matching(struct phy_device *phydev,
1817 void phy_set_max_speed(struct phy_device *phydev, u32 max_speed);
1818 void phy_remove_link_mode(struct phy_device *phydev, u32 link_mode);
1819 void phy_advertise_supported(struct phy_device *phydev);
1820 void phy_support_sym_pause(struct phy_device *phydev);
1821 void phy_support_asym_pause(struct phy_device *phydev);
1822 void phy_set_sym_pause(struct phy_device *phydev, bool rx, bool tx,
1824 void phy_set_asym_pause(struct phy_device *phydev, bool rx, bool tx);
1825 bool phy_validate_pause(struct phy_device *phydev,
1827 void phy_get_pause(struct phy_device *phydev, bool *tx_pause, bool *rx_pause);
1829 s32 phy_get_internal_delay(struct phy_device *phydev, struct device *dev,
1836 int (*run)(struct phy_device *));
1838 int (*run)(struct phy_device *));
1840 int (*run)(struct phy_device *));
1846 int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable);
1847 int phy_get_eee_err(struct phy_device *phydev);
1848 int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_eee *data);
1849 int phy_ethtool_get_eee(struct phy_device *phydev, struct ethtool_eee *data);
1850 int phy_ethtool_set_wol(struct phy_device *phydev, struct ethtool_wolinfo *wol);
1851 void phy_ethtool_get_wol(struct phy_device *phydev,
1858 int phy_package_join(struct phy_device *phydev, int addr, size_t priv_size);
1859 void phy_package_leave(struct phy_device *phydev);
1860 int devm_phy_package_join(struct device *dev, struct phy_device *phydev,
1868 int phy_ethtool_get_strings(struct phy_device *phydev, u8 *data);
1869 int phy_ethtool_get_sset_count(struct phy_device *phydev);
1870 int phy_ethtool_get_stats(struct phy_device *phydev,
1872 int phy_ethtool_get_plca_cfg(struct phy_device *phydev,
1874 int phy_ethtool_set_plca_cfg(struct phy_device *phydev,
1877 int phy_ethtool_get_plca_status(struct phy_device *phydev,
1880 static inline int phy_package_read(struct phy_device *phydev, u32 regnum) in phy_package_read()
1890 static inline int __phy_package_read(struct phy_device *phydev, u32 regnum) in __phy_package_read()
1900 static inline int phy_package_write(struct phy_device *phydev, in phy_package_write()
1911 static inline int __phy_package_write(struct phy_device *phydev, in __phy_package_write()
1922 static inline bool __phy_package_set_once(struct phy_device *phydev, in __phy_package_set_once()
1933 static inline bool phy_package_init_once(struct phy_device *phydev) in phy_package_init_once()
1938 static inline bool phy_package_probe_once(struct phy_device *phydev) in phy_package_probe_once()
1988 bool phy_driver_is_genphy(struct phy_device *phydev);
1989 bool phy_driver_is_genphy_10g(struct phy_device *phydev);