Lines Matching refs:pci_dev
211 static int tw68_initdev(struct pci_dev *pci_dev, in tw68_initdev() argument
218 dev = devm_kzalloc(&pci_dev->dev, sizeof(*dev), GFP_KERNEL); in tw68_initdev()
225 err = v4l2_device_register(&pci_dev->dev, &dev->v4l2_dev); in tw68_initdev()
230 dev->pci = pci_dev; in tw68_initdev()
231 if (pci_enable_device(pci_dev)) { in tw68_initdev()
241 pci_write_config_byte(pci_dev, PCI_LATENCY_TIMER, latency); in tw68_initdev()
245 pci_read_config_byte(pci_dev, PCI_CLASS_REVISION, &dev->pci_rev); in tw68_initdev()
246 pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER, &dev->pci_lat); in tw68_initdev()
248 dev->name, pci_name(pci_dev), dev->pci_rev, pci_dev->irq, in tw68_initdev()
249 dev->pci_lat, (u64)pci_resource_start(pci_dev, 0)); in tw68_initdev()
250 pci_set_master(pci_dev); in tw68_initdev()
251 err = dma_set_mask(&pci_dev->dev, DMA_BIT_MASK(32)); in tw68_initdev()
277 if (!request_mem_region(pci_resource_start(pci_dev, 0), in tw68_initdev()
278 pci_resource_len(pci_dev, 0), in tw68_initdev()
283 (unsigned long long)pci_resource_start(pci_dev, 0)); in tw68_initdev()
286 dev->lmmio = ioremap(pci_resource_start(pci_dev, 0), in tw68_initdev()
287 pci_resource_len(pci_dev, 0)); in tw68_initdev()
300 err = devm_request_irq(&pci_dev->dev, pci_dev->irq, tw68_irq, in tw68_initdev()
304 dev->name, pci_dev->irq); in tw68_initdev()
333 release_mem_region(pci_resource_start(pci_dev, 0), in tw68_initdev()
334 pci_resource_len(pci_dev, 0)); in tw68_initdev()
340 static void tw68_finidev(struct pci_dev *pci_dev) in tw68_finidev() argument
342 struct v4l2_device *v4l2_dev = pci_get_drvdata(pci_dev); in tw68_finidev()
356 release_mem_region(pci_resource_start(pci_dev, 0), in tw68_finidev()
357 pci_resource_len(pci_dev, 0)); in tw68_finidev()
364 struct pci_dev *pci_dev = to_pci_dev(dev_d); in tw68_suspend() local
365 struct v4l2_device *v4l2_dev = pci_get_drvdata(pci_dev); in tw68_suspend()
373 synchronize_irq(pci_dev->irq); in tw68_suspend()