Lines Matching refs:drv
35 void register_switch_driver(struct dsa_switch_driver *drv) in register_switch_driver() argument
38 list_add_tail(&drv->list, &dsa_switch_drivers); in register_switch_driver()
43 void unregister_switch_driver(struct dsa_switch_driver *drv) in unregister_switch_driver() argument
46 list_del_init(&drv->list); in unregister_switch_driver()
63 struct dsa_switch_driver *drv; in dsa_switch_probe() local
65 drv = list_entry(list, struct dsa_switch_driver, list); in dsa_switch_probe()
67 name = drv->probe(host_dev, sw_addr); in dsa_switch_probe()
69 ret = drv; in dsa_switch_probe()
90 ret = ds->drv->get_temp(ds, &temp); in temp1_input_show()
104 ret = ds->drv->get_temp_limit(ds, &temp); in temp1_max_show()
122 ret = ds->drv->set_temp_limit(ds, DIV_ROUND_CLOSEST(temp, 1000)); in temp1_max_store()
137 ret = ds->drv->get_temp_alarm(ds, &alarm); in temp1_max_alarm_show()
157 struct dsa_switch_driver *drv = ds->drv; in dsa_hwmon_attrs_visible() local
161 if (!drv->get_temp_limit) in dsa_hwmon_attrs_visible()
163 else if (!drv->set_temp_limit) in dsa_hwmon_attrs_visible()
165 } else if (index == 2 && !drv->get_temp_alarm) { in dsa_hwmon_attrs_visible()
208 if (ds->drv->adjust_link) in dsa_cpu_dsa_setup()
209 ds->drv->adjust_link(ds, port, phydev); in dsa_cpu_dsa_setup()
217 struct dsa_switch_driver *drv = ds->drv; in dsa_switch_setup_one() local
301 ret = drv->setup(ds); in dsa_switch_setup_one()
305 ret = drv->set_addr(ds, dst->master_netdev->dev_addr); in dsa_switch_setup_one()
349 if (drv->get_temp) { in dsa_switch_setup_one()
380 struct dsa_switch_driver *drv; in dsa_switch_setup() local
388 drv = dsa_switch_probe(host_dev, pd->sw_addr, &name); in dsa_switch_setup()
389 if (drv == NULL) { in dsa_switch_setup()
401 ds = devm_kzalloc(parent, sizeof(*ds) + drv->priv_size, GFP_KERNEL); in dsa_switch_setup()
408 ds->drv = drv; in dsa_switch_setup()
409 ds->tag_protocol = drv->tag_protocol; in dsa_switch_setup()
479 if (ds->drv->suspend) in dsa_switch_suspend()
480 ret = ds->drv->suspend(ds); in dsa_switch_suspend()
489 if (ds->drv->resume) in dsa_switch_resume()
490 ret = ds->drv->resume(ds); in dsa_switch_resume()
521 if (ds != NULL && ds->drv->poll_link != NULL) in dsa_link_poll_work()
522 ds->drv->poll_link(ds); in dsa_link_poll_work()
862 if (ds->drv->poll_link != NULL) in dsa_setup_dst()