Lines Matching defs:sfp
229 struct sfp { struct
233 struct sfp_bus *sfp_bus; argument
240 unsigned int (*get_state)(struct sfp *); argument
241 void (*set_state)(struct sfp *, unsigned int); argument
242 int (*read)(struct sfp *, bool, u8, void *, size_t); argument
243 int (*write)(struct sfp *, bool, u8, void *, size_t); argument
245 struct gpio_desc *gpio[GPIO_MAX];
246 int gpio_irq[GPIO_MAX];
248 bool need_poll;
274 struct sfp_eeprom_id id; argument
286 const struct sfp_quirk *quirk; argument
289 struct sfp_diag diag; argument
301 static bool sff_module_supported(const struct sfp_eeprom_id *id) in sff_module_supported() argument
344 static void sfp_fixup_long_startup(struct sfp *sfp) in sfp_fixup_long_startup()
349 static void sfp_fixup_ignore_los(struct sfp *sfp) in sfp_fixup_ignore_los()
358 static void sfp_fixup_ignore_tx_fault(struct sfp *sfp) in sfp_fixup_ignore_tx_fault()
363 static void sfp_fixup_nokia(struct sfp *sfp) in sfp_fixup_nokia()
370 static void sfp_fixup_10gbaset_30m(struct sfp *sfp) in sfp_fixup_10gbaset_30m()
376 static void sfp_fixup_rollball(struct sfp *sfp) in sfp_fixup_rollball()
388 static void sfp_fixup_rollball_wait4s(struct sfp *sfp) in sfp_fixup_rollball_wait4s()
399 static void sfp_fixup_fs_10gt(struct sfp *sfp) in sfp_fixup_fs_10gt()
405 static void sfp_fixup_halny_gsfp(struct sfp *sfp) in sfp_fixup_halny_gsfp()
414 static void sfp_fixup_rollball_cc(struct sfp *sfp) in sfp_fixup_rollball_cc()
570 static unsigned int sfp_gpio_get_state(struct sfp *sfp) in sfp_gpio_get_state()
586 static unsigned int sff_gpio_get_state(struct sfp *sfp) in sff_gpio_get_state()
591 static void sfp_gpio_set_state(struct sfp *sfp, unsigned int state) in sfp_gpio_set_state()
627 static int sfp_i2c_read(struct sfp *sfp, bool a2, u8 dev_addr, void *buf, in sfp_i2c_read()
667 static int sfp_i2c_write(struct sfp *sfp, bool a2, u8 dev_addr, void *buf, in sfp_i2c_write()
694 static int sfp_i2c_configure(struct sfp *sfp, struct i2c_adapter *i2c) in sfp_i2c_configure()
706 static int sfp_i2c_mdiobus_create(struct sfp *sfp) in sfp_i2c_mdiobus_create()
729 static void sfp_i2c_mdiobus_destroy(struct sfp *sfp) in sfp_i2c_mdiobus_destroy()
736 static int sfp_read(struct sfp *sfp, bool a2, u8 addr, void *buf, size_t len) in sfp_read()
741 static int sfp_write(struct sfp *sfp, bool a2, u8 addr, void *buf, size_t len) in sfp_write()
746 static int sfp_modify_u8(struct sfp *sfp, bool a2, u8 addr, u8 mask, u8 val) in sfp_modify_u8()
762 static unsigned int sfp_soft_get_state(struct sfp *sfp) in sfp_soft_get_state()
785 static void sfp_soft_set_state(struct sfp *sfp, unsigned int state, in sfp_soft_set_state()
814 static void sfp_soft_start_poll(struct sfp *sfp) in sfp_soft_start_poll()
839 static void sfp_soft_stop_poll(struct sfp *sfp) in sfp_soft_stop_poll()
849 static unsigned int sfp_get_state(struct sfp *sfp) in sfp_get_state()
864 static void sfp_set_state(struct sfp *sfp, unsigned int state) in sfp_set_state()
875 static void sfp_mod_state(struct sfp *sfp, unsigned int mask, unsigned int set) in sfp_mod_state()
899 const struct sfp *sfp = data; in sfp_hwmon_is_visible() local
992 static int sfp_hwmon_read_sensor(struct sfp *sfp, int reg, long *value) in sfp_hwmon_read_sensor()
1011 static void sfp_hwmon_calibrate(struct sfp *sfp, unsigned int slope, int offset, in sfp_hwmon_calibrate()
1018 static void sfp_hwmon_calibrate_temp(struct sfp *sfp, long *value) in sfp_hwmon_calibrate_temp()
1029 static void sfp_hwmon_calibrate_vcc(struct sfp *sfp, long *value) in sfp_hwmon_calibrate_vcc()
1037 static void sfp_hwmon_calibrate_bias(struct sfp *sfp, long *value) in sfp_hwmon_calibrate_bias()
1045 static void sfp_hwmon_calibrate_tx_power(struct sfp *sfp, long *value) in sfp_hwmon_calibrate_tx_power()
1053 static int sfp_hwmon_read_temp(struct sfp *sfp, int reg, long *value) in sfp_hwmon_read_temp()
1066 static int sfp_hwmon_read_vcc(struct sfp *sfp, int reg, long *value) in sfp_hwmon_read_vcc()
1079 static int sfp_hwmon_read_bias(struct sfp *sfp, int reg, long *value) in sfp_hwmon_read_bias()
1092 static int sfp_hwmon_read_tx_power(struct sfp *sfp, int reg, long *value) in sfp_hwmon_read_tx_power()
1105 static int sfp_hwmon_read_rx_power(struct sfp *sfp, int reg, long *value) in sfp_hwmon_read_rx_power()
1118 static int sfp_hwmon_temp(struct sfp *sfp, u32 attr, long *value) in sfp_hwmon_temp()
1184 static int sfp_hwmon_vcc(struct sfp *sfp, u32 attr, long *value) in sfp_hwmon_vcc()
1251 static int sfp_hwmon_bias(struct sfp *sfp, u32 attr, long *value) in sfp_hwmon_bias()
1318 static int sfp_hwmon_tx_power(struct sfp *sfp, u32 attr, long *value) in sfp_hwmon_tx_power()
1385 static int sfp_hwmon_rx_power(struct sfp *sfp, u32 attr, long *value) in sfp_hwmon_rx_power()
1455 struct sfp *sfp = dev_get_drvdata(dev); in sfp_hwmon_read() local
1586 struct sfp *sfp = container_of(work, struct sfp, hwmon_probe.work); in sfp_hwmon_probe() local
1630 static int sfp_hwmon_insert(struct sfp *sfp) in sfp_hwmon_insert()
1640 static void sfp_hwmon_remove(struct sfp *sfp) in sfp_hwmon_remove()
1650 static int sfp_hwmon_init(struct sfp *sfp) in sfp_hwmon_init()
1657 static void sfp_hwmon_exit(struct sfp *sfp) in sfp_hwmon_exit()
1662 static int sfp_hwmon_insert(struct sfp *sfp) in sfp_hwmon_insert()
1667 static void sfp_hwmon_remove(struct sfp *sfp) in sfp_hwmon_remove()
1671 static int sfp_hwmon_init(struct sfp *sfp) in sfp_hwmon_init()
1676 static void sfp_hwmon_exit(struct sfp *sfp) in sfp_hwmon_exit()
1682 static void sfp_module_tx_disable(struct sfp *sfp) in sfp_module_tx_disable()
1689 static void sfp_module_tx_enable(struct sfp *sfp) in sfp_module_tx_enable()
1699 struct sfp *sfp = s->private; in sfp_debug_state_show() local
1727 static void sfp_debugfs_init(struct sfp *sfp) in sfp_debugfs_init()
1735 static void sfp_debugfs_exit(struct sfp *sfp) in sfp_debugfs_exit()
1740 static void sfp_debugfs_init(struct sfp *sfp) in sfp_debugfs_init()
1744 static void sfp_debugfs_exit(struct sfp *sfp) in sfp_debugfs_exit()
1749 static void sfp_module_tx_fault_reset(struct sfp *sfp) in sfp_module_tx_fault_reset()
1766 static void sfp_sm_set_timer(struct sfp *sfp, unsigned int timeout) in sfp_sm_set_timer()
1775 static void sfp_sm_next(struct sfp *sfp, unsigned int state, in sfp_sm_next()
1782 static void sfp_sm_mod_next(struct sfp *sfp, unsigned int state, in sfp_sm_mod_next()
1789 static void sfp_sm_phy_detach(struct sfp *sfp) in sfp_sm_phy_detach()
1797 static int sfp_sm_probe_phy(struct sfp *sfp, int addr, bool is_c45) in sfp_sm_probe_phy()
1834 static void sfp_sm_link_up(struct sfp *sfp) in sfp_sm_link_up()
1840 static void sfp_sm_link_down(struct sfp *sfp) in sfp_sm_link_down()
1845 static void sfp_sm_link_check_los(struct sfp *sfp) in sfp_sm_link_check_los()
1867 static bool sfp_los_event_active(struct sfp *sfp, unsigned int event) in sfp_los_event_active()
1877 static bool sfp_los_event_inactive(struct sfp *sfp, unsigned int event) in sfp_los_event_inactive()
1887 static void sfp_sm_fault(struct sfp *sfp, unsigned int next_state, bool warn) in sfp_sm_fault()
1901 static int sfp_sm_add_mdio_bus(struct sfp *sfp) in sfp_sm_add_mdio_bus()
1920 static int sfp_sm_probe_for_phy(struct sfp *sfp) in sfp_sm_probe_for_phy()
1944 static int sfp_module_parse_power(struct sfp *sfp) in sfp_module_parse_power()
2010 static int sfp_sm_mod_hpower(struct sfp *sfp, bool enable) in sfp_sm_mod_hpower()
2031 static void sfp_module_parse_rate_select(struct sfp *sfp) in sfp_module_parse_rate_select()
2131 static bool sfp_id_needs_byte_io(struct sfp *sfp, void *buf, size_t len) in sfp_id_needs_byte_io()
2146 static int sfp_cotsworks_fixup_check(struct sfp *sfp, struct sfp_eeprom_id *id) in sfp_cotsworks_fixup_check()
2182 static int sfp_module_parse_sff8472(struct sfp *sfp) in sfp_module_parse_sff8472()
2194 static int sfp_sm_mod_probe(struct sfp *sfp, bool report) in sfp_sm_mod_probe()
2387 static void sfp_sm_mod_remove(struct sfp *sfp) in sfp_sm_mod_remove()
2403 static void sfp_sm_device(struct sfp *sfp, unsigned int event) in sfp_sm_device()
2430 static void sfp_sm_module(struct sfp *sfp, unsigned int event) in sfp_sm_module()
2546 static void sfp_sm_main(struct sfp *sfp, unsigned int event) in sfp_sm_main()
2720 static void __sfp_sm_event(struct sfp *sfp, unsigned int event) in __sfp_sm_event()
2738 static void sfp_sm_event(struct sfp *sfp, unsigned int event) in sfp_sm_event()
2745 static void sfp_attach(struct sfp *sfp) in sfp_attach()
2750 static void sfp_detach(struct sfp *sfp) in sfp_detach()
2755 static void sfp_start(struct sfp *sfp) in sfp_start()
2760 static void sfp_stop(struct sfp *sfp) in sfp_stop()
2765 static void sfp_set_signal_rate(struct sfp *sfp, unsigned int rate_kbd) in sfp_set_signal_rate()
2779 static int sfp_module_info(struct sfp *sfp, struct ethtool_modinfo *modinfo) in sfp_module_info()
2794 static int sfp_module_eeprom(struct sfp *sfp, struct ethtool_eeprom *ee, in sfp_module_eeprom()
2831 static int sfp_module_eeprom_by_page(struct sfp *sfp, in sfp_module_eeprom_by_page()
2871 struct sfp *sfp = container_of(work, struct sfp, timeout.work); in sfp_timeout() local
2878 static void sfp_check_state(struct sfp *sfp) in sfp_check_state()
2915 struct sfp *sfp = data; in sfp_irq() local
2924 struct sfp *sfp = container_of(work, struct sfp, poll.work); in sfp_poll() local
2937 struct sfp *sfp; in sfp_alloc() local
2958 struct sfp *sfp = data; in sfp_cleanup() local
2973 static int sfp_i2c_get(struct sfp *sfp) in sfp_i2c_get()
3003 struct sfp *sfp; in sfp_probe() local
3125 struct sfp *sfp = platform_get_drvdata(pdev); in sfp_remove() local
3137 struct sfp *sfp = platform_get_drvdata(pdev); in sfp_shutdown() local