Lines Matching refs:aux_bus

34 	struct aux_bus_device *aux_bus;  in gp_aux_bus_probe()  local
41 aux_bus = devm_kzalloc(&pdev->dev, sizeof(*aux_bus), GFP_KERNEL); in gp_aux_bus_probe()
42 if (!aux_bus) in gp_aux_bus_probe()
45 aux_bus->aux_device_wrapper[0] = kzalloc(sizeof(*aux_bus->aux_device_wrapper[0]), in gp_aux_bus_probe()
47 if (!aux_bus->aux_device_wrapper[0]) in gp_aux_bus_probe()
54 aux_bus->aux_device_wrapper[0]->aux_dev.name = aux_dev_otp_e2p_name; in gp_aux_bus_probe()
55 aux_bus->aux_device_wrapper[0]->aux_dev.dev.parent = &pdev->dev; in gp_aux_bus_probe()
56 aux_bus->aux_device_wrapper[0]->aux_dev.dev.release = gp_auxiliary_device_release; in gp_aux_bus_probe()
57 aux_bus->aux_device_wrapper[0]->aux_dev.id = retval; in gp_aux_bus_probe()
59 aux_bus->aux_device_wrapper[0]->gp_aux_data.region_start = pci_resource_start(pdev, 0); in gp_aux_bus_probe()
60 aux_bus->aux_device_wrapper[0]->gp_aux_data.region_length = pci_resource_end(pdev, 0); in gp_aux_bus_probe()
62 retval = auxiliary_device_init(&aux_bus->aux_device_wrapper[0]->aux_dev); in gp_aux_bus_probe()
66 retval = auxiliary_device_add(&aux_bus->aux_device_wrapper[0]->aux_dev); in gp_aux_bus_probe()
70 aux_bus->aux_device_wrapper[1] = kzalloc(sizeof(*aux_bus->aux_device_wrapper[1]), in gp_aux_bus_probe()
72 if (!aux_bus->aux_device_wrapper[1]) { in gp_aux_bus_probe()
81 aux_bus->aux_device_wrapper[1]->aux_dev.name = aux_dev_gpio_name; in gp_aux_bus_probe()
82 aux_bus->aux_device_wrapper[1]->aux_dev.dev.parent = &pdev->dev; in gp_aux_bus_probe()
83 aux_bus->aux_device_wrapper[1]->aux_dev.dev.release = gp_auxiliary_device_release; in gp_aux_bus_probe()
84 aux_bus->aux_device_wrapper[1]->aux_dev.id = retval; in gp_aux_bus_probe()
86 aux_bus->aux_device_wrapper[1]->gp_aux_data.region_start = pci_resource_start(pdev, 0); in gp_aux_bus_probe()
87 aux_bus->aux_device_wrapper[1]->gp_aux_data.region_length = pci_resource_end(pdev, 0); in gp_aux_bus_probe()
99 aux_bus->aux_device_wrapper[1]->gp_aux_data.irq_num = pdev->irq; in gp_aux_bus_probe()
101 retval = auxiliary_device_init(&aux_bus->aux_device_wrapper[1]->aux_dev); in gp_aux_bus_probe()
105 retval = auxiliary_device_add(&aux_bus->aux_device_wrapper[1]->aux_dev); in gp_aux_bus_probe()
109 pci_set_drvdata(pdev, aux_bus); in gp_aux_bus_probe()
115 auxiliary_device_uninit(&aux_bus->aux_device_wrapper[1]->aux_dev); in gp_aux_bus_probe()
119 ida_free(&gp_client_ida, aux_bus->aux_device_wrapper[1]->aux_dev.id); in gp_aux_bus_probe()
122 kfree(aux_bus->aux_device_wrapper[1]); in gp_aux_bus_probe()
125 auxiliary_device_uninit(&aux_bus->aux_device_wrapper[0]->aux_dev); in gp_aux_bus_probe()
129 ida_free(&gp_client_ida, aux_bus->aux_device_wrapper[0]->aux_dev.id); in gp_aux_bus_probe()
132 kfree(aux_bus->aux_device_wrapper[0]); in gp_aux_bus_probe()
140 struct aux_bus_device *aux_bus = pci_get_drvdata(pdev); in gp_aux_bus_remove() local
142 auxiliary_device_delete(&aux_bus->aux_device_wrapper[0]->aux_dev); in gp_aux_bus_remove()
143 auxiliary_device_uninit(&aux_bus->aux_device_wrapper[0]->aux_dev); in gp_aux_bus_remove()
144 auxiliary_device_delete(&aux_bus->aux_device_wrapper[1]->aux_dev); in gp_aux_bus_remove()
145 auxiliary_device_uninit(&aux_bus->aux_device_wrapper[1]->aux_dev); in gp_aux_bus_remove()