Lines Matching refs:pci
103 static int snd_rpl_probe(struct pci_dev *pci, in snd_rpl_probe() argument
111 switch (pci->revision) { in snd_rpl_probe()
115 dev_dbg(&pci->dev, "acp6x pci device not found\n"); in snd_rpl_probe()
118 if (pci_enable_device(pci)) { in snd_rpl_probe()
119 dev_err(&pci->dev, "pci_enable_device failed\n"); in snd_rpl_probe()
123 ret = pci_request_regions(pci, "AMD ACP6x audio"); in snd_rpl_probe()
125 dev_err(&pci->dev, "pci_request_regions failed\n"); in snd_rpl_probe()
129 adata = devm_kzalloc(&pci->dev, sizeof(struct rpl_dev_data), in snd_rpl_probe()
136 addr = pci_resource_start(pci, 0); in snd_rpl_probe()
137 adata->acp6x_base = devm_ioremap(&pci->dev, addr, in snd_rpl_probe()
138 pci_resource_len(pci, 0)); in snd_rpl_probe()
143 pci_set_master(pci); in snd_rpl_probe()
144 pci_set_drvdata(pci, adata); in snd_rpl_probe()
148 pm_runtime_set_autosuspend_delay(&pci->dev, ACP_SUSPEND_DELAY_MS); in snd_rpl_probe()
149 pm_runtime_use_autosuspend(&pci->dev); in snd_rpl_probe()
150 pm_runtime_put_noidle(&pci->dev); in snd_rpl_probe()
151 pm_runtime_allow(&pci->dev); in snd_rpl_probe()
155 pci_release_regions(pci); in snd_rpl_probe()
157 pci_disable_device(pci); in snd_rpl_probe()
191 static void snd_rpl_remove(struct pci_dev *pci) in snd_rpl_remove() argument
196 adata = pci_get_drvdata(pci); in snd_rpl_remove()
199 dev_err(&pci->dev, "ACP de-init failed\n"); in snd_rpl_remove()
200 pm_runtime_forbid(&pci->dev); in snd_rpl_remove()
201 pm_runtime_get_noresume(&pci->dev); in snd_rpl_remove()
202 pci_release_regions(pci); in snd_rpl_remove()
203 pci_disable_device(pci); in snd_rpl_remove()
212 MODULE_DEVICE_TABLE(pci, snd_rpl_ids);