Lines Matching refs:pcidev
132 void (*exit)(struct pci_dev *pcidev);
215 static int default_setup(struct exar8250 *priv, struct pci_dev *pcidev, in default_setup() argument
224 port->port.mapbase = pci_resource_start(pcidev, bar) + offset; in default_setup()
254 pci_fastcom335_setup(struct exar8250 *priv, struct pci_dev *pcidev, in pci_fastcom335_setup() argument
264 err = default_setup(priv, pcidev, idx, offset, port); in pci_fastcom335_setup()
279 switch (pcidev->device) { in pci_fastcom335_setup()
302 pci_connect_tech_setup(struct exar8250 *priv, struct pci_dev *pcidev, in pci_connect_tech_setup() argument
309 return default_setup(priv, pcidev, idx, offset, port); in pci_connect_tech_setup()
313 pci_xr17c154_setup(struct exar8250 *priv, struct pci_dev *pcidev, in pci_xr17c154_setup() argument
320 return default_setup(priv, pcidev, idx, offset, port); in pci_xr17c154_setup()
323 static void setup_gpio(struct pci_dev *pcidev, u8 __iomem *p) in setup_gpio() argument
333 if ((pcidev->vendor == PCI_VENDOR_ID_EXAR) && in setup_gpio()
334 (pcidev->subsystem_vendor != PCI_VENDOR_ID_SEALEVEL)) { in setup_gpio()
356 static struct platform_device *__xr17v35x_register_gpio(struct pci_dev *pcidev, in __xr17v35x_register_gpio() argument
365 pdev->dev.parent = &pcidev->dev; in __xr17v35x_register_gpio()
366 ACPI_COMPANION_SET(&pdev->dev, ACPI_COMPANION(&pcidev->dev)); in __xr17v35x_register_gpio()
393 static int xr17v35x_register_gpio(struct pci_dev *pcidev, struct uart_8250_port *port) in xr17v35x_register_gpio() argument
395 if (pcidev->vendor == PCI_VENDOR_ID_EXAR) in xr17v35x_register_gpio()
397 __xr17v35x_register_gpio(pcidev, &exar_gpio_node); in xr17v35x_register_gpio()
483 static int iot2040_register_gpio(struct pci_dev *pcidev, in iot2040_register_gpio() argument
494 __xr17v35x_register_gpio(pcidev, &iot2040_gpio_node); in iot2040_register_gpio()
532 pci_xr17v35x_setup(struct exar8250 *priv, struct pci_dev *pcidev, in pci_xr17v35x_setup() argument
551 ret = default_setup(priv, pcidev, idx, offset, port); in pci_xr17v35x_setup()
564 setup_gpio(pcidev, p); in pci_xr17v35x_setup()
566 ret = platform->register_gpio(pcidev, port); in pci_xr17v35x_setup()
572 static void pci_xr17v35x_exit(struct pci_dev *pcidev) in pci_xr17v35x_exit() argument
575 struct exar8250 *priv = pci_get_drvdata(pcidev); in pci_xr17v35x_exit()
608 exar_pci_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) in exar_pci_probe() argument
620 rc = pcim_enable_device(pcidev); in exar_pci_probe()
624 maxnr = pci_resource_len(pcidev, bar) >> (board->reg_shift + 3); in exar_pci_probe()
626 nr_ports = board->num_ports ? board->num_ports : pcidev->device & 0x0f; in exar_pci_probe()
628 priv = devm_kzalloc(&pcidev->dev, struct_size(priv, line, nr_ports), GFP_KERNEL); in exar_pci_probe()
633 priv->virt = pcim_iomap(pcidev, bar, 0); in exar_pci_probe()
637 pci_set_master(pcidev); in exar_pci_probe()
639 rc = pci_alloc_irq_vectors(pcidev, 1, 1, PCI_IRQ_ALL_TYPES); in exar_pci_probe()
645 uart.port.irq = pci_irq_vector(pcidev, 0); in exar_pci_probe()
646 uart.port.dev = &pcidev->dev; in exar_pci_probe()
648 rc = devm_request_irq(&pcidev->dev, uart.port.irq, exar_misc_handler, in exar_pci_probe()
657 rc = board->setup(priv, pcidev, &uart, i); in exar_pci_probe()
659 dev_err(&pcidev->dev, "Failed to setup port %u\n", i); in exar_pci_probe()
663 dev_dbg(&pcidev->dev, "Setup PCI port: port %lx, irq %d, type %d\n", in exar_pci_probe()
668 dev_err(&pcidev->dev, in exar_pci_probe()
676 pci_set_drvdata(pcidev, priv); in exar_pci_probe()
680 static void exar_pci_remove(struct pci_dev *pcidev) in exar_pci_remove() argument
682 struct exar8250 *priv = pci_get_drvdata(pcidev); in exar_pci_remove()
689 priv->board->exit(pcidev); in exar_pci_remove()
694 struct pci_dev *pcidev = to_pci_dev(dev); in exar_suspend() local
695 struct exar8250 *priv = pci_get_drvdata(pcidev); in exar_suspend()
704 priv->board->exit(pcidev); in exar_suspend()