Lines Matching refs:drv

34 void register_switch_driver(struct dsa_switch_driver *drv)  in register_switch_driver()  argument
37 list_add_tail(&drv->list, &dsa_switch_drivers); in register_switch_driver()
42 void unregister_switch_driver(struct dsa_switch_driver *drv) in unregister_switch_driver() argument
45 list_del_init(&drv->list); in unregister_switch_driver()
62 struct dsa_switch_driver *drv; in dsa_switch_probe() local
64 drv = list_entry(list, struct dsa_switch_driver, list); in dsa_switch_probe()
66 name = drv->probe(host_dev, sw_addr); in dsa_switch_probe()
68 ret = drv; in dsa_switch_probe()
89 ret = ds->drv->get_temp(ds, &temp); in temp1_input_show()
103 ret = ds->drv->get_temp_limit(ds, &temp); in temp1_max_show()
121 ret = ds->drv->set_temp_limit(ds, DIV_ROUND_CLOSEST(temp, 1000)); in temp1_max_store()
136 ret = ds->drv->get_temp_alarm(ds, &alarm); in temp1_max_alarm_show()
156 struct dsa_switch_driver *drv = ds->drv; in dsa_hwmon_attrs_visible() local
160 if (!drv->get_temp_limit) in dsa_hwmon_attrs_visible()
162 else if (!drv->set_temp_limit) in dsa_hwmon_attrs_visible()
164 } else if (index == 2 && !drv->get_temp_alarm) { in dsa_hwmon_attrs_visible()
181 struct dsa_switch_driver *drv = ds->drv; in dsa_switch_setup_one() local
265 ret = drv->setup(ds); in dsa_switch_setup_one()
269 ret = drv->set_addr(ds, dst->master_netdev->dev_addr); in dsa_switch_setup_one()
305 if (drv->get_temp) { in dsa_switch_setup_one()
339 struct dsa_switch_driver *drv; in dsa_switch_setup() local
347 drv = dsa_switch_probe(host_dev, pd->sw_addr, &name); in dsa_switch_setup()
348 if (drv == NULL) { in dsa_switch_setup()
360 ds = kzalloc(sizeof(*ds) + drv->priv_size, GFP_KERNEL); in dsa_switch_setup()
367 ds->drv = drv; in dsa_switch_setup()
368 ds->tag_protocol = drv->tag_protocol; in dsa_switch_setup()
401 if (ds->drv->suspend) in dsa_switch_suspend()
402 ret = ds->drv->suspend(ds); in dsa_switch_suspend()
411 if (ds->drv->resume) in dsa_switch_resume()
412 ret = ds->drv->resume(ds); in dsa_switch_resume()
443 if (ds != NULL && ds->drv->poll_link != NULL) in dsa_link_poll_work()
444 ds->drv->poll_link(ds); in dsa_link_poll_work()
726 if (ds->drv->poll_link != NULL) in dsa_setup_dst()