Lines Matching refs:ctrl
85 static int init_slot(struct controller *ctrl) in init_slot() argument
87 struct slot *slot = ctrl->slot; in init_slot()
112 if (MRL_SENS(ctrl)) in init_slot()
114 if (ATTN_LED(ctrl)) { in init_slot()
125 snprintf(name, SLOT_NAME_SIZE, "%u", PSN(ctrl)); in init_slot()
128 ctrl->pcie->port->subordinate, 0, name); in init_slot()
130 ctrl_err(ctrl, "pci_hp_register failed: error %d\n", retval); in init_slot()
140 static void cleanup_slot(struct controller *ctrl) in cleanup_slot() argument
142 pci_hp_deregister(ctrl->slot->hotplug_slot); in cleanup_slot()
214 struct controller *ctrl; in pciehp_probe() local
229 ctrl = pcie_init(dev); in pciehp_probe()
230 if (!ctrl) { in pciehp_probe()
234 set_service_data(dev, ctrl); in pciehp_probe()
237 rc = init_slot(ctrl); in pciehp_probe()
240 ctrl_warn(ctrl, "Slot already registered by another hotplug driver\n"); in pciehp_probe()
242 ctrl_err(ctrl, "Slot initialization failed (%d)\n", rc); in pciehp_probe()
247 rc = pcie_init_notification(ctrl); in pciehp_probe()
249 ctrl_err(ctrl, "Notification initialization failed (%d)\n", rc); in pciehp_probe()
254 slot = ctrl->slot; in pciehp_probe()
263 if (!occupied && poweron && POWER_CTRL(ctrl)) in pciehp_probe()
269 cleanup_slot(ctrl); in pciehp_probe()
271 pciehp_release_ctrl(ctrl); in pciehp_probe()
277 struct controller *ctrl = get_service_data(dev); in pciehp_remove() local
279 cleanup_slot(ctrl); in pciehp_remove()
280 pciehp_release_ctrl(ctrl); in pciehp_remove()
291 struct controller *ctrl; in pciehp_resume() local
295 ctrl = get_service_data(dev); in pciehp_resume()
298 pcie_enable_notification(ctrl); in pciehp_resume()
300 slot = ctrl->slot; in pciehp_resume()