Lines Matching refs:pci

47 static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)  in acp_pci_probe()  argument
50 struct device *dev = &pci->dev; in acp_pci_probe()
57 flag = snd_amd_acp_find_config(pci); in acp_pci_probe()
61 chip = devm_kzalloc(&pci->dev, sizeof(*chip), GFP_KERNEL); in acp_pci_probe()
65 if (pci_enable_device(pci)) in acp_pci_probe()
66 return dev_err_probe(&pci->dev, -ENODEV, in acp_pci_probe()
69 ret = pci_request_regions(pci, "AMD ACP3x audio"); in acp_pci_probe()
71 dev_err(&pci->dev, "pci_request_regions failed\n"); in acp_pci_probe()
76 pci_set_master(pci); in acp_pci_probe()
81 switch (pci->revision) { in acp_pci_probe()
103 dev_err(dev, "Unsupported device revision:0x%x\n", pci->revision); in acp_pci_probe()
115 addr = pci_resource_start(pci, 0); in acp_pci_probe()
116 chip->base = devm_ioremap(&pci->dev, addr, pci_resource_len(pci, 0)); in acp_pci_probe()
126 check_acp_config(pci, chip); in acp_pci_probe()
130 res = devm_kcalloc(&pci->dev, num_res, sizeof(struct resource), GFP_KERNEL); in acp_pci_probe()
142 res[i].start = pci->irq; in acp_pci_probe()
151 pdevinfo.parent = &pci->dev; in acp_pci_probe()
159 dev_err(&pci->dev, "cannot register %s device\n", pdevinfo.name); in acp_pci_probe()
166 dev_set_drvdata(&pci->dev, chip); in acp_pci_probe()
167 pm_runtime_set_autosuspend_delay(&pci->dev, 2000); in acp_pci_probe()
168 pm_runtime_use_autosuspend(&pci->dev); in acp_pci_probe()
169 pm_runtime_put_noidle(&pci->dev); in acp_pci_probe()
170 pm_runtime_allow(&pci->dev); in acp_pci_probe()
176 pci_release_regions(pci); in acp_pci_probe()
178 pci_disable_device(pci); in acp_pci_probe()
220 static void acp_pci_remove(struct pci_dev *pci) in acp_pci_remove() argument
225 chip = pci_get_drvdata(pci); in acp_pci_remove()
226 pm_runtime_forbid(&pci->dev); in acp_pci_remove()
227 pm_runtime_get_noresume(&pci->dev); in acp_pci_remove()
234 dev_err(&pci->dev, "ACP de-init failed\n"); in acp_pci_remove()
242 MODULE_DEVICE_TABLE(pci, acp_pci_ids);