Lines Matching refs:pci
205 static int snd_rn_acp_probe(struct pci_dev *pci, in snd_rn_acp_probe() argument
220 flag = snd_amd_acp_find_config(pci); in snd_rn_acp_probe()
225 if (pci->revision != 0x01) in snd_rn_acp_probe()
228 if (pci_enable_device(pci)) { in snd_rn_acp_probe()
229 dev_err(&pci->dev, "pci_enable_device failed\n"); in snd_rn_acp_probe()
233 ret = pci_request_regions(pci, "AMD ACP3x audio"); in snd_rn_acp_probe()
235 dev_err(&pci->dev, "pci_request_regions failed\n"); in snd_rn_acp_probe()
239 adata = devm_kzalloc(&pci->dev, sizeof(struct acp_dev_data), in snd_rn_acp_probe()
247 ret = pci_enable_msi(pci); in snd_rn_acp_probe()
255 addr = pci_resource_start(pci, 0); in snd_rn_acp_probe()
256 adata->acp_base = devm_ioremap(&pci->dev, addr, in snd_rn_acp_probe()
257 pci_resource_len(pci, 0)); in snd_rn_acp_probe()
262 pci_set_master(pci); in snd_rn_acp_probe()
263 pci_set_drvdata(pci, adata); in snd_rn_acp_probe()
273 handle = ACPI_HANDLE(&pci->dev); in snd_rn_acp_probe()
286 dev_info(&pci->dev, "ACPI settings override using DMI (ACP mic is not present)"); in snd_rn_acp_probe()
292 adata->res = devm_kzalloc(&pci->dev, in snd_rn_acp_probe()
306 adata->res[1].start = pci->irq; in snd_rn_acp_probe()
307 adata->res[1].end = pci->irq; in snd_rn_acp_probe()
312 pdevinfo[0].parent = &pci->dev; in snd_rn_acp_probe()
320 pdevinfo[1].parent = &pci->dev; in snd_rn_acp_probe()
323 pdevinfo[2].parent = &pci->dev; in snd_rn_acp_probe()
328 dev_err(&pci->dev, "cannot register %s device\n", in snd_rn_acp_probe()
334 pm_runtime_set_autosuspend_delay(&pci->dev, ACP_SUSPEND_DELAY_MS); in snd_rn_acp_probe()
335 pm_runtime_use_autosuspend(&pci->dev); in snd_rn_acp_probe()
336 pm_runtime_put_noidle(&pci->dev); in snd_rn_acp_probe()
337 pm_runtime_allow(&pci->dev); in snd_rn_acp_probe()
345 dev_err(&pci->dev, "ACP de-init failed\n"); in snd_rn_acp_probe()
347 pci_disable_msi(pci); in snd_rn_acp_probe()
349 pci_release_regions(pci); in snd_rn_acp_probe()
351 pci_disable_device(pci); in snd_rn_acp_probe()
394 static void snd_rn_acp_remove(struct pci_dev *pci) in snd_rn_acp_remove() argument
399 adata = pci_get_drvdata(pci); in snd_rn_acp_remove()
404 dev_err(&pci->dev, "ACP de-init failed\n"); in snd_rn_acp_remove()
405 pm_runtime_forbid(&pci->dev); in snd_rn_acp_remove()
406 pm_runtime_get_noresume(&pci->dev); in snd_rn_acp_remove()
407 pci_disable_msi(pci); in snd_rn_acp_remove()
408 pci_release_regions(pci); in snd_rn_acp_remove()
409 pci_disable_device(pci); in snd_rn_acp_remove()
418 MODULE_DEVICE_TABLE(pci, snd_rn_acp_ids);