Lines Matching refs:phy_device

208 unsigned int phy_supported_speeds(struct phy_device *phy,
468 struct phy_device *mdiobus_scan_c22(struct mii_bus *bus, int addr);
634 struct phy_device { struct
757 void (*phy_link_change)(struct phy_device *phydev, bool up); argument
769 static inline struct phy_device *to_phy_device(const struct device *dev) in to_phy_device()
771 return container_of(to_mdio_device(dev), struct phy_device, mdio); in to_phy_device()
862 struct phy_device *phydev;
904 int (*soft_reset)(struct phy_device *phydev);
910 int (*config_init)(struct phy_device *phydev);
916 int (*probe)(struct phy_device *phydev);
922 int (*get_features)(struct phy_device *phydev);
933 int (*get_rate_matching)(struct phy_device *phydev,
938 int (*suspend)(struct phy_device *phydev);
940 int (*resume)(struct phy_device *phydev);
948 int (*config_aneg)(struct phy_device *phydev);
951 int (*aneg_done)(struct phy_device *phydev);
954 int (*read_status)(struct phy_device *phydev);
961 int (*config_intr)(struct phy_device *phydev);
964 irqreturn_t (*handle_interrupt)(struct phy_device *phydev);
967 void (*remove)(struct phy_device *phydev);
974 int (*match_phy_device)(struct phy_device *phydev);
982 int (*set_wol)(struct phy_device *dev, struct ethtool_wolinfo *wol);
988 void (*get_wol)(struct phy_device *dev, struct ethtool_wolinfo *wol);
998 void (*link_change_notify)(struct phy_device *dev);
1010 int (*read_mmd)(struct phy_device *dev, int devnum, u16 regnum);
1022 int (*write_mmd)(struct phy_device *dev, int devnum, u16 regnum,
1026 int (*read_page)(struct phy_device *dev);
1028 int (*write_page)(struct phy_device *dev, int page);
1034 int (*module_info)(struct phy_device *dev,
1041 int (*module_eeprom)(struct phy_device *dev,
1045 int (*cable_test_start)(struct phy_device *dev);
1048 int (*cable_test_tdr_start)(struct phy_device *dev,
1055 int (*cable_test_get_status)(struct phy_device *dev, bool *finished);
1059 int (*get_sset_count)(struct phy_device *dev);
1061 void (*get_strings)(struct phy_device *dev, u8 *data);
1063 void (*get_stats)(struct phy_device *dev,
1068 int (*get_tunable)(struct phy_device *dev,
1071 int (*set_tunable)(struct phy_device *dev,
1075 int (*set_loopback)(struct phy_device *dev, bool enable);
1077 int (*get_sqi)(struct phy_device *dev);
1079 int (*get_sqi_max)(struct phy_device *dev);
1083 int (*get_plca_cfg)(struct phy_device *dev,
1086 int (*set_plca_cfg)(struct phy_device *dev,
1089 int (*get_plca_status)(struct phy_device *dev,
1098 int (*led_brightness_set)(struct phy_device *dev,
1109 int (*led_blink_set)(struct phy_device *dev, u8 index,
1120 int (*led_hw_is_supported)(struct phy_device *dev, u8 index,
1130 int (*led_hw_control_set)(struct phy_device *dev, u8 index,
1142 int (*led_hw_control_get)(struct phy_device *dev, u8 index,
1179 static inline bool phydev_id_compare(struct phy_device *phydev, u32 id) in phydev_id_compare()
1190 int (*run)(struct phy_device *phydev);
1213 void of_set_phy_supported(struct phy_device *phydev);
1214 void of_set_phy_eee_broken(struct phy_device *phydev);
1215 int phy_speed_down_core(struct phy_device *phydev);
1221 static inline bool phy_is_started(struct phy_device *phydev) in phy_is_started()
1226 void phy_resolve_aneg_pause(struct phy_device *phydev);
1227 void phy_resolve_aneg_linkmode(struct phy_device *phydev);
1228 void phy_check_downshift(struct phy_device *phydev);
1239 static inline int phy_read(struct phy_device *phydev, u32 regnum) in phy_read()
1265 static inline int __phy_read(struct phy_device *phydev, u32 regnum) in __phy_read()
1280 static inline int phy_write(struct phy_device *phydev, u32 regnum, u16 val) in phy_write()
1293 static inline int __phy_write(struct phy_device *phydev, u32 regnum, u16 val) in __phy_write()
1311 static inline int __phy_modify_changed(struct phy_device *phydev, u32 regnum, in __phy_modify_changed()
1322 int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum);
1361 int __phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum);
1367 int phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val);
1373 int __phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val);
1375 int __phy_modify_changed(struct phy_device *phydev, u32 regnum, u16 mask,
1377 int phy_modify_changed(struct phy_device *phydev, u32 regnum, u16 mask,
1379 int __phy_modify(struct phy_device *phydev, u32 regnum, u16 mask, u16 set);
1380 int phy_modify(struct phy_device *phydev, u32 regnum, u16 mask, u16 set);
1382 int __phy_modify_mmd_changed(struct phy_device *phydev, int devad, u32 regnum,
1384 int phy_modify_mmd_changed(struct phy_device *phydev, int devad, u32 regnum,
1386 int __phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum,
1388 int phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum,
1399 static inline int __phy_set_bits(struct phy_device *phydev, u32 regnum, u16 val) in __phy_set_bits()
1412 static inline int __phy_clear_bits(struct phy_device *phydev, u32 regnum, in __phy_clear_bits()
1424 static inline int phy_set_bits(struct phy_device *phydev, u32 regnum, u16 val) in phy_set_bits()
1435 static inline int phy_clear_bits(struct phy_device *phydev, u32 regnum, u16 val) in phy_clear_bits()
1450 static inline int __phy_set_bits_mmd(struct phy_device *phydev, int devad, in __phy_set_bits_mmd()
1466 static inline int __phy_clear_bits_mmd(struct phy_device *phydev, int devad, in __phy_clear_bits_mmd()
1480 static inline int phy_set_bits_mmd(struct phy_device *phydev, int devad, in phy_set_bits_mmd()
1494 static inline int phy_clear_bits_mmd(struct phy_device *phydev, int devad, in phy_clear_bits_mmd()
1507 static inline bool phy_interrupt_is_valid(struct phy_device *phydev) in phy_interrupt_is_valid()
1517 static inline bool phy_polling_mode(struct phy_device *phydev) in phy_polling_mode()
1530 static inline bool phy_has_hwtstamp(struct phy_device *phydev) in phy_has_hwtstamp()
1539 static inline bool phy_has_rxtstamp(struct phy_device *phydev) in phy_has_rxtstamp()
1549 static inline bool phy_has_tsinfo(struct phy_device *phydev) in phy_has_tsinfo()
1558 static inline bool phy_has_txtstamp(struct phy_device *phydev) in phy_has_txtstamp()
1563 static inline int phy_hwtstamp(struct phy_device *phydev, struct ifreq *ifr) in phy_hwtstamp()
1568 static inline bool phy_rxtstamp(struct phy_device *phydev, struct sk_buff *skb, in phy_rxtstamp()
1574 static inline int phy_ts_info(struct phy_device *phydev, in phy_ts_info()
1580 static inline void phy_txtstamp(struct phy_device *phydev, struct sk_buff *skb, in phy_txtstamp()
1590 static inline bool phy_is_internal(struct phy_device *phydev) in phy_is_internal()
1599 static inline bool phy_on_sfp(struct phy_device *phydev) in phy_on_sfp()
1634 static inline bool phy_interface_is_rgmii(struct phy_device *phydev) in phy_interface_is_rgmii()
1644 static inline bool phy_is_pseudo_fixed_link(struct phy_device *phydev) in phy_is_pseudo_fixed_link()
1649 int phy_save_page(struct phy_device *phydev);
1650 int phy_select_page(struct phy_device *phydev, int page);
1651 int phy_restore_page(struct phy_device *phydev, int oldpage, int ret);
1652 int phy_read_paged(struct phy_device *phydev, int page, u32 regnum);
1653 int phy_write_paged(struct phy_device *phydev, int page, u32 regnum, u16 val);
1654 int phy_modify_paged_changed(struct phy_device *phydev, int page, u32 regnum,
1656 int phy_modify_paged(struct phy_device *phydev, int page, u32 regnum,
1659 struct phy_device *phy_device_create(struct mii_bus *bus, int addr, u32 phy_id,
1665 struct phy_device *fwnode_phy_find_device(struct fwnode_handle *phy_fwnode);
1666 struct phy_device *device_phy_find_device(struct device *dev);
1668 struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45);
1669 int phy_device_register(struct phy_device *phy);
1670 void phy_device_free(struct phy_device *phydev);
1683 struct phy_device *fwnode_phy_find_device(struct fwnode_handle *phy_fwnode) in fwnode_phy_find_device()
1688 static inline struct phy_device *device_phy_find_device(struct device *dev) in device_phy_find_device()
1700 struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45) in get_phy_device()
1705 static inline int phy_device_register(struct phy_device *phy) in phy_device_register()
1710 static inline void phy_device_free(struct phy_device *phydev) { } in phy_device_free()
1712 void phy_device_remove(struct phy_device *phydev);
1713 int phy_get_c45_ids(struct phy_device *phydev);
1714 int phy_init_hw(struct phy_device *phydev);
1715 int phy_suspend(struct phy_device *phydev);
1716 int phy_resume(struct phy_device *phydev);
1717 int __phy_resume(struct phy_device *phydev);
1718 int phy_loopback(struct phy_device *phydev, bool enable);
1721 int phy_sfp_probe(struct phy_device *phydev,
1723 struct phy_device *phy_attach(struct net_device *dev, const char *bus_id,
1725 struct phy_device *phy_find_first(struct mii_bus *bus);
1726 int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
1728 int phy_connect_direct(struct net_device *dev, struct phy_device *phydev,
1731 struct phy_device *phy_connect(struct net_device *dev, const char *bus_id,
1734 void phy_disconnect(struct phy_device *phydev);
1735 void phy_detach(struct phy_device *phydev);
1736 void phy_start(struct phy_device *phydev);
1737 void phy_stop(struct phy_device *phydev);
1738 int phy_config_aneg(struct phy_device *phydev);
1739 int phy_start_aneg(struct phy_device *phydev);
1740 int phy_aneg_done(struct phy_device *phydev);
1741 int phy_speed_down(struct phy_device *phydev, bool sync);
1742 int phy_speed_up(struct phy_device *phydev);
1745 int phy_restart_aneg(struct phy_device *phydev);
1746 int phy_reset_after_clk_enable(struct phy_device *phydev);
1749 int phy_start_cable_test(struct phy_device *phydev,
1751 int phy_start_cable_test_tdr(struct phy_device *phydev,
1756 int phy_start_cable_test(struct phy_device *phydev, in phy_start_cable_test()
1763 int phy_start_cable_test_tdr(struct phy_device *phydev, in phy_start_cable_test_tdr()
1772 static inline void phy_device_reset(struct phy_device *phydev, int value) in phy_device_reset()
1792 static inline const char *phydev_name(const struct phy_device *phydev) in phydev_name()
1797 static inline void phy_lock_mdio_bus(struct phy_device *phydev) in phy_lock_mdio_bus()
1802 static inline void phy_unlock_mdio_bus(struct phy_device *phydev) in phy_unlock_mdio_bus()
1807 void phy_attached_print(struct phy_device *phydev, const char *fmt, ...)
1809 char *phy_attached_info_irq(struct phy_device *phydev)
1811 void phy_attached_info(struct phy_device *phydev);
1814 int genphy_read_abilities(struct phy_device *phydev);
1815 int genphy_setup_forced(struct phy_device *phydev);
1816 int genphy_restart_aneg(struct phy_device *phydev);
1817 int genphy_check_and_restart_aneg(struct phy_device *phydev, bool restart);
1818 int genphy_config_eee_advert(struct phy_device *phydev);
1819 int __genphy_config_aneg(struct phy_device *phydev, bool changed);
1820 int genphy_aneg_done(struct phy_device *phydev);
1821 int genphy_update_link(struct phy_device *phydev);
1822 int genphy_read_lpa(struct phy_device *phydev);
1823 int genphy_read_status_fixed(struct phy_device *phydev);
1824 int genphy_read_status(struct phy_device *phydev);
1825 int genphy_read_master_slave(struct phy_device *phydev);
1826 int genphy_suspend(struct phy_device *phydev);
1827 int genphy_resume(struct phy_device *phydev);
1828 int genphy_loopback(struct phy_device *phydev, bool enable);
1829 int genphy_soft_reset(struct phy_device *phydev);
1830 irqreturn_t genphy_handle_interrupt_no_ack(struct phy_device *phydev);
1832 static inline int genphy_config_aneg(struct phy_device *phydev) in genphy_config_aneg()
1837 static inline int genphy_no_config_intr(struct phy_device *phydev) in genphy_no_config_intr()
1841 int genphy_read_mmd_unsupported(struct phy_device *phdev, int devad,
1843 int genphy_write_mmd_unsupported(struct phy_device *phdev, int devnum,
1847 int genphy_c37_config_aneg(struct phy_device *phydev);
1848 int genphy_c37_read_status(struct phy_device *phydev);
1851 int genphy_c45_restart_aneg(struct phy_device *phydev);
1852 int genphy_c45_check_and_restart_aneg(struct phy_device *phydev, bool restart);
1853 int genphy_c45_aneg_done(struct phy_device *phydev);
1854 int genphy_c45_read_link(struct phy_device *phydev);
1855 int genphy_c45_read_lpa(struct phy_device *phydev);
1856 int genphy_c45_read_pma(struct phy_device *phydev);
1857 int genphy_c45_pma_setup_forced(struct phy_device *phydev);
1858 int genphy_c45_pma_baset1_setup_master_slave(struct phy_device *phydev);
1859 int genphy_c45_an_config_aneg(struct phy_device *phydev);
1860 int genphy_c45_an_disable_aneg(struct phy_device *phydev);
1861 int genphy_c45_read_mdix(struct phy_device *phydev);
1862 int genphy_c45_pma_read_abilities(struct phy_device *phydev);
1863 int genphy_c45_pma_baset1_read_abilities(struct phy_device *phydev);
1864 int genphy_c45_read_eee_abilities(struct phy_device *phydev);
1865 int genphy_c45_pma_baset1_read_master_slave(struct phy_device *phydev);
1866 int genphy_c45_read_status(struct phy_device *phydev);
1867 int genphy_c45_baset1_read_status(struct phy_device *phydev);
1868 int genphy_c45_config_aneg(struct phy_device *phydev);
1869 int genphy_c45_loopback(struct phy_device *phydev, bool enable);
1870 int genphy_c45_pma_resume(struct phy_device *phydev);
1871 int genphy_c45_pma_suspend(struct phy_device *phydev);
1872 int genphy_c45_fast_retrain(struct phy_device *phydev, bool enable);
1873 int genphy_c45_plca_get_cfg(struct phy_device *phydev,
1875 int genphy_c45_plca_set_cfg(struct phy_device *phydev,
1877 int genphy_c45_plca_get_status(struct phy_device *phydev,
1879 int genphy_c45_eee_is_active(struct phy_device *phydev, unsigned long *adv,
1881 int genphy_c45_ethtool_get_eee(struct phy_device *phydev,
1883 int genphy_c45_ethtool_set_eee(struct phy_device *phydev,
1885 int genphy_c45_write_eee_adv(struct phy_device *phydev, unsigned long *adv);
1886 int genphy_c45_an_config_eee_aneg(struct phy_device *phydev);
1887 int genphy_c45_read_eee_adv(struct phy_device *phydev, unsigned long *adv);
1893 int gen10g_config_aneg(struct phy_device *phydev);
1895 static inline int phy_read_status(struct phy_device *phydev) in phy_read_status()
1911 void phy_error(struct phy_device *phydev);
1913 void phy_queue_state_machine(struct phy_device *phydev, unsigned long jiffies);
1914 void phy_trigger_machine(struct phy_device *phydev);
1915 void phy_mac_interrupt(struct phy_device *phydev);
1916 void phy_start_machine(struct phy_device *phydev);
1917 void phy_stop_machine(struct phy_device *phydev);
1918 void phy_ethtool_ksettings_get(struct phy_device *phydev,
1920 int phy_ethtool_ksettings_set(struct phy_device *phydev,
1922 int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd);
1925 int phy_disable_interrupts(struct phy_device *phydev);
1926 void phy_request_interrupt(struct phy_device *phydev);
1927 void phy_free_interrupt(struct phy_device *phydev);
1928 void phy_print_status(struct phy_device *phydev);
1929 int phy_get_rate_matching(struct phy_device *phydev,
1931 void phy_set_max_speed(struct phy_device *phydev, u32 max_speed);
1932 void phy_remove_link_mode(struct phy_device *phydev, u32 link_mode);
1933 void phy_advertise_supported(struct phy_device *phydev);
1934 void phy_support_sym_pause(struct phy_device *phydev);
1935 void phy_support_asym_pause(struct phy_device *phydev);
1936 void phy_set_sym_pause(struct phy_device *phydev, bool rx, bool tx,
1938 void phy_set_asym_pause(struct phy_device *phydev, bool rx, bool tx);
1939 bool phy_validate_pause(struct phy_device *phydev,
1941 void phy_get_pause(struct phy_device *phydev, bool *tx_pause, bool *rx_pause);
1943 s32 phy_get_internal_delay(struct phy_device *phydev, struct device *dev,
1950 int (*run)(struct phy_device *));
1952 int (*run)(struct phy_device *));
1954 int (*run)(struct phy_device *));
1960 int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable);
1961 int phy_get_eee_err(struct phy_device *phydev);
1962 int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_eee *data);
1963 int phy_ethtool_get_eee(struct phy_device *phydev, struct ethtool_eee *data);
1964 int phy_ethtool_set_wol(struct phy_device *phydev, struct ethtool_wolinfo *wol);
1965 void phy_ethtool_get_wol(struct phy_device *phydev,
1972 int phy_package_join(struct phy_device *phydev, int addr, size_t priv_size);
1973 void phy_package_leave(struct phy_device *phydev);
1974 int devm_phy_package_join(struct device *dev, struct phy_device *phydev,
1980 int phy_ethtool_get_strings(struct phy_device *phydev, u8 *data);
1981 int phy_ethtool_get_sset_count(struct phy_device *phydev);
1982 int phy_ethtool_get_stats(struct phy_device *phydev,
1984 int phy_ethtool_get_plca_cfg(struct phy_device *phydev,
1986 int phy_ethtool_set_plca_cfg(struct phy_device *phydev,
1989 int phy_ethtool_get_plca_status(struct phy_device *phydev,
1992 int __phy_hwtstamp_get(struct phy_device *phydev,
1994 int __phy_hwtstamp_set(struct phy_device *phydev,
1998 static inline int phy_package_read(struct phy_device *phydev, u32 regnum) in phy_package_read()
2008 static inline int __phy_package_read(struct phy_device *phydev, u32 regnum) in __phy_package_read()
2018 static inline int phy_package_write(struct phy_device *phydev, in phy_package_write()
2029 static inline int __phy_package_write(struct phy_device *phydev, in __phy_package_write()
2040 static inline bool __phy_package_set_once(struct phy_device *phydev, in __phy_package_set_once()
2051 static inline bool phy_package_init_once(struct phy_device *phydev) in phy_package_init_once()
2056 static inline bool phy_package_probe_once(struct phy_device *phydev) in phy_package_probe_once()
2106 bool phy_driver_is_genphy(struct phy_device *phydev);
2107 bool phy_driver_is_genphy_10g(struct phy_device *phydev);