Lines Matching refs:pcdev

24 	struct pse_controller_dev *pcdev;  member
39 static int of_pse_zero_xlate(struct pse_controller_dev *pcdev, in of_pse_zero_xlate() argument
55 static int of_pse_simple_xlate(struct pse_controller_dev *pcdev, in of_pse_simple_xlate() argument
58 if (pse_spec->args[0] >= pcdev->nr_lines) in of_pse_simple_xlate()
68 int pse_controller_register(struct pse_controller_dev *pcdev) in pse_controller_register() argument
70 if (!pcdev->of_xlate) { in pse_controller_register()
71 if (pcdev->of_pse_n_cells == 0) in pse_controller_register()
72 pcdev->of_xlate = of_pse_zero_xlate; in pse_controller_register()
73 else if (pcdev->of_pse_n_cells == 1) in pse_controller_register()
74 pcdev->of_xlate = of_pse_simple_xlate; in pse_controller_register()
77 mutex_init(&pcdev->lock); in pse_controller_register()
78 INIT_LIST_HEAD(&pcdev->pse_control_head); in pse_controller_register()
81 list_add(&pcdev->list, &pse_controller_list); in pse_controller_register()
92 void pse_controller_unregister(struct pse_controller_dev *pcdev) in pse_controller_unregister() argument
95 list_del(&pcdev->list); in pse_controller_unregister()
115 struct pse_controller_dev *pcdev) in devm_pse_controller_register() argument
125 ret = pse_controller_register(pcdev); in devm_pse_controller_register()
131 *pcdevp = pcdev; in devm_pse_controller_register()
147 module_put(psec->pcdev->owner); in __pse_control_release()
176 pse_control_get_internal(struct pse_controller_dev *pcdev, unsigned int index) in pse_control_get_internal() argument
182 list_for_each_entry(psec, &pcdev->pse_control_head, list) { in pse_control_get_internal()
193 if (!try_module_get(pcdev->owner)) { in pse_control_get_internal()
198 psec->pcdev = pcdev; in pse_control_get_internal()
199 list_add(&psec->list, &pcdev->pse_control_head); in pse_control_get_internal()
209 struct pse_controller_dev *r, *pcdev; in of_pse_control_get() local
223 pcdev = NULL; in of_pse_control_get()
226 pcdev = r; in of_pse_control_get()
231 if (!pcdev) { in of_pse_control_get()
236 if (WARN_ON(args.args_count != pcdev->of_pse_n_cells)) { in of_pse_control_get()
241 psec_id = pcdev->of_xlate(pcdev, &args); in of_pse_control_get()
248 psec = pse_control_get_internal(pcdev, psec_id); in of_pse_control_get()
271 ops = psec->pcdev->ops; in pse_ethtool_get_status()
279 mutex_lock(&psec->pcdev->lock); in pse_ethtool_get_status()
280 err = ops->ethtool_get_status(psec->pcdev, psec->id, extack, status); in pse_ethtool_get_status()
281 mutex_unlock(&psec->pcdev->lock); in pse_ethtool_get_status()
300 ops = psec->pcdev->ops; in pse_ethtool_set_config()
308 mutex_lock(&psec->pcdev->lock); in pse_ethtool_set_config()
309 err = ops->ethtool_set_config(psec->pcdev, psec->id, extack, config); in pse_ethtool_set_config()
310 mutex_unlock(&psec->pcdev->lock); in pse_ethtool_set_config()