Lines Matching refs:pci

144 static int snd_acp6x_probe(struct pci_dev *pci,  in snd_acp6x_probe()  argument
158 flag = snd_amd_acp_find_config(pci); in snd_acp6x_probe()
163 switch (pci->revision) { in snd_acp6x_probe()
168 dev_dbg(&pci->dev, "acp6x pci device not found\n"); in snd_acp6x_probe()
171 if (pci_enable_device(pci)) { in snd_acp6x_probe()
172 dev_err(&pci->dev, "pci_enable_device failed\n"); in snd_acp6x_probe()
176 ret = pci_request_regions(pci, "AMD ACP3x audio"); in snd_acp6x_probe()
178 dev_err(&pci->dev, "pci_request_regions failed\n"); in snd_acp6x_probe()
182 adata = devm_kzalloc(&pci->dev, sizeof(struct acp6x_dev_data), in snd_acp6x_probe()
189 addr = pci_resource_start(pci, 0); in snd_acp6x_probe()
190 adata->acp6x_base = devm_ioremap(&pci->dev, addr, in snd_acp6x_probe()
191 pci_resource_len(pci, 0)); in snd_acp6x_probe()
196 pci_set_master(pci); in snd_acp6x_probe()
197 pci_set_drvdata(pci, adata); in snd_acp6x_probe()
209 dev_info(&pci->dev, "Audio Mode %d\n", val); in snd_acp6x_probe()
212 adata->res = devm_kzalloc(&pci->dev, in snd_acp6x_probe()
230 pdevinfo[0].parent = &pci->dev; in snd_acp6x_probe()
236 pdevinfo[1].parent = &pci->dev; in snd_acp6x_probe()
240 pdevinfo[2].parent = &pci->dev; in snd_acp6x_probe()
246 dev_err(&pci->dev, "cannot register %s device\n", in snd_acp6x_probe()
254 ret = devm_request_irq(&pci->dev, pci->irq, acp6x_irq_handler, in snd_acp6x_probe()
257 dev_err(&pci->dev, "ACP PCI IRQ request failed\n"); in snd_acp6x_probe()
260 pm_runtime_set_autosuspend_delay(&pci->dev, ACP_SUSPEND_DELAY_MS); in snd_acp6x_probe()
261 pm_runtime_use_autosuspend(&pci->dev); in snd_acp6x_probe()
262 pm_runtime_put_noidle(&pci->dev); in snd_acp6x_probe()
263 pm_runtime_allow(&pci->dev); in snd_acp6x_probe()
271 dev_err(&pci->dev, "ACP de-init failed\n"); in snd_acp6x_probe()
273 pci_release_regions(pci); in snd_acp6x_probe()
275 pci_disable_device(pci); in snd_acp6x_probe()
309 static void snd_acp6x_remove(struct pci_dev *pci) in snd_acp6x_remove() argument
314 adata = pci_get_drvdata(pci); in snd_acp6x_remove()
321 dev_err(&pci->dev, "ACP de-init failed\n"); in snd_acp6x_remove()
322 pm_runtime_forbid(&pci->dev); in snd_acp6x_remove()
323 pm_runtime_get_noresume(&pci->dev); in snd_acp6x_remove()
324 pci_release_regions(pci); in snd_acp6x_remove()
325 pci_disable_device(pci); in snd_acp6x_remove()
334 MODULE_DEVICE_TABLE(pci, snd_acp6x_ids);