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()
79 aux_bus->aux_device_wrapper[1]->aux_dev.name = aux_dev_gpio_name; in gp_aux_bus_probe()
80 aux_bus->aux_device_wrapper[1]->aux_dev.dev.parent = &pdev->dev; in gp_aux_bus_probe()
81 aux_bus->aux_device_wrapper[1]->aux_dev.dev.release = gp_auxiliary_device_release; in gp_aux_bus_probe()
82 aux_bus->aux_device_wrapper[1]->aux_dev.id = retval; in gp_aux_bus_probe()
84 aux_bus->aux_device_wrapper[1]->gp_aux_data.region_start = pci_resource_start(pdev, 0); in gp_aux_bus_probe()
85 aux_bus->aux_device_wrapper[1]->gp_aux_data.region_length = pci_resource_end(pdev, 0); in gp_aux_bus_probe()
97 aux_bus->aux_device_wrapper[1]->gp_aux_data.irq_num = pdev->irq; in gp_aux_bus_probe()
99 retval = auxiliary_device_init(&aux_bus->aux_device_wrapper[1]->aux_dev); in gp_aux_bus_probe()
103 retval = auxiliary_device_add(&aux_bus->aux_device_wrapper[1]->aux_dev); in gp_aux_bus_probe()
107 pci_set_drvdata(pdev, aux_bus); in gp_aux_bus_probe()
113 auxiliary_device_uninit(&aux_bus->aux_device_wrapper[1]->aux_dev); in gp_aux_bus_probe()
116 ida_free(&gp_client_ida, aux_bus->aux_device_wrapper[1]->aux_dev.id); in gp_aux_bus_probe()
119 kfree(aux_bus->aux_device_wrapper[1]); in gp_aux_bus_probe()
122 auxiliary_device_uninit(&aux_bus->aux_device_wrapper[0]->aux_dev); in gp_aux_bus_probe()
125 ida_free(&gp_client_ida, aux_bus->aux_device_wrapper[0]->aux_dev.id); in gp_aux_bus_probe()
128 kfree(aux_bus->aux_device_wrapper[0]); in gp_aux_bus_probe()
135 struct aux_bus_device *aux_bus = pci_get_drvdata(pdev); in gp_aux_bus_remove() local
137 auxiliary_device_delete(&aux_bus->aux_device_wrapper[0]->aux_dev); in gp_aux_bus_remove()
138 auxiliary_device_uninit(&aux_bus->aux_device_wrapper[0]->aux_dev); in gp_aux_bus_remove()
139 auxiliary_device_delete(&aux_bus->aux_device_wrapper[1]->aux_dev); in gp_aux_bus_remove()
140 auxiliary_device_uninit(&aux_bus->aux_device_wrapper[1]->aux_dev); in gp_aux_bus_remove()