18c2ecf20Sopenharmony_ci#ifndef SFP_H 28c2ecf20Sopenharmony_ci#define SFP_H 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci#include <linux/ethtool.h> 58c2ecf20Sopenharmony_ci#include <linux/sfp.h> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_cistruct sfp; 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_cistruct sfp_socket_ops { 108c2ecf20Sopenharmony_ci void (*attach)(struct sfp *sfp); 118c2ecf20Sopenharmony_ci void (*detach)(struct sfp *sfp); 128c2ecf20Sopenharmony_ci void (*start)(struct sfp *sfp); 138c2ecf20Sopenharmony_ci void (*stop)(struct sfp *sfp); 148c2ecf20Sopenharmony_ci int (*module_info)(struct sfp *sfp, struct ethtool_modinfo *modinfo); 158c2ecf20Sopenharmony_ci int (*module_eeprom)(struct sfp *sfp, struct ethtool_eeprom *ee, 168c2ecf20Sopenharmony_ci u8 *data); 178c2ecf20Sopenharmony_ci}; 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ciint sfp_add_phy(struct sfp_bus *bus, struct phy_device *phydev); 208c2ecf20Sopenharmony_civoid sfp_remove_phy(struct sfp_bus *bus); 218c2ecf20Sopenharmony_civoid sfp_link_up(struct sfp_bus *bus); 228c2ecf20Sopenharmony_civoid sfp_link_down(struct sfp_bus *bus); 238c2ecf20Sopenharmony_ciint sfp_module_insert(struct sfp_bus *bus, const struct sfp_eeprom_id *id); 248c2ecf20Sopenharmony_civoid sfp_module_remove(struct sfp_bus *bus); 258c2ecf20Sopenharmony_ciint sfp_module_start(struct sfp_bus *bus); 268c2ecf20Sopenharmony_civoid sfp_module_stop(struct sfp_bus *bus); 278c2ecf20Sopenharmony_ciint sfp_link_configure(struct sfp_bus *bus, const struct sfp_eeprom_id *id); 288c2ecf20Sopenharmony_cistruct sfp_bus *sfp_register_socket(struct device *dev, struct sfp *sfp, 298c2ecf20Sopenharmony_ci const struct sfp_socket_ops *ops); 308c2ecf20Sopenharmony_civoid sfp_unregister_socket(struct sfp_bus *bus); 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci#endif 33