Lines Matching refs:phy_device
463 struct phy_device *mdiobus_scan_c22(struct mii_bus *bus, int addr);
666 struct phy_device { struct
801 void (*phy_link_change)(struct phy_device *phydev, bool up); argument
817 #define to_phy_device(__dev) container_of_const(to_mdio_device(__dev), struct phy_device, mdio)
938 struct phy_device *phydev;
1139 int (*soft_reset)(struct phy_device *phydev);
1145 int (*config_init)(struct phy_device *phydev);
1151 int (*probe)(struct phy_device *phydev);
1157 int (*get_features)(struct phy_device *phydev);
1164 unsigned int (*inband_caps)(struct phy_device *phydev,
1170 int (*config_inband)(struct phy_device *phydev, unsigned int modes);
1181 int (*get_rate_matching)(struct phy_device *phydev,
1186 int (*suspend)(struct phy_device *phydev);
1188 int (*resume)(struct phy_device *phydev);
1196 int (*config_aneg)(struct phy_device *phydev);
1199 int (*aneg_done)(struct phy_device *phydev);
1202 int (*read_status)(struct phy_device *phydev);
1209 int (*config_intr)(struct phy_device *phydev);
1212 irqreturn_t (*handle_interrupt)(struct phy_device *phydev);
1215 void (*remove)(struct phy_device *phydev);
1222 int (*match_phy_device)(struct phy_device *phydev,
1231 int (*set_wol)(struct phy_device *dev, struct ethtool_wolinfo *wol);
1237 void (*get_wol)(struct phy_device *dev, struct ethtool_wolinfo *wol);
1247 void (*link_change_notify)(struct phy_device *dev);
1259 int (*read_mmd)(struct phy_device *dev, int devnum, u16 regnum);
1271 int (*write_mmd)(struct phy_device *dev, int devnum, u16 regnum,
1275 int (*read_page)(struct phy_device *dev);
1277 int (*write_page)(struct phy_device *dev, int page);
1283 int (*module_info)(struct phy_device *dev,
1290 int (*module_eeprom)(struct phy_device *dev,
1294 int (*cable_test_start)(struct phy_device *dev);
1297 int (*cable_test_tdr_start)(struct phy_device *dev,
1304 int (*cable_test_get_status)(struct phy_device *dev, bool *finished);
1319 void (*get_phy_stats)(struct phy_device *dev,
1334 void (*get_link_stats)(struct phy_device *dev,
1352 int (*update_stats)(struct phy_device *dev);
1355 int (*get_sset_count)(struct phy_device *dev);
1357 void (*get_strings)(struct phy_device *dev, u8 *data);
1359 void (*get_stats)(struct phy_device *dev,
1364 int (*get_tunable)(struct phy_device *dev,
1367 int (*set_tunable)(struct phy_device *dev,
1379 int (*set_loopback)(struct phy_device *dev, bool enable, int speed);
1381 int (*get_sqi)(struct phy_device *dev);
1383 int (*get_sqi_max)(struct phy_device *dev);
1404 int (*get_mse_capability)(struct phy_device *dev,
1428 int (*get_mse_snapshot)(struct phy_device *dev,
1434 int (*get_plca_cfg)(struct phy_device *dev,
1437 int (*set_plca_cfg)(struct phy_device *dev,
1440 int (*get_plca_status)(struct phy_device *dev,
1449 int (*led_brightness_set)(struct phy_device *dev,
1460 int (*led_blink_set)(struct phy_device *dev, u8 index,
1471 int (*led_hw_is_supported)(struct phy_device *dev, u8 index,
1481 int (*led_hw_control_set)(struct phy_device *dev, u8 index,
1493 int (*led_hw_control_get)(struct phy_device *dev, u8 index,
1507 int (*led_polarity_set)(struct phy_device *dev, int index,
1521 unsigned int (*get_next_update_time)(struct phy_device *dev);
1543 int (*attach_mii_port)(struct phy_device *dev, struct phy_port *port);
1564 int (*attach_mdi_port)(struct phy_device *dev, struct phy_port *port);
1626 static inline bool phydev_id_compare(struct phy_device *phydev, u32 id) in phydev_id_compare()
1641 static inline bool phy_is_started(struct phy_device *phydev) in phy_is_started()
1652 static inline bool phy_driver_is_genphy(struct phy_device *phydev) in phy_driver_is_genphy()
1662 static inline void phy_disable_eee_mode(struct phy_device *phydev, u32 link_mode) in phy_disable_eee_mode()
1677 static inline bool phy_can_wakeup(struct phy_device *phydev) in phy_can_wakeup()
1689 bool phy_may_wakeup(struct phy_device *phydev);
1691 void phy_resolve_aneg_pause(struct phy_device *phydev);
1692 void phy_resolve_aneg_linkmode(struct phy_device *phydev);
1703 static inline int phy_read(struct phy_device *phydev, u32 regnum) in phy_read()
1729 static inline int __phy_read(struct phy_device *phydev, u32 regnum) in __phy_read()
1744 static inline int phy_write(struct phy_device *phydev, u32 regnum, u16 val) in phy_write()
1757 static inline int __phy_write(struct phy_device *phydev, u32 regnum, u16 val) in __phy_write()
1775 static inline int __phy_modify_changed(struct phy_device *phydev, u32 regnum, in __phy_modify_changed()
1786 int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum);
1826 int __phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum);
1832 int phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val);
1838 int __phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val);
1840 int __phy_modify_changed(struct phy_device *phydev, u32 regnum, u16 mask,
1842 int phy_modify_changed(struct phy_device *phydev, u32 regnum, u16 mask,
1844 int __phy_modify(struct phy_device *phydev, u32 regnum, u16 mask, u16 set);
1845 int phy_modify(struct phy_device *phydev, u32 regnum, u16 mask, u16 set);
1847 int __phy_modify_mmd_changed(struct phy_device *phydev, int devad, u32 regnum,
1849 int phy_modify_mmd_changed(struct phy_device *phydev, int devad, u32 regnum,
1851 int __phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum,
1853 int phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum,
1864 static inline int __phy_set_bits(struct phy_device *phydev, u32 regnum, u16 val) in __phy_set_bits()
1877 static inline int __phy_clear_bits(struct phy_device *phydev, u32 regnum, in __phy_clear_bits()
1889 static inline int phy_set_bits(struct phy_device *phydev, u32 regnum, u16 val) in phy_set_bits()
1900 static inline int phy_clear_bits(struct phy_device *phydev, u32 regnum, u16 val) in phy_clear_bits()
1915 static inline int __phy_set_bits_mmd(struct phy_device *phydev, int devad, in __phy_set_bits_mmd()
1931 static inline int __phy_clear_bits_mmd(struct phy_device *phydev, int devad, in __phy_clear_bits_mmd()
1945 static inline int phy_set_bits_mmd(struct phy_device *phydev, int devad, in phy_set_bits_mmd()
1959 static inline int phy_clear_bits_mmd(struct phy_device *phydev, int devad, in phy_clear_bits_mmd()
1972 static inline bool phy_interrupt_is_valid(struct phy_device *phydev) in phy_interrupt_is_valid()
1982 static inline bool phy_polling_mode(struct phy_device *phydev) in phy_polling_mode()
1998 static inline bool phy_has_hwtstamp(struct phy_device *phydev) in phy_has_hwtstamp()
2007 static inline bool phy_has_rxtstamp(struct phy_device *phydev) in phy_has_rxtstamp()
2017 static inline bool phy_has_tsinfo(struct phy_device *phydev) in phy_has_tsinfo()
2026 static inline bool phy_has_txtstamp(struct phy_device *phydev) in phy_has_txtstamp()
2031 static inline int phy_hwtstamp(struct phy_device *phydev, in phy_hwtstamp()
2038 static inline bool phy_rxtstamp(struct phy_device *phydev, struct sk_buff *skb, in phy_rxtstamp()
2044 static inline int phy_ts_info(struct phy_device *phydev, in phy_ts_info()
2050 static inline void phy_txtstamp(struct phy_device *phydev, struct sk_buff *skb, in phy_txtstamp()
2066 static inline bool phy_is_default_hwtstamp(struct phy_device *phydev) in phy_is_default_hwtstamp()
2075 static inline bool phy_on_sfp(struct phy_device *phydev) in phy_on_sfp()
2110 static inline bool phy_interface_is_rgmii(struct phy_device *phydev) in phy_interface_is_rgmii()
2120 static inline bool phy_is_pseudo_fixed_link(struct phy_device *phydev) in phy_is_pseudo_fixed_link()
2128 int phy_save_page(struct phy_device *phydev);
2129 int phy_select_page(struct phy_device *phydev, int page);
2130 int phy_restore_page(struct phy_device *phydev, int oldpage, int ret);
2131 int phy_read_paged(struct phy_device *phydev, int page, u32 regnum);
2132 int phy_write_paged(struct phy_device *phydev, int page, u32 regnum, u16 val);
2133 int phy_modify_paged_changed(struct phy_device *phydev, int page, u32 regnum,
2135 int phy_modify_paged(struct phy_device *phydev, int page, u32 regnum,
2138 struct phy_device *phy_device_create(struct mii_bus *bus, int addr, u32 phy_id,
2143 struct phy_device *fwnode_phy_find_device(struct fwnode_handle *phy_fwnode);
2145 struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45);
2146 int phy_device_register(struct phy_device *phy);
2147 void phy_device_free(struct phy_device *phydev);
2148 void phy_device_remove(struct phy_device *phydev);
2149 int phy_get_c45_ids(struct phy_device *phydev);
2150 int phy_init_hw(struct phy_device *phydev);
2151 int phy_suspend(struct phy_device *phydev);
2152 int phy_resume(struct phy_device *phydev);
2153 int __phy_resume(struct phy_device *phydev);
2154 int phy_loopback(struct phy_device *phydev, bool enable, int speed);
2155 struct phy_device *phy_attach(struct net_device *dev, const char *bus_id,
2157 struct phy_device *phy_find_next(struct mii_bus *bus, struct phy_device *pos);
2158 int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
2160 int phy_connect_direct(struct net_device *dev, struct phy_device *phydev,
2163 struct phy_device *phy_connect(struct net_device *dev, const char *bus_id,
2166 void phy_disconnect(struct phy_device *phydev);
2167 void phy_detach(struct phy_device *phydev);
2168 void phy_start(struct phy_device *phydev);
2169 void phy_stop(struct phy_device *phydev);
2170 int phy_config_aneg(struct phy_device *phydev);
2171 int _phy_start_aneg(struct phy_device *phydev);
2172 int phy_start_aneg(struct phy_device *phydev);
2173 int phy_aneg_done(struct phy_device *phydev);
2174 unsigned int phy_inband_caps(struct phy_device *phydev,
2176 int phy_config_inband(struct phy_device *phydev, unsigned int modes);
2177 int phy_speed_down(struct phy_device *phydev, bool sync);
2178 int phy_speed_up(struct phy_device *phydev);
2181 int phy_restart_aneg(struct phy_device *phydev);
2182 int phy_reset_after_clk_enable(struct phy_device *phydev);
2184 static inline struct phy_device *phy_find_first(struct mii_bus *bus) in phy_find_first()
2194 int phy_start_cable_test(struct phy_device *phydev,
2196 int phy_start_cable_test_tdr(struct phy_device *phydev,
2201 int phy_start_cable_test(struct phy_device *phydev, in phy_start_cable_test()
2208 int phy_start_cable_test_tdr(struct phy_device *phydev, in phy_start_cable_test_tdr()
2217 static inline void phy_device_reset(struct phy_device *phydev, int value) in phy_device_reset()
2237 static inline const char *phydev_name(const struct phy_device *phydev) in phydev_name()
2242 static inline void phy_lock_mdio_bus(struct phy_device *phydev) in phy_lock_mdio_bus()
2247 static inline void phy_unlock_mdio_bus(struct phy_device *phydev) in phy_unlock_mdio_bus()
2252 void phy_attached_print(struct phy_device *phydev, const char *fmt, ...)
2254 char *phy_attached_info_irq(struct phy_device *phydev)
2256 void phy_attached_info(struct phy_device *phydev);
2258 int genphy_match_phy_device(struct phy_device *phydev,
2262 int genphy_read_abilities(struct phy_device *phydev);
2263 int genphy_setup_forced(struct phy_device *phydev);
2264 int genphy_restart_aneg(struct phy_device *phydev);
2265 int genphy_check_and_restart_aneg(struct phy_device *phydev, bool restart);
2266 int __genphy_config_aneg(struct phy_device *phydev, bool changed);
2267 int genphy_aneg_done(struct phy_device *phydev);
2268 int genphy_update_link(struct phy_device *phydev);
2269 int genphy_read_lpa(struct phy_device *phydev);
2270 int genphy_read_status_fixed(struct phy_device *phydev);
2271 int genphy_read_status(struct phy_device *phydev);
2272 int genphy_read_master_slave(struct phy_device *phydev);
2273 int genphy_suspend(struct phy_device *phydev);
2274 int genphy_resume(struct phy_device *phydev);
2275 int genphy_loopback(struct phy_device *phydev, bool enable, int speed);
2276 int genphy_soft_reset(struct phy_device *phydev);
2277 irqreturn_t genphy_handle_interrupt_no_ack(struct phy_device *phydev);
2279 static inline int genphy_config_aneg(struct phy_device *phydev) in genphy_config_aneg()
2284 static inline int genphy_no_config_intr(struct phy_device *phydev) in genphy_no_config_intr()
2288 int genphy_read_mmd_unsupported(struct phy_device *phdev, int devad,
2290 int genphy_write_mmd_unsupported(struct phy_device *phdev, int devnum,
2294 int genphy_c37_config_aneg(struct phy_device *phydev);
2295 int genphy_c37_read_status(struct phy_device *phydev, bool *changed);
2298 int genphy_c45_restart_aneg(struct phy_device *phydev);
2299 int genphy_c45_check_and_restart_aneg(struct phy_device *phydev, bool restart);
2300 int genphy_c45_aneg_done(struct phy_device *phydev);
2301 int genphy_c45_read_link(struct phy_device *phydev);
2302 int genphy_c45_read_lpa(struct phy_device *phydev);
2303 int genphy_c45_read_pma(struct phy_device *phydev);
2304 int genphy_c45_pma_setup_forced(struct phy_device *phydev);
2305 int genphy_c45_pma_baset1_setup_master_slave(struct phy_device *phydev);
2306 int genphy_c45_an_config_aneg(struct phy_device *phydev);
2307 int genphy_c45_an_disable_aneg(struct phy_device *phydev);
2308 int genphy_c45_read_mdix(struct phy_device *phydev);
2309 int genphy_c45_pma_read_abilities(struct phy_device *phydev);
2310 int genphy_c45_pma_read_ext_abilities(struct phy_device *phydev);
2311 int genphy_c45_pma_baset1_read_abilities(struct phy_device *phydev);
2312 int genphy_c45_read_eee_abilities(struct phy_device *phydev);
2313 int genphy_c45_pma_baset1_read_master_slave(struct phy_device *phydev);
2314 int genphy_c45_read_status(struct phy_device *phydev);
2315 int genphy_c45_baset1_read_status(struct phy_device *phydev);
2316 int genphy_c45_config_aneg(struct phy_device *phydev);
2317 int genphy_c45_loopback(struct phy_device *phydev, bool enable, int speed);
2318 int genphy_c45_pma_resume(struct phy_device *phydev);
2319 int genphy_c45_pma_suspend(struct phy_device *phydev);
2320 int genphy_c45_fast_retrain(struct phy_device *phydev, bool enable);
2321 int genphy_c45_plca_get_cfg(struct phy_device *phydev,
2323 int genphy_c45_plca_set_cfg(struct phy_device *phydev,
2325 int genphy_c45_plca_get_status(struct phy_device *phydev,
2327 int genphy_c45_eee_is_active(struct phy_device *phydev, unsigned long *lp);
2328 int genphy_c45_ethtool_get_eee(struct phy_device *phydev,
2330 int genphy_c45_ethtool_set_eee(struct phy_device *phydev,
2332 int genphy_c45_an_config_eee_aneg(struct phy_device *phydev);
2333 int genphy_c45_oatc14_cable_test_start(struct phy_device *phydev);
2334 int genphy_c45_oatc14_cable_test_get_status(struct phy_device *phydev,
2336 int genphy_c45_oatc14_get_sqi_max(struct phy_device *phydev);
2337 int genphy_c45_oatc14_get_sqi(struct phy_device *phydev);
2340 int gen10g_config_aneg(struct phy_device *phydev);
2342 static inline int phy_read_status(struct phy_device *phydev) in phy_read_status()
2356 void phy_error(struct phy_device *phydev);
2358 void phy_trigger_machine(struct phy_device *phydev);
2359 void phy_mac_interrupt(struct phy_device *phydev);
2360 void phy_start_machine(struct phy_device *phydev);
2361 void phy_stop_machine(struct phy_device *phydev);
2363 void phy_ethtool_ksettings_get(struct phy_device *phydev,
2365 int phy_ethtool_ksettings_set(struct phy_device *phydev,
2367 int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd);
2370 int phy_disable_interrupts(struct phy_device *phydev);
2371 void phy_request_interrupt(struct phy_device *phydev);
2372 void phy_free_interrupt(struct phy_device *phydev);
2373 void phy_print_status(struct phy_device *phydev);
2374 int phy_get_rate_matching(struct phy_device *phydev,
2376 void phy_set_max_speed(struct phy_device *phydev, u32 max_speed);
2377 void phy_remove_link_mode(struct phy_device *phydev, u32 link_mode);
2378 void phy_advertise_supported(struct phy_device *phydev);
2379 void phy_advertise_eee_all(struct phy_device *phydev);
2380 void phy_support_sym_pause(struct phy_device *phydev);
2381 void phy_support_asym_pause(struct phy_device *phydev);
2382 void phy_support_eee(struct phy_device *phydev);
2383 void phy_disable_eee(struct phy_device *phydev);
2384 void phy_set_sym_pause(struct phy_device *phydev, bool rx, bool tx,
2386 void phy_set_asym_pause(struct phy_device *phydev, bool rx, bool tx);
2387 bool phy_validate_pause(struct phy_device *phydev,
2389 void phy_get_pause(struct phy_device *phydev, bool *tx_pause, bool *rx_pause);
2391 s32 phy_get_internal_delay(struct phy_device *phydev, const int *delay_values,
2394 int phy_get_tx_amplitude_gain(struct phy_device *phydev, struct device *dev,
2398 int phy_get_mac_termination(struct phy_device *phydev, struct device *dev,
2405 int (*run)(struct phy_device *));
2407 int (*run)(struct phy_device *));
2409 int phy_eee_tx_clock_stop_capable(struct phy_device *phydev);
2410 int phy_eee_rx_clock_stop(struct phy_device *phydev, bool clk_stop_enable);
2411 int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable);
2412 int phy_get_eee_err(struct phy_device *phydev);
2413 int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_keee *data);
2414 int phy_ethtool_get_eee(struct phy_device *phydev, struct ethtool_keee *data);
2415 int phy_ethtool_set_wol(struct phy_device *phydev, struct ethtool_wolinfo *wol);
2416 void phy_ethtool_get_wol(struct phy_device *phydev,
2424 int phy_ethtool_get_strings(struct phy_device *phydev, u8 *data);
2425 int phy_ethtool_get_sset_count(struct phy_device *phydev);
2426 int phy_ethtool_get_stats(struct phy_device *phydev,
2429 void __phy_ethtool_get_phy_stats(struct phy_device *phydev,
2432 void __phy_ethtool_get_link_ext_stats(struct phy_device *phydev,
2435 int phy_ethtool_get_plca_cfg(struct phy_device *phydev,
2437 int phy_ethtool_set_plca_cfg(struct phy_device *phydev,
2440 int phy_ethtool_get_plca_status(struct phy_device *phydev,
2443 int __phy_hwtstamp_get(struct phy_device *phydev,
2445 int __phy_hwtstamp_set(struct phy_device *phydev,
2449 struct phy_port *phy_get_sfp_port(struct phy_device *phydev);