/linux-4.1.27/drivers/net/wireless/orinoco/ |
H A D | orinoco_pci.h | 22 static int orinoco_pci_suspend(struct pci_dev *pdev, pm_message_t state) orinoco_pci_suspend() argument 24 struct orinoco_private *priv = pci_get_drvdata(pdev); orinoco_pci_suspend() 27 free_irq(pdev->irq, priv); orinoco_pci_suspend() 28 pci_save_state(pdev); orinoco_pci_suspend() 29 pci_disable_device(pdev); orinoco_pci_suspend() 30 pci_set_power_state(pdev, PCI_D3hot); orinoco_pci_suspend() 35 static int orinoco_pci_resume(struct pci_dev *pdev) orinoco_pci_resume() argument 37 struct orinoco_private *priv = pci_get_drvdata(pdev); orinoco_pci_resume() 41 pci_set_power_state(pdev, PCI_D0); orinoco_pci_resume() 42 err = pci_enable_device(pdev); orinoco_pci_resume() 48 pci_restore_state(pdev); orinoco_pci_resume() 50 err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED, orinoco_pci_resume() 55 pci_disable_device(pdev); orinoco_pci_resume()
|
/linux-4.1.27/arch/mips/pci/ |
H A D | fixup-fuloong2e.c | 51 static void loongson2e_nec_fixup(struct pci_dev *pdev) loongson2e_nec_fixup() argument 56 pci_read_config_dword(pdev, 0xe0, &val); loongson2e_nec_fixup() 57 pci_write_config_dword(pdev, 0xe0, (val & ~7) | 0x4); loongson2e_nec_fixup() 60 pci_write_config_dword(pdev, 0xe4, 1 << 5); loongson2e_nec_fixup() 63 static void loongson2e_686b_func0_fixup(struct pci_dev *pdev) loongson2e_686b_func0_fixup() argument 67 sb_slot = PCI_SLOT(pdev->devfn); loongson2e_686b_func0_fixup() 72 pci_write_config_byte(pdev, 0x40, 0x08); loongson2e_686b_func0_fixup() 75 pci_write_config_byte(pdev, 0x41, 0x01); loongson2e_686b_func0_fixup() 78 pci_write_config_byte(pdev, 0x45, 0x00); loongson2e_686b_func0_fixup() 81 pci_write_config_byte(pdev, 0x46, 0xe0); loongson2e_686b_func0_fixup() 84 /* pci_write_config_byte(pdev, 0x47, 0x20); */ loongson2e_686b_func0_fixup() 90 pci_write_config_byte(pdev, 0x47, 0xe6); loongson2e_686b_func0_fixup() 99 pci_write_config_byte(pdev, 0x48, 0x01); loongson2e_686b_func0_fixup() 102 pci_write_config_byte(pdev, 0x4a, 0x84); loongson2e_686b_func0_fixup() 109 pci_write_config_byte(pdev, 0x50, 0x0e); loongson2e_686b_func0_fixup() 116 pci_write_config_byte(pdev, 0x51, 0x76); loongson2e_686b_func0_fixup() 119 pci_write_config_byte(pdev, 0x52, 0x34); loongson2e_686b_func0_fixup() 122 pci_write_config_byte(pdev, 0x54, 0x00); loongson2e_686b_func0_fixup() 125 pci_write_config_byte(pdev, 0x55, 0x90); /* bit 7-4, PIRQA */ loongson2e_686b_func0_fixup() 126 pci_write_config_byte(pdev, 0x56, 0xba); /* bit 7-4, PIRQC; */ loongson2e_686b_func0_fixup() 128 pci_write_config_byte(pdev, 0x57, 0xd0); /* bit 7-4, PIRQD */ loongson2e_686b_func0_fixup() 131 pci_read_config_byte(pdev, 0x85, &c); loongson2e_686b_func0_fixup() 133 pci_write_config_byte(pdev, 0x85, c); loongson2e_686b_func0_fixup() 138 static void loongson2e_686b_func1_fixup(struct pci_dev *pdev) loongson2e_686b_func1_fixup() argument 143 pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 48); loongson2e_686b_func1_fixup() 144 pci_write_config_byte(pdev, PCI_COMMAND, loongson2e_686b_func1_fixup() 147 pci_write_config_byte(pdev, 0x40, 0x0b); loongson2e_686b_func1_fixup() 149 pci_write_config_byte(pdev, 0x42, 0x09); loongson2e_686b_func1_fixup() 153 pci_write_config_byte(pdev, 0x41, 0x02); loongson2e_686b_func1_fixup() 156 pci_write_config_byte(pdev, 0x43, 0x0a); loongson2e_686b_func1_fixup() 157 pci_write_config_byte(pdev, 0x44, 0x00); loongson2e_686b_func1_fixup() 159 pci_write_config_byte(pdev, 0x45, 0x00); loongson2e_686b_func1_fixup() 161 pci_write_config_byte(pdev, 0x41, 0xc2); loongson2e_686b_func1_fixup() 162 pci_write_config_byte(pdev, 0x43, 0x35); loongson2e_686b_func1_fixup() 163 pci_write_config_byte(pdev, 0x44, 0x1c); loongson2e_686b_func1_fixup() 165 pci_write_config_byte(pdev, 0x45, 0x10); loongson2e_686b_func1_fixup() 171 static void loongson2e_686b_func2_fixup(struct pci_dev *pdev) loongson2e_686b_func2_fixup() argument 174 pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, 10); loongson2e_686b_func2_fixup() 177 static void loongson2e_686b_func3_fixup(struct pci_dev *pdev) loongson2e_686b_func3_fixup() argument 180 pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, 11); loongson2e_686b_func3_fixup() 183 static void loongson2e_686b_func5_fixup(struct pci_dev *pdev) loongson2e_686b_func5_fixup() argument 189 pci_write_config_byte(pdev, PCI_COMMAND, loongson2e_686b_func5_fixup() 192 pci_read_config_dword(pdev, 0x4, &val); loongson2e_686b_func5_fixup() 193 pci_write_config_dword(pdev, 0x4, val | 1); loongson2e_686b_func5_fixup() 196 pci_write_config_byte(pdev, 0x3c, 9); loongson2e_686b_func5_fixup() 198 pci_read_config_byte(pdev, 0x8, &c); loongson2e_686b_func5_fixup() 201 pci_write_config_byte(pdev, 0x41, 0xcc); loongson2e_686b_func5_fixup() 204 pci_write_config_byte(pdev, 0x42, 0x20); loongson2e_686b_func5_fixup() 207 pci_write_config_word(pdev, 0x2c, 0x1005); loongson2e_686b_func5_fixup() 208 pci_write_config_word(pdev, 0x2e, 0x4710); loongson2e_686b_func5_fixup() 209 pci_read_config_dword(pdev, 0x2c, &val); loongson2e_686b_func5_fixup() 211 pci_write_config_byte(pdev, 0x42, 0x0); loongson2e_686b_func5_fixup()
|
H A D | fixup-malta.c | 67 static void malta_piix_func0_fixup(struct pci_dev *pdev) malta_piix_func0_fixup() argument 83 pci_read_config_byte(pdev, PIIX4_FUNC0_PIRQRC+i, ®_val); malta_piix_func0_fixup() 92 if (PCI_SLOT(pdev->devfn) == 10) { malta_piix_func0_fixup() 97 pci_read_config_byte(pdev, PIIX4_FUNC0_TOM, ®_val); malta_piix_func0_fixup() 98 pci_write_config_byte(pdev, PIIX4_FUNC0_TOM, reg_val | malta_piix_func0_fixup() 103 pci_read_config_dword(pdev, PIIX4_FUNC0_GENCFG, ®_val32); malta_piix_func0_fixup() 104 pci_write_config_dword(pdev, PIIX4_FUNC0_GENCFG, malta_piix_func0_fixup() 108 pci_read_config_byte(pdev, PIIX4_FUNC0_SERIRQC, ®_val); malta_piix_func0_fixup() 110 pci_write_config_byte(pdev, PIIX4_FUNC0_SERIRQC, reg_val); malta_piix_func0_fixup() 113 pci_read_config_word(pdev, PCI_COMMAND, ®_val16); malta_piix_func0_fixup() 114 pci_write_config_word(pdev, PCI_COMMAND, malta_piix_func0_fixup() 121 static void malta_piix_func1_fixup(struct pci_dev *pdev) malta_piix_func1_fixup() argument 126 if (PCI_SLOT(pdev->devfn) == 10) { malta_piix_func1_fixup() 130 pci_read_config_byte(pdev, PIIX4_FUNC1_IDETIM_PRIMARY_HI, malta_piix_func1_fixup() 132 pci_write_config_byte(pdev, PIIX4_FUNC1_IDETIM_PRIMARY_HI, malta_piix_func1_fixup() 134 pci_read_config_byte(pdev, PIIX4_FUNC1_IDETIM_SECONDARY_HI, malta_piix_func1_fixup() 136 pci_write_config_byte(pdev, PIIX4_FUNC1_IDETIM_SECONDARY_HI, malta_piix_func1_fixup()
|
H A D | fixup-loongson3.c | 29 static void print_fixup_info(const struct pci_dev *pdev) print_fixup_info() argument 31 dev_info(&pdev->dev, "Device %x:%x, irq %d\n", print_fixup_info() 32 pdev->vendor, pdev->device, pdev->irq); print_fixup_info() 41 static void pci_fixup_radeon(struct pci_dev *pdev) pci_fixup_radeon() argument 43 if (pdev->resource[PCI_ROM_RESOURCE].start) pci_fixup_radeon() 49 pdev->resource[PCI_ROM_RESOURCE].start = pci_fixup_radeon() 51 pdev->resource[PCI_ROM_RESOURCE].end = pci_fixup_radeon() 53 pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_COPY; pci_fixup_radeon() 55 dev_info(&pdev->dev, "BAR %d: assigned %pR for Radeon ROM\n", pci_fixup_radeon() 56 PCI_ROM_RESOURCE, &pdev->resource[PCI_ROM_RESOURCE]); pci_fixup_radeon()
|
H A D | fixup-lemote2f.c | 99 static void loongson_cs5536_isa_fixup(struct pci_dev *pdev) loongson_cs5536_isa_fixup() argument 102 pci_write_config_dword(pdev, PCI_UART1_INT_REG, 1); loongson_cs5536_isa_fixup() 103 pci_write_config_dword(pdev, PCI_UART2_INT_REG, 1); loongson_cs5536_isa_fixup() 106 static void loongson_cs5536_ide_fixup(struct pci_dev *pdev) loongson_cs5536_ide_fixup() argument 109 pci_write_config_dword(pdev, PCI_IDE_CFG_REG, loongson_cs5536_ide_fixup() 113 static void loongson_cs5536_acc_fixup(struct pci_dev *pdev) loongson_cs5536_acc_fixup() argument 116 pci_write_config_dword(pdev, PCI_ACC_INT_REG, 1); loongson_cs5536_acc_fixup() 118 pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0xc0); loongson_cs5536_acc_fixup() 121 static void loongson_cs5536_ohci_fixup(struct pci_dev *pdev) loongson_cs5536_ohci_fixup() argument 125 pci_write_config_dword(pdev, PCI_OHCI_INT_REG, 1); loongson_cs5536_ohci_fixup() 128 static void loongson_cs5536_ehci_fixup(struct pci_dev *pdev) loongson_cs5536_ehci_fixup() argument 137 pci_write_config_dword(pdev, PCI_EHCI_FLADJ_REG, 0x2000); loongson_cs5536_ehci_fixup() 140 static void loongson_nec_fixup(struct pci_dev *pdev) loongson_nec_fixup() argument 144 pci_read_config_dword(pdev, 0xe0, &val); loongson_nec_fixup() 146 pci_write_config_dword(pdev, 0xe0, (val & ~3) | 0x2); loongson_nec_fixup()
|
/linux-4.1.27/drivers/misc/mei/ |
H A D | pci-txe.c | 54 static void mei_txe_pci_iounmap(struct pci_dev *pdev, struct mei_txe_hw *hw) mei_txe_pci_iounmap() argument 60 pci_iounmap(pdev, hw->mem_addr[i]); mei_txe_pci_iounmap() 68 * @pdev: PCI device structure 73 static int mei_txe_probe(struct pci_dev *pdev, const struct pci_device_id *ent) mei_txe_probe() argument 81 err = pci_enable_device(pdev); mei_txe_probe() 83 dev_err(&pdev->dev, "failed to enable pci device.\n"); mei_txe_probe() 87 pci_set_master(pdev); mei_txe_probe() 89 err = pci_request_regions(pdev, KBUILD_MODNAME); mei_txe_probe() 91 dev_err(&pdev->dev, "failed to get pci regions.\n"); mei_txe_probe() 95 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(36)); mei_txe_probe() 97 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); mei_txe_probe() 99 dev_err(&pdev->dev, "No suitable DMA available.\n"); mei_txe_probe() 105 dev = mei_txe_dev_init(pdev); mei_txe_probe() 114 hw->mem_addr[i] = pci_iomap(pdev, i, 0); mei_txe_probe() 116 dev_err(&pdev->dev, "mapping I/O device memory failure.\n"); mei_txe_probe() 123 pci_enable_msi(pdev); mei_txe_probe() 129 if (pci_dev_msi_enabled(pdev)) mei_txe_probe() 130 err = request_threaded_irq(pdev->irq, mei_txe_probe() 135 err = request_threaded_irq(pdev->irq, mei_txe_probe() 140 dev_err(&pdev->dev, "mei: request_threaded_irq failure. irq = %d\n", mei_txe_probe() 141 pdev->irq); mei_txe_probe() 146 dev_err(&pdev->dev, "init hw failure.\n"); mei_txe_probe() 151 pm_runtime_set_autosuspend_delay(&pdev->dev, MEI_TXI_RPM_TIMEOUT); mei_txe_probe() 152 pm_runtime_use_autosuspend(&pdev->dev); mei_txe_probe() 154 err = mei_register(dev, &pdev->dev); mei_txe_probe() 158 pci_set_drvdata(pdev, dev); mei_txe_probe() 165 if (!pci_dev_run_wake(pdev)) mei_txe_probe() 168 pm_runtime_put_noidle(&pdev->dev); mei_txe_probe() 179 free_irq(pdev->irq, dev); mei_txe_probe() 180 pci_disable_msi(pdev); mei_txe_probe() 183 mei_txe_pci_iounmap(pdev, hw); mei_txe_probe() 187 pci_release_regions(pdev); mei_txe_probe() 189 pci_disable_device(pdev); mei_txe_probe() 191 dev_err(&pdev->dev, "initialization failed.\n"); mei_txe_probe() 198 * @pdev: PCI device structure 203 static void mei_txe_remove(struct pci_dev *pdev) mei_txe_remove() argument 208 dev = pci_get_drvdata(pdev); mei_txe_remove() 210 dev_err(&pdev->dev, "mei: dev =NULL\n"); mei_txe_remove() 214 pm_runtime_get_noresume(&pdev->dev); mei_txe_remove() 220 if (!pci_dev_run_wake(pdev)) mei_txe_remove() 225 free_irq(pdev->irq, dev); mei_txe_remove() 226 pci_disable_msi(pdev); mei_txe_remove() 228 pci_set_drvdata(pdev, NULL); mei_txe_remove() 230 mei_txe_pci_iounmap(pdev, hw); mei_txe_remove() 236 pci_release_regions(pdev); mei_txe_remove() 237 pci_disable_device(pdev); mei_txe_remove() 244 struct pci_dev *pdev = to_pci_dev(device); mei_txe_pci_suspend() local 245 struct mei_device *dev = pci_get_drvdata(pdev); mei_txe_pci_suspend() 250 dev_dbg(&pdev->dev, "suspend\n"); mei_txe_pci_suspend() 256 free_irq(pdev->irq, dev); mei_txe_pci_suspend() 257 pci_disable_msi(pdev); mei_txe_pci_suspend() 264 struct pci_dev *pdev = to_pci_dev(device); mei_txe_pci_resume() local 268 dev = pci_get_drvdata(pdev); mei_txe_pci_resume() 272 pci_enable_msi(pdev); mei_txe_pci_resume() 277 if (pci_dev_msi_enabled(pdev)) mei_txe_pci_resume() 278 err = request_threaded_irq(pdev->irq, mei_txe_pci_resume() 283 err = request_threaded_irq(pdev->irq, mei_txe_pci_resume() 288 dev_err(&pdev->dev, "request_threaded_irq failed: irq = %d.\n", mei_txe_pci_resume() 289 pdev->irq); mei_txe_pci_resume() 302 struct pci_dev *pdev = to_pci_dev(device); mei_txe_pm_runtime_idle() local 305 dev_dbg(&pdev->dev, "rpm: txe: runtime_idle\n"); mei_txe_pm_runtime_idle() 307 dev = pci_get_drvdata(pdev); mei_txe_pm_runtime_idle() 317 struct pci_dev *pdev = to_pci_dev(device); mei_txe_pm_runtime_suspend() local 321 dev_dbg(&pdev->dev, "rpm: txe: runtime suspend\n"); mei_txe_pm_runtime_suspend() 323 dev = pci_get_drvdata(pdev); mei_txe_pm_runtime_suspend() 341 if (!ret && pci_dev_run_wake(pdev)) mei_txe_pm_runtime_suspend() 344 dev_dbg(&pdev->dev, "rpm: txe: runtime suspend ret=%d\n", ret); mei_txe_pm_runtime_suspend() 352 struct pci_dev *pdev = to_pci_dev(device); mei_txe_pm_runtime_resume() local 356 dev_dbg(&pdev->dev, "rpm: txe: runtime resume\n"); mei_txe_pm_runtime_resume() 358 dev = pci_get_drvdata(pdev); mei_txe_pm_runtime_resume() 370 dev_dbg(&pdev->dev, "rpm: txe: runtime resume ret = %d\n", ret); mei_txe_pm_runtime_resume() 382 struct pci_dev *pdev = to_pci_dev(dev->dev); mei_txe_set_pm_domain() local 384 if (pdev->dev.bus && pdev->dev.bus->pm) { mei_txe_set_pm_domain() 385 dev->pg_domain.ops = *pdev->dev.bus->pm; mei_txe_set_pm_domain() 391 pdev->dev.pm_domain = &dev->pg_domain; mei_txe_set_pm_domain()
|
H A D | pci-me.c | 102 * @pdev: PCI device structure mei_me_unset_pm_domain() 107 static bool mei_me_quirk_probe(struct pci_dev *pdev, mei_me_quirk_probe() argument 110 if (cfg->quirk_probe && cfg->quirk_probe(pdev)) { mei_me_quirk_probe() 111 dev_info(&pdev->dev, "Device doesn't have valid ME Interface\n"); mei_me_quirk_probe() 121 * @pdev: PCI device structure 126 static int mei_me_probe(struct pci_dev *pdev, const struct pci_device_id *ent) mei_me_probe() argument 134 if (!mei_me_quirk_probe(pdev, cfg)) mei_me_probe() 138 err = pci_enable_device(pdev); mei_me_probe() 140 dev_err(&pdev->dev, "failed to enable pci device.\n"); mei_me_probe() 144 pci_set_master(pdev); mei_me_probe() 146 err = pci_request_regions(pdev, KBUILD_MODNAME); mei_me_probe() 148 dev_err(&pdev->dev, "failed to get pci regions.\n"); mei_me_probe() 152 if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)) || mei_me_probe() 153 dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64))) { mei_me_probe() 155 err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); mei_me_probe() 157 err = dma_set_coherent_mask(&pdev->dev, mei_me_probe() 161 dev_err(&pdev->dev, "No usable DMA configuration, aborting\n"); mei_me_probe() 167 dev = mei_me_dev_init(pdev, cfg); mei_me_probe() 174 hw->mem_addr = pci_iomap(pdev, 0, 0); mei_me_probe() 176 dev_err(&pdev->dev, "mapping I/O device memory failure.\n"); mei_me_probe() 180 pci_enable_msi(pdev); mei_me_probe() 183 if (pci_dev_msi_enabled(pdev)) mei_me_probe() 184 err = request_threaded_irq(pdev->irq, mei_me_probe() 189 err = request_threaded_irq(pdev->irq, mei_me_probe() 195 dev_err(&pdev->dev, "request_threaded_irq failure. irq = %d\n", mei_me_probe() 196 pdev->irq); mei_me_probe() 201 dev_err(&pdev->dev, "init hw failure.\n"); mei_me_probe() 206 pm_runtime_set_autosuspend_delay(&pdev->dev, MEI_ME_RPM_TIMEOUT); mei_me_probe() 207 pm_runtime_use_autosuspend(&pdev->dev); mei_me_probe() 209 err = mei_register(dev, &pdev->dev); mei_me_probe() 213 pci_set_drvdata(pdev, dev); mei_me_probe() 222 if (!pci_dev_run_wake(pdev)) mei_me_probe() 226 pm_runtime_put_noidle(&pdev->dev); mei_me_probe() 228 dev_dbg(&pdev->dev, "initialization successful.\n"); mei_me_probe() 235 free_irq(pdev->irq, dev); mei_me_probe() 237 pci_disable_msi(pdev); mei_me_probe() 238 pci_iounmap(pdev, hw->mem_addr); mei_me_probe() 242 pci_release_regions(pdev); mei_me_probe() 244 pci_disable_device(pdev); mei_me_probe() 246 dev_err(&pdev->dev, "initialization failed.\n"); mei_me_probe() 253 * @pdev: PCI device structure 258 static void mei_me_remove(struct pci_dev *pdev) mei_me_remove() argument 263 dev = pci_get_drvdata(pdev); mei_me_remove() 268 pm_runtime_get_noresume(&pdev->dev); mei_me_remove() 273 dev_dbg(&pdev->dev, "stop\n"); mei_me_remove() 276 if (!pci_dev_run_wake(pdev)) mei_me_remove() 282 free_irq(pdev->irq, dev); mei_me_remove() 283 pci_disable_msi(pdev); mei_me_remove() 286 pci_iounmap(pdev, hw->mem_addr); mei_me_remove() 292 pci_release_regions(pdev); mei_me_remove() 293 pci_disable_device(pdev); mei_me_remove() 300 struct pci_dev *pdev = to_pci_dev(device); mei_me_pci_suspend() local 301 struct mei_device *dev = pci_get_drvdata(pdev); mei_me_pci_suspend() 306 dev_dbg(&pdev->dev, "suspend\n"); mei_me_pci_suspend() 312 free_irq(pdev->irq, dev); mei_me_pci_suspend() 313 pci_disable_msi(pdev); mei_me_pci_suspend() 320 struct pci_dev *pdev = to_pci_dev(device); mei_me_pci_resume() local 324 dev = pci_get_drvdata(pdev); mei_me_pci_resume() 328 pci_enable_msi(pdev); mei_me_pci_resume() 331 if (pci_dev_msi_enabled(pdev)) mei_me_pci_resume() 332 err = request_threaded_irq(pdev->irq, mei_me_pci_resume() 337 err = request_threaded_irq(pdev->irq, mei_me_pci_resume() 343 dev_err(&pdev->dev, "request_threaded_irq failed: irq = %d.\n", mei_me_pci_resume() 344 pdev->irq); mei_me_pci_resume() 362 struct pci_dev *pdev = to_pci_dev(device); mei_me_pm_runtime_idle() local 365 dev_dbg(&pdev->dev, "rpm: me: runtime_idle\n"); mei_me_pm_runtime_idle() 367 dev = pci_get_drvdata(pdev); mei_me_pm_runtime_idle() 378 struct pci_dev *pdev = to_pci_dev(device); mei_me_pm_runtime_suspend() local 382 dev_dbg(&pdev->dev, "rpm: me: runtime suspend\n"); mei_me_pm_runtime_suspend() 384 dev = pci_get_drvdata(pdev); mei_me_pm_runtime_suspend() 397 dev_dbg(&pdev->dev, "rpm: me: runtime suspend ret=%d\n", ret); mei_me_pm_runtime_suspend() 404 struct pci_dev *pdev = to_pci_dev(device); mei_me_pm_runtime_resume() local 408 dev_dbg(&pdev->dev, "rpm: me: runtime resume\n"); mei_me_pm_runtime_resume() 410 dev = pci_get_drvdata(pdev); mei_me_pm_runtime_resume() 420 dev_dbg(&pdev->dev, "rpm: me: runtime resume ret = %d\n", ret); mei_me_pm_runtime_resume() 432 struct pci_dev *pdev = to_pci_dev(dev->dev); mei_me_set_pm_domain() local 434 if (pdev->dev.bus && pdev->dev.bus->pm) { mei_me_set_pm_domain() 435 dev->pg_domain.ops = *pdev->dev.bus->pm; mei_me_set_pm_domain() 441 pdev->dev.pm_domain = &dev->pg_domain; mei_me_set_pm_domain()
|
/linux-4.1.27/drivers/media/usb/pwc/ |
H A D | pwc-ctrl.c | 107 static int recv_control_msg(struct pwc_device *pdev, recv_control_msg() argument 112 rc = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0), recv_control_msg() 115 value, pdev->vcinterface, recv_control_msg() 116 pdev->ctrl_buf, recv_count, USB_CTRL_GET_TIMEOUT); recv_control_msg() 123 static inline int send_video_command(struct pwc_device *pdev, send_video_command() argument 128 memcpy(pdev->ctrl_buf, buf, buflen); send_video_command() 130 rc = usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0), send_video_command() 134 pdev->ctrl_buf, buflen, USB_CTRL_SET_TIMEOUT); send_video_command() 136 memcpy(pdev->cmd_buf, buf, buflen); send_video_command() 143 int send_control_msg(struct pwc_device *pdev, send_control_msg() argument 146 return usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0), send_control_msg() 149 value, pdev->vcinterface, send_control_msg() 153 static int set_video_mode_Nala(struct pwc_device *pdev, int size, int pixfmt, set_video_mode_Nala() argument 193 ret = send_video_command(pdev, pdev->vendpoint, set_video_mode_Nala() 199 pwc_dec1_init(pdev, pEntry->mode); set_video_mode_Nala() 202 pdev->pixfmt = pixfmt; set_video_mode_Nala() 203 pdev->vframes = frames; set_video_mode_Nala() 204 pdev->valternate = pEntry->alternate; set_video_mode_Nala() 205 pdev->width = pwc_image_sizes[size][0]; set_video_mode_Nala() 206 pdev->height = pwc_image_sizes[size][1]; set_video_mode_Nala() 207 pdev->frame_size = (pdev->width * pdev->height * 3) / 2; set_video_mode_Nala() 209 if (pdev->release < 5) { /* 4 fold compression */ set_video_mode_Nala() 210 pdev->vbandlength = 528; set_video_mode_Nala() 211 pdev->frame_size /= 4; set_video_mode_Nala() 214 pdev->vbandlength = 704; set_video_mode_Nala() 215 pdev->frame_size /= 3; set_video_mode_Nala() 219 pdev->vbandlength = 0; set_video_mode_Nala() 228 static int set_video_mode_Timon(struct pwc_device *pdev, int size, int pixfmt, set_video_mode_Timon() argument 256 ret = send_video_command(pdev, pdev->vendpoint, set_video_mode_Timon() 262 pwc_dec23_init(pdev, pChoose->mode); set_video_mode_Timon() 265 pdev->pixfmt = pixfmt; set_video_mode_Timon() 266 pdev->vframes = (fps + 1) * 5; set_video_mode_Timon() 267 pdev->valternate = pChoose->alternate; set_video_mode_Timon() 268 pdev->width = pwc_image_sizes[size][0]; set_video_mode_Timon() 269 pdev->height = pwc_image_sizes[size][1]; set_video_mode_Timon() 270 pdev->vbandlength = pChoose->bandlength; set_video_mode_Timon() 272 pdev->frame_size = (pChoose->bandlength * pdev->height) / 4; set_video_mode_Timon() 274 pdev->frame_size = (pdev->width * pdev->height * 12) / 8; set_video_mode_Timon() 279 static int set_video_mode_Kiara(struct pwc_device *pdev, int size, int pixfmt, set_video_mode_Kiara() argument 307 ret = send_video_command(pdev, 4, pChoose->mode, 12); set_video_mode_Kiara() 312 pwc_dec23_init(pdev, pChoose->mode); set_video_mode_Kiara() 315 pdev->pixfmt = pixfmt; set_video_mode_Kiara() 316 pdev->vframes = (fps + 1) * 5; set_video_mode_Kiara() 317 pdev->valternate = pChoose->alternate; set_video_mode_Kiara() 318 pdev->width = pwc_image_sizes[size][0]; set_video_mode_Kiara() 319 pdev->height = pwc_image_sizes[size][1]; set_video_mode_Kiara() 320 pdev->vbandlength = pChoose->bandlength; set_video_mode_Kiara() 321 if (pdev->vbandlength > 0) set_video_mode_Kiara() 322 pdev->frame_size = (pdev->vbandlength * pdev->height) / 4; set_video_mode_Kiara() 324 pdev->frame_size = (pdev->width * pdev->height * 12) / 8; set_video_mode_Kiara() 326 pdev->frame_size, pdev->vframes, size, pdev->vbandlength); set_video_mode_Kiara() 330 int pwc_set_video_mode(struct pwc_device *pdev, int width, int height, pwc_set_video_mode() argument 337 size = pwc_get_size(pdev, width, height); pwc_set_video_mode() 340 if (DEVICE_USE_CODEC1(pdev->type)) { pwc_set_video_mode() 341 ret = set_video_mode_Nala(pdev, size, pixfmt, frames, pwc_set_video_mode() 343 } else if (DEVICE_USE_CODEC3(pdev->type)) { pwc_set_video_mode() 344 ret = set_video_mode_Kiara(pdev, size, pixfmt, frames, pwc_set_video_mode() 347 ret = set_video_mode_Timon(pdev, size, pixfmt, frames, pwc_set_video_mode() 354 pdev->frame_total_size = pdev->frame_size + pdev->frame_header_size + pdev->frame_trailer_size; pwc_set_video_mode() 355 PWC_DEBUG_SIZE("Set resolution to %dx%d\n", pdev->width, pdev->height); pwc_set_video_mode() 359 static unsigned int pwc_get_fps_Nala(struct pwc_device *pdev, unsigned int index, unsigned int size) pwc_get_fps_Nala() argument 371 static unsigned int pwc_get_fps_Kiara(struct pwc_device *pdev, unsigned int index, unsigned int size) pwc_get_fps_Kiara() argument 383 static unsigned int pwc_get_fps_Timon(struct pwc_device *pdev, unsigned int index, unsigned int size) pwc_get_fps_Timon() argument 395 unsigned int pwc_get_fps(struct pwc_device *pdev, unsigned int index, unsigned int size) pwc_get_fps() argument 399 if (DEVICE_USE_CODEC1(pdev->type)) { pwc_get_fps() 400 ret = pwc_get_fps_Nala(pdev, index, size); pwc_get_fps() 402 } else if (DEVICE_USE_CODEC3(pdev->type)) { pwc_get_fps() 403 ret = pwc_get_fps_Kiara(pdev, index, size); pwc_get_fps() 406 ret = pwc_get_fps_Timon(pdev, index, size); pwc_get_fps() 412 int pwc_get_u8_ctrl(struct pwc_device *pdev, u8 request, u16 value, int *data) pwc_get_u8_ctrl() argument 416 ret = recv_control_msg(pdev, request, value, 1); pwc_get_u8_ctrl() 420 *data = pdev->ctrl_buf[0]; pwc_get_u8_ctrl() 424 int pwc_set_u8_ctrl(struct pwc_device *pdev, u8 request, u16 value, u8 data) pwc_set_u8_ctrl() argument 428 pdev->ctrl_buf[0] = data; pwc_set_u8_ctrl() 429 ret = send_control_msg(pdev, request, value, pdev->ctrl_buf, 1); pwc_set_u8_ctrl() 436 int pwc_get_s8_ctrl(struct pwc_device *pdev, u8 request, u16 value, int *data) pwc_get_s8_ctrl() argument 440 ret = recv_control_msg(pdev, request, value, 1); pwc_get_s8_ctrl() 444 *data = ((s8 *)pdev->ctrl_buf)[0]; pwc_get_s8_ctrl() 448 int pwc_get_u16_ctrl(struct pwc_device *pdev, u8 request, u16 value, int *data) pwc_get_u16_ctrl() argument 452 ret = recv_control_msg(pdev, request, value, 2); pwc_get_u16_ctrl() 456 *data = (pdev->ctrl_buf[1] << 8) | pdev->ctrl_buf[0]; pwc_get_u16_ctrl() 460 int pwc_set_u16_ctrl(struct pwc_device *pdev, u8 request, u16 value, u16 data) pwc_set_u16_ctrl() argument 464 pdev->ctrl_buf[0] = data & 0xff; pwc_set_u16_ctrl() 465 pdev->ctrl_buf[1] = data >> 8; pwc_set_u16_ctrl() 466 ret = send_control_msg(pdev, request, value, pdev->ctrl_buf, 2); pwc_set_u16_ctrl() 473 int pwc_button_ctrl(struct pwc_device *pdev, u16 value) pwc_button_ctrl() argument 477 ret = send_control_msg(pdev, SET_STATUS_CTL, value, NULL, 0); pwc_button_ctrl() 485 void pwc_camera_power(struct pwc_device *pdev, int power) pwc_camera_power() argument 489 if (!pdev->power_save) pwc_camera_power() 492 if (pdev->type < 675 || (pdev->type < 730 && pdev->release < 6)) pwc_camera_power() 496 pdev->ctrl_buf[0] = 0x00; /* active */ pwc_camera_power() 498 pdev->ctrl_buf[0] = 0xFF; /* power save */ pwc_camera_power() 499 r = send_control_msg(pdev, SET_STATUS_CTL, pwc_camera_power() 500 SET_POWER_SAVE_MODE_FORMATTER, pdev->ctrl_buf, 1); pwc_camera_power() 506 int pwc_set_leds(struct pwc_device *pdev, int on_value, int off_value) pwc_set_leds() argument 510 if (pdev->type < 730) pwc_set_leds() 523 pdev->ctrl_buf[0] = on_value; pwc_set_leds() 524 pdev->ctrl_buf[1] = off_value; pwc_set_leds() 526 r = send_control_msg(pdev, pwc_set_leds() 527 SET_STATUS_CTL, LED_FORMATTER, pdev->ctrl_buf, 2); pwc_set_leds() 535 int pwc_get_cmos_sensor(struct pwc_device *pdev, int *sensor) pwc_get_cmos_sensor() argument 539 if (pdev->type < 675) pwc_get_cmos_sensor() 541 else if (pdev->type < 730) pwc_get_cmos_sensor() 546 ret = recv_control_msg(pdev, GET_STATUS_CTL, request, 1); pwc_get_cmos_sensor() 549 if (pdev->type < 675) pwc_get_cmos_sensor() 550 *sensor = pdev->ctrl_buf[0] | 0x100; pwc_get_cmos_sensor() 552 *sensor = pdev->ctrl_buf[0]; pwc_get_cmos_sensor()
|
H A D | pwc-misc.c | 41 int pwc_get_size(struct pwc_device *pdev, int width, int height) pwc_get_size() argument 48 if (!(pdev->image_mask & (1 << i))) pwc_get_size() 58 if (pdev->image_mask & (1 << i)) pwc_get_size() 67 void pwc_construct(struct pwc_device *pdev) pwc_construct() argument 69 if (DEVICE_USE_CODEC1(pdev->type)) { pwc_construct() 71 pdev->image_mask = 1 << PSZ_SQCIF | 1 << PSZ_QCIF | 1 << PSZ_CIF; pwc_construct() 72 pdev->vcinterface = 2; pwc_construct() 73 pdev->vendpoint = 4; pwc_construct() 74 pdev->frame_header_size = 0; pwc_construct() 75 pdev->frame_trailer_size = 0; pwc_construct() 77 } else if (DEVICE_USE_CODEC3(pdev->type)) { pwc_construct() 79 pdev->image_mask = 1 << PSZ_QSIF | 1 << PSZ_SIF | 1 << PSZ_VGA; pwc_construct() 80 pdev->vcinterface = 3; pwc_construct() 81 pdev->vendpoint = 5; pwc_construct() 82 pdev->frame_header_size = TOUCAM_HEADER_SIZE; pwc_construct() 83 pdev->frame_trailer_size = TOUCAM_TRAILER_SIZE; pwc_construct() 85 } else /* if (DEVICE_USE_CODEC2(pdev->type)) */ { pwc_construct() 87 pdev->image_mask = 1 << PSZ_SQCIF | 1 << PSZ_QSIF | 1 << PSZ_QCIF | 1 << PSZ_SIF | 1 << PSZ_CIF | 1 << PSZ_VGA; pwc_construct() 88 pdev->vcinterface = 3; pwc_construct() 89 pdev->vendpoint = 4; pwc_construct() 90 pdev->frame_header_size = 0; pwc_construct() 91 pdev->frame_trailer_size = 0; pwc_construct()
|
H A D | pwc-v4l.c | 162 int pwc_init_controls(struct pwc_device *pdev) pwc_init_controls() argument 168 hdl = &pdev->ctrl_handler; pwc_init_controls() 174 r = pwc_get_u8_ctrl(pdev, GET_LUM_CTL, BRIGHTNESS_FORMATTER, &def); pwc_init_controls() 177 pdev->brightness = v4l2_ctrl_new_std(hdl, &pwc_ctrl_ops, pwc_init_controls() 180 r = pwc_get_u8_ctrl(pdev, GET_LUM_CTL, CONTRAST_FORMATTER, &def); pwc_init_controls() 183 pdev->contrast = v4l2_ctrl_new_std(hdl, &pwc_ctrl_ops, pwc_init_controls() 186 if (pdev->type >= 675) { pwc_init_controls() 187 if (pdev->type < 730) pwc_init_controls() 188 pdev->saturation_fmt = SATURATION_MODE_FORMATTER2; pwc_init_controls() 190 pdev->saturation_fmt = SATURATION_MODE_FORMATTER1; pwc_init_controls() 191 r = pwc_get_s8_ctrl(pdev, GET_CHROM_CTL, pdev->saturation_fmt, pwc_init_controls() 195 pdev->saturation = v4l2_ctrl_new_std(hdl, &pwc_ctrl_ops, pwc_init_controls() 199 r = pwc_get_u8_ctrl(pdev, GET_LUM_CTL, GAMMA_FORMATTER, &def); pwc_init_controls() 202 pdev->gamma = v4l2_ctrl_new_std(hdl, &pwc_ctrl_ops, pwc_init_controls() 206 r = pwc_get_u8_ctrl(pdev, GET_CHROM_CTL, WB_MODE_FORMATTER, &def); pwc_init_controls() 212 pdev->auto_white_balance = v4l2_ctrl_new_custom(hdl, &cfg, NULL); pwc_init_controls() 214 if (!pdev->auto_white_balance) pwc_init_controls() 217 r = pwc_get_u8_ctrl(pdev, GET_CHROM_CTL, pwc_init_controls() 221 pdev->red_balance = v4l2_ctrl_new_std(hdl, &pwc_ctrl_ops, pwc_init_controls() 224 r = pwc_get_u8_ctrl(pdev, GET_CHROM_CTL, pwc_init_controls() 228 pdev->blue_balance = v4l2_ctrl_new_std(hdl, &pwc_ctrl_ops, pwc_init_controls() 231 v4l2_ctrl_auto_cluster(3, &pdev->auto_white_balance, awb_manual, true); pwc_init_controls() 234 r = pwc_get_u8_ctrl(pdev, GET_LUM_CTL, AGC_MODE_FORMATTER, &def); pwc_init_controls() 238 pdev->autogain = v4l2_ctrl_new_std(hdl, &pwc_ctrl_ops, pwc_init_controls() 240 if (!pdev->autogain) pwc_init_controls() 243 r = pwc_get_u8_ctrl(pdev, GET_LUM_CTL, PRESET_AGC_FORMATTER, &def); pwc_init_controls() 246 pdev->gain = v4l2_ctrl_new_std(hdl, &pwc_ctrl_ops, pwc_init_controls() 250 if (DEVICE_USE_CODEC2(pdev->type)) { pwc_init_controls() 251 r = pwc_get_u8_ctrl(pdev, GET_LUM_CTL, SHUTTER_MODE_FORMATTER, pwc_init_controls() 259 pdev->exposure_auto = v4l2_ctrl_new_std_menu(hdl, pwc_init_controls() 263 if (!pdev->exposure_auto) pwc_init_controls() 267 r = pwc_get_u16_ctrl(pdev, GET_STATUS_CTL, pwc_init_controls() 271 pdev->exposure = v4l2_ctrl_new_std(hdl, &pwc_ctrl_ops, pwc_init_controls() 274 v4l2_ctrl_auto_cluster(2, &pdev->autogain, 0, true); pwc_init_controls() 275 v4l2_ctrl_auto_cluster(2, &pdev->exposure_auto, pwc_init_controls() 277 } else if (DEVICE_USE_CODEC3(pdev->type)) { pwc_init_controls() 279 r = pwc_get_u16_ctrl(pdev, GET_STATUS_CTL, pwc_init_controls() 283 pdev->exposure = v4l2_ctrl_new_std(hdl, &pwc_ctrl_ops, pwc_init_controls() 286 pdev->autogain_expo_cluster[0] = pdev->autogain; pwc_init_controls() 287 pdev->autogain_expo_cluster[1] = pdev->gain; pwc_init_controls() 288 pdev->autogain_expo_cluster[2] = pdev->exposure; pwc_init_controls() 289 v4l2_ctrl_auto_cluster(3, pdev->autogain_expo_cluster, pwc_init_controls() 294 r = pwc_get_u8_ctrl(pdev, GET_CHROM_CTL, COLOUR_MODE_FORMATTER, pwc_init_controls() 299 pdev->colorfx = v4l2_ctrl_new_std_menu(hdl, &pwc_ctrl_ops, pwc_init_controls() 303 r = pwc_get_u8_ctrl(pdev, GET_LUM_CTL, AUTO_CONTOUR_FORMATTER, &def); pwc_init_controls() 308 pdev->autocontour = v4l2_ctrl_new_custom(hdl, &cfg, NULL); pwc_init_controls() 309 if (!pdev->autocontour) pwc_init_controls() 312 r = pwc_get_u8_ctrl(pdev, GET_LUM_CTL, PRESET_CONTOUR_FORMATTER, &def); pwc_init_controls() 317 pdev->contour = v4l2_ctrl_new_custom(hdl, &cfg, NULL); pwc_init_controls() 319 v4l2_ctrl_auto_cluster(2, &pdev->autocontour, 0, false); pwc_init_controls() 322 r = pwc_get_u8_ctrl(pdev, GET_LUM_CTL, pwc_init_controls() 329 pdev->backlight = v4l2_ctrl_new_custom(hdl, &cfg, NULL); pwc_init_controls() 332 r = pwc_get_u8_ctrl(pdev, GET_LUM_CTL, pwc_init_controls() 339 pdev->flicker = v4l2_ctrl_new_custom(hdl, &cfg, NULL); pwc_init_controls() 342 r = pwc_get_u8_ctrl(pdev, GET_LUM_CTL, pwc_init_controls() 348 pdev->noise_reduction = v4l2_ctrl_new_custom(hdl, &cfg, NULL); pwc_init_controls() 351 pdev->save_user = v4l2_ctrl_new_custom(hdl, &pwc_save_user_cfg, NULL); pwc_init_controls() 352 pdev->restore_user = v4l2_ctrl_new_custom(hdl, &pwc_restore_user_cfg, pwc_init_controls() 354 if (pdev->restore_user) pwc_init_controls() 355 pdev->restore_user->flags |= V4L2_CTRL_FLAG_UPDATE; pwc_init_controls() 356 pdev->restore_factory = v4l2_ctrl_new_custom(hdl, pwc_init_controls() 359 if (pdev->restore_factory) pwc_init_controls() 360 pdev->restore_factory->flags |= V4L2_CTRL_FLAG_UPDATE; pwc_init_controls() 363 r = pwc_get_u8_ctrl(pdev, GET_CHROM_CTL, pwc_init_controls() 369 pdev->awb_speed = v4l2_ctrl_new_custom(hdl, &cfg, NULL); pwc_init_controls() 371 r = pwc_get_u8_ctrl(pdev, GET_CHROM_CTL, pwc_init_controls() 377 pdev->awb_delay = v4l2_ctrl_new_custom(hdl, &cfg, NULL); pwc_init_controls() 379 if (!(pdev->features & FEATURE_MOTOR_PANTILT)) pwc_init_controls() 383 pdev->motor_pan = v4l2_ctrl_new_std(hdl, &pwc_ctrl_ops, pwc_init_controls() 385 if (!pdev->motor_pan) pwc_init_controls() 387 pdev->motor_tilt = v4l2_ctrl_new_std(hdl, &pwc_ctrl_ops, pwc_init_controls() 389 pdev->motor_pan_reset = v4l2_ctrl_new_std(hdl, &pwc_ctrl_ops, pwc_init_controls() 391 pdev->motor_tilt_reset = v4l2_ctrl_new_std(hdl, &pwc_ctrl_ops, pwc_init_controls() 393 v4l2_ctrl_cluster(4, &pdev->motor_pan); pwc_init_controls() 422 static int pwc_vidioc_try_fmt(struct pwc_device *pdev, struct v4l2_format *f) pwc_vidioc_try_fmt() argument 435 if (DEVICE_USE_CODEC23(pdev->type)) { pwc_vidioc_try_fmt() 441 if (DEVICE_USE_CODEC1(pdev->type)) { pwc_vidioc_try_fmt() 451 size = pwc_get_size(pdev, f->fmt.pix.width, f->fmt.pix.height); pwc_vidioc_try_fmt() 464 struct pwc_device *pdev = video_drvdata(file); pwc_s_fmt_vid_cap() local 467 ret = pwc_vidioc_try_fmt(pdev, f); pwc_s_fmt_vid_cap() 471 if (vb2_is_busy(&pdev->vb_queue)) pwc_s_fmt_vid_cap() 478 f->fmt.pix.width, f->fmt.pix.height, pdev->vframes, pwc_s_fmt_vid_cap() 484 ret = pwc_set_video_mode(pdev, f->fmt.pix.width, f->fmt.pix.height, pwc_s_fmt_vid_cap() 489 pwc_vidioc_fill_fmt(f, pdev->width, pdev->height, pdev->pixfmt); pwc_s_fmt_vid_cap() 495 struct pwc_device *pdev = video_drvdata(file); pwc_querycap() local 498 strlcpy(cap->card, pdev->vdev.name, sizeof(cap->card)); pwc_querycap() 499 usb_make_path(pdev->udev, cap->bus_info, sizeof(cap->bus_info)); pwc_querycap() 529 struct pwc_device *pdev = pwc_g_volatile_ctrl() local 535 if (pdev->color_bal_valid && pwc_g_volatile_ctrl() 536 (pdev->auto_white_balance->val != awb_auto || pwc_g_volatile_ctrl() 538 pdev->last_color_bal_update + HZ / 4))) { pwc_g_volatile_ctrl() 539 pdev->red_balance->val = pdev->last_red_balance; pwc_g_volatile_ctrl() 540 pdev->blue_balance->val = pdev->last_blue_balance; pwc_g_volatile_ctrl() 543 ret = pwc_get_u8_ctrl(pdev, GET_STATUS_CTL, pwc_g_volatile_ctrl() 545 &pdev->red_balance->val); pwc_g_volatile_ctrl() 548 ret = pwc_get_u8_ctrl(pdev, GET_STATUS_CTL, pwc_g_volatile_ctrl() 550 &pdev->blue_balance->val); pwc_g_volatile_ctrl() 553 pdev->last_red_balance = pdev->red_balance->val; pwc_g_volatile_ctrl() 554 pdev->last_blue_balance = pdev->blue_balance->val; pwc_g_volatile_ctrl() 555 pdev->last_color_bal_update = jiffies; pwc_g_volatile_ctrl() 556 pdev->color_bal_valid = true; pwc_g_volatile_ctrl() 559 if (pdev->gain_valid && time_before(jiffies, pwc_g_volatile_ctrl() 560 pdev->last_gain_update + HZ / 4)) { pwc_g_volatile_ctrl() 561 pdev->gain->val = pdev->last_gain; pwc_g_volatile_ctrl() 564 ret = pwc_get_u8_ctrl(pdev, GET_STATUS_CTL, pwc_g_volatile_ctrl() 565 READ_AGC_FORMATTER, &pdev->gain->val); pwc_g_volatile_ctrl() 568 pdev->last_gain = pdev->gain->val; pwc_g_volatile_ctrl() 569 pdev->last_gain_update = jiffies; pwc_g_volatile_ctrl() 570 pdev->gain_valid = true; pwc_g_volatile_ctrl() 571 if (!DEVICE_USE_CODEC3(pdev->type)) pwc_g_volatile_ctrl() 575 if (pdev->exposure_valid && time_before(jiffies, pwc_g_volatile_ctrl() 576 pdev->last_exposure_update + HZ / 4)) { pwc_g_volatile_ctrl() 577 pdev->exposure->val = pdev->last_exposure; pwc_g_volatile_ctrl() 580 ret = pwc_get_u16_ctrl(pdev, GET_STATUS_CTL, pwc_g_volatile_ctrl() 582 &pdev->exposure->val); pwc_g_volatile_ctrl() 585 pdev->last_exposure = pdev->exposure->val; pwc_g_volatile_ctrl() 586 pdev->last_exposure_update = jiffies; pwc_g_volatile_ctrl() 587 pdev->exposure_valid = true; pwc_g_volatile_ctrl() 599 static int pwc_set_awb(struct pwc_device *pdev) pwc_set_awb() argument 603 if (pdev->auto_white_balance->is_new) { pwc_set_awb() 604 ret = pwc_set_u8_ctrl(pdev, SET_CHROM_CTL, pwc_set_awb() 606 pdev->auto_white_balance->val); pwc_set_awb() 610 if (pdev->auto_white_balance->val != awb_manual) pwc_set_awb() 611 pdev->color_bal_valid = false; /* Force cache update */ pwc_set_awb() 617 if (pdev->auto_white_balance->val == awb_indoor || pwc_set_awb() 618 pdev->auto_white_balance->val == awb_outdoor || pwc_set_awb() 619 pdev->auto_white_balance->val == awb_fl) pwc_set_awb() 620 pwc_g_volatile_ctrl(pdev->auto_white_balance); pwc_set_awb() 622 if (pdev->auto_white_balance->val != awb_manual) pwc_set_awb() 625 if (pdev->red_balance->is_new) { pwc_set_awb() 626 ret = pwc_set_u8_ctrl(pdev, SET_CHROM_CTL, pwc_set_awb() 628 pdev->red_balance->val); pwc_set_awb() 633 if (pdev->blue_balance->is_new) { pwc_set_awb() 634 ret = pwc_set_u8_ctrl(pdev, SET_CHROM_CTL, pwc_set_awb() 636 pdev->blue_balance->val); pwc_set_awb() 644 static int pwc_set_autogain(struct pwc_device *pdev) pwc_set_autogain() argument 648 if (pdev->autogain->is_new) { pwc_set_autogain() 649 ret = pwc_set_u8_ctrl(pdev, SET_LUM_CTL, pwc_set_autogain() 651 pdev->autogain->val ? 0 : 0xff); pwc_set_autogain() 655 if (pdev->autogain->val) pwc_set_autogain() 656 pdev->gain_valid = false; /* Force cache update */ pwc_set_autogain() 659 if (pdev->autogain->val) pwc_set_autogain() 662 if (pdev->gain->is_new) { pwc_set_autogain() 663 ret = pwc_set_u8_ctrl(pdev, SET_LUM_CTL, pwc_set_autogain() 665 pdev->gain->val); pwc_set_autogain() 673 static int pwc_set_exposure_auto(struct pwc_device *pdev) pwc_set_exposure_auto() argument 676 int is_auto = pdev->exposure_auto->val == V4L2_EXPOSURE_AUTO; pwc_set_exposure_auto() 678 if (pdev->exposure_auto->is_new) { pwc_set_exposure_auto() 679 ret = pwc_set_u8_ctrl(pdev, SET_LUM_CTL, pwc_set_exposure_auto() 686 pdev->exposure_valid = false; /* Force cache update */ pwc_set_exposure_auto() 692 if (pdev->exposure->is_new) { pwc_set_exposure_auto() 693 ret = pwc_set_u16_ctrl(pdev, SET_LUM_CTL, pwc_set_exposure_auto() 695 pdev->exposure->val); pwc_set_exposure_auto() 703 static int pwc_set_autogain_expo(struct pwc_device *pdev) pwc_set_autogain_expo() argument 707 if (pdev->autogain->is_new) { pwc_set_autogain_expo() 708 ret = pwc_set_u8_ctrl(pdev, SET_LUM_CTL, pwc_set_autogain_expo() 710 pdev->autogain->val ? 0 : 0xff); pwc_set_autogain_expo() 714 if (pdev->autogain->val) { pwc_set_autogain_expo() 715 pdev->gain_valid = false; /* Force cache update */ pwc_set_autogain_expo() 716 pdev->exposure_valid = false; /* Force cache update */ pwc_set_autogain_expo() 720 if (pdev->autogain->val) pwc_set_autogain_expo() 723 if (pdev->gain->is_new) { pwc_set_autogain_expo() 724 ret = pwc_set_u8_ctrl(pdev, SET_LUM_CTL, pwc_set_autogain_expo() 726 pdev->gain->val); pwc_set_autogain_expo() 731 if (pdev->exposure->is_new) { pwc_set_autogain_expo() 732 ret = pwc_set_u16_ctrl(pdev, SET_LUM_CTL, pwc_set_autogain_expo() 734 pdev->exposure->val); pwc_set_autogain_expo() 741 static int pwc_set_motor(struct pwc_device *pdev) pwc_set_motor() argument 745 pdev->ctrl_buf[0] = 0; pwc_set_motor() 746 if (pdev->motor_pan_reset->is_new) pwc_set_motor() 747 pdev->ctrl_buf[0] |= 0x01; pwc_set_motor() 748 if (pdev->motor_tilt_reset->is_new) pwc_set_motor() 749 pdev->ctrl_buf[0] |= 0x02; pwc_set_motor() 750 if (pdev->motor_pan_reset->is_new || pdev->motor_tilt_reset->is_new) { pwc_set_motor() 751 ret = send_control_msg(pdev, SET_MPT_CTL, pwc_set_motor() 753 pdev->ctrl_buf, 1); pwc_set_motor() 758 memset(pdev->ctrl_buf, 0, 4); pwc_set_motor() 759 if (pdev->motor_pan->is_new) { pwc_set_motor() 760 pdev->ctrl_buf[0] = pdev->motor_pan->val & 0xFF; pwc_set_motor() 761 pdev->ctrl_buf[1] = (pdev->motor_pan->val >> 8); pwc_set_motor() 763 if (pdev->motor_tilt->is_new) { pwc_set_motor() 764 pdev->ctrl_buf[2] = pdev->motor_tilt->val & 0xFF; pwc_set_motor() 765 pdev->ctrl_buf[3] = (pdev->motor_tilt->val >> 8); pwc_set_motor() 767 if (pdev->motor_pan->is_new || pdev->motor_tilt->is_new) { pwc_set_motor() 768 ret = send_control_msg(pdev, SET_MPT_CTL, pwc_set_motor() 770 pdev->ctrl_buf, 4); pwc_set_motor() 780 struct pwc_device *pdev = pwc_s_ctrl() local 786 ret = pwc_set_u8_ctrl(pdev, SET_LUM_CTL, pwc_s_ctrl() 790 ret = pwc_set_u8_ctrl(pdev, SET_LUM_CTL, pwc_s_ctrl() 794 ret = pwc_set_s8_ctrl(pdev, SET_CHROM_CTL, pwc_s_ctrl() 795 pdev->saturation_fmt, ctrl->val); pwc_s_ctrl() 798 ret = pwc_set_u8_ctrl(pdev, SET_LUM_CTL, pwc_s_ctrl() 802 ret = pwc_set_awb(pdev); pwc_s_ctrl() 805 if (DEVICE_USE_CODEC2(pdev->type)) pwc_s_ctrl() 806 ret = pwc_set_autogain(pdev); pwc_s_ctrl() 807 else if (DEVICE_USE_CODEC3(pdev->type)) pwc_s_ctrl() 808 ret = pwc_set_autogain_expo(pdev); pwc_s_ctrl() 813 if (DEVICE_USE_CODEC2(pdev->type)) pwc_s_ctrl() 814 ret = pwc_set_exposure_auto(pdev); pwc_s_ctrl() 819 ret = pwc_set_u8_ctrl(pdev, SET_CHROM_CTL, pwc_s_ctrl() 824 if (pdev->autocontour->is_new) { PWC_CID_CUSTOM() 825 ret = pwc_set_u8_ctrl(pdev, SET_LUM_CTL, PWC_CID_CUSTOM() 827 pdev->autocontour->val ? 0 : 0xff); PWC_CID_CUSTOM() 829 if (ret == 0 && pdev->contour->is_new) { 830 ret = pwc_set_u8_ctrl(pdev, SET_LUM_CTL, 832 pdev->contour->val); 836 ret = pwc_set_u8_ctrl(pdev, SET_LUM_CTL, 841 ret = pwc_set_u8_ctrl(pdev, SET_LUM_CTL, 846 ret = pwc_set_u8_ctrl(pdev, SET_LUM_CTL, 851 ret = pwc_button_ctrl(pdev, SAVE_USER_DEFAULTS_FORMATTER); 854 ret = pwc_button_ctrl(pdev, RESTORE_USER_DEFAULTS_FORMATTER); 857 ret = pwc_button_ctrl(pdev, 861 ret = pwc_set_u8_ctrl(pdev, SET_CHROM_CTL, 866 ret = pwc_set_u8_ctrl(pdev, SET_CHROM_CTL, 871 ret = pwc_set_motor(pdev); 885 struct pwc_device *pdev = video_drvdata(file); pwc_enum_fmt_vid_cap() local 891 f->pixelformat = pdev->type <= 646 ? V4L2_PIX_FMT_PWC1 : V4L2_PIX_FMT_PWC2; pwc_enum_fmt_vid_cap() 907 struct pwc_device *pdev = video_drvdata(file); pwc_g_fmt_vid_cap() local 913 pdev->width, pdev->height); pwc_g_fmt_vid_cap() 914 pwc_vidioc_fill_fmt(f, pdev->width, pdev->height, pdev->pixfmt); pwc_g_fmt_vid_cap() 920 struct pwc_device *pdev = video_drvdata(file); pwc_try_fmt_vid_cap() local 922 return pwc_vidioc_try_fmt(pdev, f); pwc_try_fmt_vid_cap() 928 struct pwc_device *pdev = video_drvdata(file); pwc_enum_framesizes() local 933 DEVICE_USE_CODEC1(pdev->type)) || pwc_enum_framesizes() 935 DEVICE_USE_CODEC23(pdev->type))) { pwc_enum_framesizes() 937 if (!(pdev->image_mask & (1UL << i))) pwc_enum_framesizes() 953 struct pwc_device *pdev = video_drvdata(file); pwc_enum_frameintervals() local 969 i = pwc_get_fps(pdev, fival->index, size); pwc_enum_frameintervals() 983 struct pwc_device *pdev = video_drvdata(file); pwc_g_parm() local 993 parm->parm.capture.timeperframe.denominator = pdev->vframes; pwc_g_parm() 1002 struct pwc_device *pdev = video_drvdata(file); pwc_s_parm() local 1019 if (vb2_is_busy(&pdev->vb_queue)) pwc_s_parm() 1022 ret = pwc_set_video_mode(pdev, pdev->width, pdev->height, pdev->pixfmt, pwc_s_parm()
|
H A D | pwc-if.c | 45 pdev: struct pwc_devive * 120 static void pwc_isoc_cleanup(struct pwc_device *pdev); 159 static struct pwc_frame_buf *pwc_get_next_fill_buf(struct pwc_device *pdev) pwc_get_next_fill_buf() argument 164 spin_lock_irqsave(&pdev->queued_bufs_lock, flags); pwc_get_next_fill_buf() 165 if (list_empty(&pdev->queued_bufs)) pwc_get_next_fill_buf() 168 buf = list_entry(pdev->queued_bufs.next, struct pwc_frame_buf, list); pwc_get_next_fill_buf() 171 spin_unlock_irqrestore(&pdev->queued_bufs_lock, flags); pwc_get_next_fill_buf() 175 static void pwc_snapshot_button(struct pwc_device *pdev, int down) pwc_snapshot_button() argument 184 if (pdev->button_dev) { pwc_snapshot_button() 185 input_report_key(pdev->button_dev, KEY_CAMERA, down); pwc_snapshot_button() 186 input_sync(pdev->button_dev); pwc_snapshot_button() 191 static void pwc_frame_complete(struct pwc_device *pdev) pwc_frame_complete() argument 193 struct pwc_frame_buf *fbuf = pdev->fill_buf; pwc_frame_complete() 199 if (pdev->type == 730) { pwc_frame_complete() 204 pdev->drop_frames += 2; pwc_frame_complete() 206 if ((ptr[0] ^ pdev->vmirror) & 0x01) { pwc_frame_complete() 207 pwc_snapshot_button(pdev, ptr[0] & 0x01); pwc_frame_complete() 209 if ((ptr[0] ^ pdev->vmirror) & 0x02) { pwc_frame_complete() 215 pdev->vmirror = ptr[0] & 0x03; pwc_frame_complete() 226 pdev->drop_frames++; pwc_frame_complete() 227 } else if (pdev->type == 740 || pdev->type == 720) { pwc_frame_complete() 229 if ((ptr[0] ^ pdev->vmirror) & 0x01) { pwc_frame_complete() 230 pwc_snapshot_button(pdev, ptr[0] & 0x01); pwc_frame_complete() 232 pdev->vmirror = ptr[0] & 0x03; pwc_frame_complete() 236 if (pdev->drop_frames > 0) { pwc_frame_complete() 237 pdev->drop_frames--; pwc_frame_complete() 240 if (fbuf->filled < pdev->frame_total_size) { pwc_frame_complete() 245 fbuf->vb.v4l2_buf.sequence = pdev->vframe_count; pwc_frame_complete() 247 pdev->fill_buf = NULL; pwc_frame_complete() 248 pdev->vsync = 0; pwc_frame_complete() 251 pdev->vframe_count++; pwc_frame_complete() 259 struct pwc_device *pdev = (struct pwc_device *)urb->context; pwc_isoc_handler() local 269 if (pdev->fill_buf == NULL) pwc_isoc_handler() 270 pdev->fill_buf = pwc_get_next_fill_buf(pdev); pwc_isoc_handler() 287 if (++pdev->visoc_errors > MAX_ISOC_ERRORS) pwc_isoc_handler() 290 if (pdev->fill_buf) { pwc_isoc_handler() 291 vb2_buffer_done(&pdev->fill_buf->vb, pwc_isoc_handler() 293 pdev->fill_buf = NULL; pwc_isoc_handler() 296 pdev->vsync = 0; /* Drop the current frame */ pwc_isoc_handler() 301 pdev->visoc_errors = 0; pwc_isoc_handler() 316 if (flen > 0 && pdev->vsync) { pwc_isoc_handler() 317 struct pwc_frame_buf *fbuf = pdev->fill_buf; pwc_isoc_handler() 319 if (pdev->vsync == 1) { pwc_isoc_handler() 322 pdev->vsync = 2; pwc_isoc_handler() 325 if (flen + fbuf->filled > pdev->frame_total_size) { pwc_isoc_handler() 328 pdev->frame_total_size); pwc_isoc_handler() 329 pdev->vsync = 0; /* Let's wait for an EOF */ pwc_isoc_handler() 336 if (flen < pdev->vlast_packet_size) { pwc_isoc_handler() 338 if (pdev->vsync == 2) pwc_isoc_handler() 339 pwc_frame_complete(pdev); pwc_isoc_handler() 340 if (pdev->fill_buf == NULL) pwc_isoc_handler() 341 pdev->fill_buf = pwc_get_next_fill_buf(pdev); pwc_isoc_handler() 342 if (pdev->fill_buf) { pwc_isoc_handler() 343 pdev->fill_buf->filled = 0; pwc_isoc_handler() 344 pdev->vsync = 1; pwc_isoc_handler() 347 pdev->vlast_packet_size = flen; pwc_isoc_handler() 357 static int pwc_isoc_init(struct pwc_device *pdev) pwc_isoc_init() argument 366 pdev->vsync = 0; pwc_isoc_init() 367 pdev->vlast_packet_size = 0; pwc_isoc_init() 368 pdev->fill_buf = NULL; pwc_isoc_init() 369 pdev->vframe_count = 0; pwc_isoc_init() 370 pdev->visoc_errors = 0; pwc_isoc_init() 371 udev = pdev->udev; pwc_isoc_init() 376 ret = pwc_set_video_mode(pdev, pdev->width, pdev->height, pdev->pixfmt, pwc_isoc_init() 377 pdev->vframes, &compression, 1); pwc_isoc_init() 382 idesc = usb_altnum_to_altsetting(intf, pdev->valternate); pwc_isoc_init() 387 pdev->vmax_packet_size = -1; pwc_isoc_init() 389 if ((idesc->endpoint[i].desc.bEndpointAddress & 0xF) == pdev->vendpoint) { pwc_isoc_init() 390 pdev->vmax_packet_size = le16_to_cpu(idesc->endpoint[i].desc.wMaxPacketSize); pwc_isoc_init() 395 if (pdev->vmax_packet_size < 0 || pdev->vmax_packet_size > ISO_MAX_FRAME_SIZE) { pwc_isoc_init() 401 PWC_DEBUG_OPEN("Setting alternate interface %d\n", pdev->valternate); pwc_isoc_init() 402 ret = usb_set_interface(pdev->udev, 0, pdev->valternate); pwc_isoc_init() 415 pwc_isoc_cleanup(pdev); pwc_isoc_init() 418 pdev->urbs[i] = urb; pwc_isoc_init() 423 urb->pipe = usb_rcvisocpipe(udev, pdev->vendpoint); pwc_isoc_init() 431 pwc_isoc_cleanup(pdev); pwc_isoc_init() 436 urb->context = pdev; pwc_isoc_init() 441 urb->iso_frame_desc[j].length = pdev->vmax_packet_size; pwc_isoc_init() 447 ret = usb_submit_urb(pdev->urbs[i], GFP_KERNEL); pwc_isoc_init() 450 pwc_isoc_cleanup(pdev); pwc_isoc_init() 455 pwc_isoc_cleanup(pdev); pwc_isoc_init() 458 PWC_DEBUG_MEMORY("URB 0x%p submitted.\n", pdev->urbs[i]); pwc_isoc_init() 466 static void pwc_iso_stop(struct pwc_device *pdev) pwc_iso_stop() argument 472 if (pdev->urbs[i]) { pwc_iso_stop() 473 PWC_DEBUG_MEMORY("Unlinking URB %p\n", pdev->urbs[i]); pwc_iso_stop() 474 usb_kill_urb(pdev->urbs[i]); pwc_iso_stop() 479 static void pwc_iso_free(struct pwc_device *pdev) pwc_iso_free() argument 485 if (pdev->urbs[i]) { pwc_iso_free() 487 if (pdev->urbs[i]->transfer_buffer) { pwc_iso_free() 488 usb_free_coherent(pdev->udev, pwc_iso_free() 489 pdev->urbs[i]->transfer_buffer_length, pwc_iso_free() 490 pdev->urbs[i]->transfer_buffer, pwc_iso_free() 491 pdev->urbs[i]->transfer_dma); pwc_iso_free() 493 usb_free_urb(pdev->urbs[i]); pwc_iso_free() 494 pdev->urbs[i] = NULL; pwc_iso_free() 500 static void pwc_isoc_cleanup(struct pwc_device *pdev) pwc_isoc_cleanup() argument 504 pwc_iso_stop(pdev); pwc_isoc_cleanup() 505 pwc_iso_free(pdev); pwc_isoc_cleanup() 506 usb_set_interface(pdev->udev, 0, 0); pwc_isoc_cleanup() 512 static void pwc_cleanup_queued_bufs(struct pwc_device *pdev, pwc_cleanup_queued_bufs() argument 517 spin_lock_irqsave(&pdev->queued_bufs_lock, flags); pwc_cleanup_queued_bufs() 518 while (!list_empty(&pdev->queued_bufs)) { pwc_cleanup_queued_bufs() 521 buf = list_entry(pdev->queued_bufs.next, struct pwc_frame_buf, pwc_cleanup_queued_bufs() 526 spin_unlock_irqrestore(&pdev->queued_bufs_lock, flags); pwc_cleanup_queued_bufs() 564 struct pwc_device *pdev = container_of(v, struct pwc_device, v4l2_dev); pwc_video_release() local 566 v4l2_ctrl_handler_free(&pdev->ctrl_handler); pwc_video_release() 567 v4l2_device_unregister(&pdev->v4l2_dev); pwc_video_release() 568 kfree(pdev->ctrl_buf); pwc_video_release() 569 kfree(pdev); pwc_video_release() 579 struct pwc_device *pdev = vb2_get_drv_priv(vq); queue_setup() local 589 size = pwc_get_size(pdev, MAX_WIDTH, MAX_HEIGHT); queue_setup() 610 struct pwc_device *pdev = vb2_get_drv_priv(vb->vb2_queue); buffer_prepare() local 613 if (!pdev->udev) buffer_prepare() 621 struct pwc_device *pdev = vb2_get_drv_priv(vb->vb2_queue); buffer_finish() local 631 pwc_decompress(pdev, buf); buffer_finish() 644 struct pwc_device *pdev = vb2_get_drv_priv(vb->vb2_queue); buffer_queue() local 649 if (!pdev->udev) { buffer_queue() 654 spin_lock_irqsave(&pdev->queued_bufs_lock, flags); buffer_queue() 655 list_add_tail(&buf->list, &pdev->queued_bufs); buffer_queue() 656 spin_unlock_irqrestore(&pdev->queued_bufs_lock, flags); buffer_queue() 661 struct pwc_device *pdev = vb2_get_drv_priv(vq); start_streaming() local 664 if (!pdev->udev) start_streaming() 667 if (mutex_lock_interruptible(&pdev->v4l2_lock)) start_streaming() 670 pwc_camera_power(pdev, 1); start_streaming() 671 pwc_set_leds(pdev, leds[0], leds[1]); start_streaming() 673 r = pwc_isoc_init(pdev); start_streaming() 676 pwc_set_leds(pdev, 0, 0); start_streaming() 677 pwc_camera_power(pdev, 0); start_streaming() 679 pwc_cleanup_queued_bufs(pdev, VB2_BUF_STATE_QUEUED); start_streaming() 681 mutex_unlock(&pdev->v4l2_lock); start_streaming() 688 struct pwc_device *pdev = vb2_get_drv_priv(vq); stop_streaming() local 690 mutex_lock(&pdev->v4l2_lock); stop_streaming() 691 if (pdev->udev) { stop_streaming() 692 pwc_set_leds(pdev, 0, 0); stop_streaming() 693 pwc_camera_power(pdev, 0); stop_streaming() 694 pwc_isoc_cleanup(pdev); stop_streaming() 697 pwc_cleanup_queued_bufs(pdev, VB2_BUF_STATE_ERROR); stop_streaming() 698 if (pdev->fill_buf) stop_streaming() 699 vb2_buffer_done(&pdev->fill_buf->vb, VB2_BUF_STATE_ERROR); stop_streaming() 700 mutex_unlock(&pdev->v4l2_lock); stop_streaming() 726 struct pwc_device *pdev = NULL; usb_pwc_probe() local 989 pdev = kzalloc(sizeof(struct pwc_device), GFP_KERNEL); usb_pwc_probe() 990 if (pdev == NULL) { usb_pwc_probe() 994 pdev->type = type_id; usb_pwc_probe() 995 pdev->features = features; usb_pwc_probe() 996 pwc_construct(pdev); /* set min/max sizes correct */ usb_pwc_probe() 998 mutex_init(&pdev->v4l2_lock); usb_pwc_probe() 999 mutex_init(&pdev->vb_queue_lock); usb_pwc_probe() 1000 spin_lock_init(&pdev->queued_bufs_lock); usb_pwc_probe() 1001 INIT_LIST_HEAD(&pdev->queued_bufs); usb_pwc_probe() 1003 pdev->udev = udev; usb_pwc_probe() 1004 pdev->power_save = my_power_save; usb_pwc_probe() 1007 pdev->vb_queue.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; usb_pwc_probe() 1008 pdev->vb_queue.io_modes = VB2_MMAP | VB2_USERPTR | VB2_READ; usb_pwc_probe() 1009 pdev->vb_queue.drv_priv = pdev; usb_pwc_probe() 1010 pdev->vb_queue.buf_struct_size = sizeof(struct pwc_frame_buf); usb_pwc_probe() 1011 pdev->vb_queue.ops = &pwc_vb_queue_ops; usb_pwc_probe() 1012 pdev->vb_queue.mem_ops = &vb2_vmalloc_memops; usb_pwc_probe() 1013 pdev->vb_queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; usb_pwc_probe() 1014 rc = vb2_queue_init(&pdev->vb_queue); usb_pwc_probe() 1021 pdev->vdev = pwc_template; usb_pwc_probe() 1022 strcpy(pdev->vdev.name, name); usb_pwc_probe() 1023 pdev->vdev.queue = &pdev->vb_queue; usb_pwc_probe() 1024 pdev->vdev.queue->lock = &pdev->vb_queue_lock; usb_pwc_probe() 1025 video_set_drvdata(&pdev->vdev, pdev); usb_pwc_probe() 1027 pdev->release = le16_to_cpu(udev->descriptor.bcdDevice); usb_pwc_probe() 1028 PWC_DEBUG_PROBE("Release: %04x\n", pdev->release); usb_pwc_probe() 1031 pdev->ctrl_buf = kmalloc(sizeof(pdev->cmd_buf), GFP_KERNEL); usb_pwc_probe() 1032 if (!pdev->ctrl_buf) { usb_pwc_probe() 1040 if (pwc_get_cmos_sensor(pdev, &rc) >= 0) { usb_pwc_probe() 1042 pdev->vdev.name, usb_pwc_probe() 1048 pwc_set_leds(pdev, 0, 0); usb_pwc_probe() 1051 rc = pwc_set_video_mode(pdev, MAX_WIDTH, MAX_HEIGHT, usb_pwc_probe() 1057 rc = pwc_init_controls(pdev); usb_pwc_probe() 1064 pwc_camera_power(pdev, 0); usb_pwc_probe() 1067 pdev->v4l2_dev.release = pwc_video_release; usb_pwc_probe() 1068 rc = v4l2_device_register(&intf->dev, &pdev->v4l2_dev); usb_pwc_probe() 1074 pdev->v4l2_dev.ctrl_handler = &pdev->ctrl_handler; usb_pwc_probe() 1075 pdev->vdev.v4l2_dev = &pdev->v4l2_dev; usb_pwc_probe() 1076 pdev->vdev.lock = &pdev->v4l2_lock; usb_pwc_probe() 1078 rc = video_register_device(&pdev->vdev, VFL_TYPE_GRABBER, -1); usb_pwc_probe() 1083 PWC_INFO("Registered as %s.\n", video_device_node_name(&pdev->vdev)); usb_pwc_probe() 1087 pdev->button_dev = input_allocate_device(); usb_pwc_probe() 1088 if (!pdev->button_dev) { usb_pwc_probe() 1093 usb_make_path(udev, pdev->button_phys, sizeof(pdev->button_phys)); usb_pwc_probe() 1094 strlcat(pdev->button_phys, "/input0", sizeof(pdev->button_phys)); usb_pwc_probe() 1096 pdev->button_dev->name = "PWC snapshot button"; usb_pwc_probe() 1097 pdev->button_dev->phys = pdev->button_phys; usb_pwc_probe() 1098 usb_to_input_id(pdev->udev, &pdev->button_dev->id); usb_pwc_probe() 1099 pdev->button_dev->dev.parent = &pdev->udev->dev; usb_pwc_probe() 1100 pdev->button_dev->evbit[0] = BIT_MASK(EV_KEY); usb_pwc_probe() 1101 pdev->button_dev->keybit[BIT_WORD(KEY_CAMERA)] = BIT_MASK(KEY_CAMERA); usb_pwc_probe() 1103 rc = input_register_device(pdev->button_dev); usb_pwc_probe() 1105 input_free_device(pdev->button_dev); usb_pwc_probe() 1106 pdev->button_dev = NULL; usb_pwc_probe() 1114 video_unregister_device(&pdev->vdev); usb_pwc_probe() 1116 v4l2_device_unregister(&pdev->v4l2_dev); usb_pwc_probe() 1118 v4l2_ctrl_handler_free(&pdev->ctrl_handler); usb_pwc_probe() 1120 kfree(pdev->ctrl_buf); usb_pwc_probe() 1121 kfree(pdev); usb_pwc_probe() 1129 struct pwc_device *pdev = container_of(v, struct pwc_device, v4l2_dev); usb_pwc_disconnect() local 1131 mutex_lock(&pdev->vb_queue_lock); usb_pwc_disconnect() 1132 mutex_lock(&pdev->v4l2_lock); usb_pwc_disconnect() 1134 if (pdev->vb_queue.streaming) usb_pwc_disconnect() 1135 pwc_isoc_cleanup(pdev); usb_pwc_disconnect() 1136 pdev->udev = NULL; usb_pwc_disconnect() 1138 v4l2_device_disconnect(&pdev->v4l2_dev); usb_pwc_disconnect() 1139 video_unregister_device(&pdev->vdev); usb_pwc_disconnect() 1140 mutex_unlock(&pdev->v4l2_lock); usb_pwc_disconnect() 1141 mutex_unlock(&pdev->vb_queue_lock); usb_pwc_disconnect() 1144 if (pdev->button_dev) usb_pwc_disconnect() 1145 input_unregister_device(pdev->button_dev); usb_pwc_disconnect() 1148 v4l2_device_put(&pdev->v4l2_dev); usb_pwc_disconnect()
|
H A D | pwc-uncompress.c | 36 int pwc_decompress(struct pwc_device *pdev, struct pwc_frame_buf *fbuf) pwc_decompress() argument 45 yuv = fbuf->data + pdev->frame_header_size; /* Skip header */ pwc_decompress() 48 if (pdev->pixfmt != V4L2_PIX_FMT_YUV420) pwc_decompress() 51 raw_frame->type = cpu_to_le16(pdev->type); pwc_decompress() 52 raw_frame->vbandlength = cpu_to_le16(pdev->vbandlength); pwc_decompress() 56 memcpy(raw_frame->cmd, pdev->cmd_buf, 4); pwc_decompress() 57 memcpy(raw_frame+1, yuv, pdev->frame_size); pwc_decompress() 59 pdev->frame_size + sizeof(struct pwc_raw_frame)); pwc_decompress() 64 pdev->width * pdev->height * 3 / 2); pwc_decompress() 66 if (pdev->vbandlength == 0) { pwc_decompress() 73 n = pdev->width * pdev->height; pwc_decompress() 78 for (line = 0; line < pdev->height; line++) { pwc_decompress() 79 for (col = 0; col < pdev->width; col += 4) { pwc_decompress() 97 if (DEVICE_USE_CODEC1(pdev->type)) { pwc_decompress() 104 pwc_dec23_decompress(pdev, yuv, image); pwc_decompress()
|
/linux-4.1.27/drivers/mmc/host/ |
H A D | sdhci-pci-o2micro.c | 27 pci_read_config_dword(chip->pdev, o2_pci_set_baseclk() 33 pci_write_config_dword(chip->pdev, o2_pci_set_baseclk() 43 ret = pci_read_config_dword(chip->pdev, o2_pci_led_enable() 49 pci_write_config_dword(chip->pdev, o2_pci_led_enable() 52 ret = pci_read_config_dword(chip->pdev, o2_pci_led_enable() 58 pci_write_config_dword(chip->pdev, o2_pci_led_enable() 68 ret = pci_read_config_dword(chip->pdev, O2_SD_DEV_CTRL, &scratch_32); sdhci_pci_o2_fujin2_pci_init() 72 pci_write_config_dword(chip->pdev, O2_SD_DEV_CTRL, scratch_32); sdhci_pci_o2_fujin2_pci_init() 75 ret = pci_read_config_dword(chip->pdev, O2_SD_MISC_REG5, &scratch_32); sdhci_pci_o2_fujin2_pci_init() 80 pci_write_config_dword(chip->pdev, O2_SD_MISC_REG5, scratch_32); sdhci_pci_o2_fujin2_pci_init() 83 ret = pci_read_config_dword(chip->pdev, O2_SD_TEST_REG, &scratch_32); sdhci_pci_o2_fujin2_pci_init() 87 pci_write_config_dword(chip->pdev, O2_SD_TEST_REG, scratch_32); sdhci_pci_o2_fujin2_pci_init() 90 pci_write_config_dword(chip->pdev, O2_SD_DELAY_CTRL, 0x00002492); sdhci_pci_o2_fujin2_pci_init() 93 ret = pci_read_config_dword(chip->pdev, O2_SD_LD0_CTRL, &scratch_32); sdhci_pci_o2_fujin2_pci_init() 97 pci_write_config_dword(chip->pdev, O2_SD_LD0_CTRL, scratch_32); sdhci_pci_o2_fujin2_pci_init() 100 ret = pci_read_config_dword(chip->pdev, O2_SD_CAP_REG0, &scratch_32); sdhci_pci_o2_fujin2_pci_init() 105 pci_write_config_dword(chip->pdev, O2_SD_CAP_REG0, scratch_32); sdhci_pci_o2_fujin2_pci_init() 107 ret = pci_read_config_dword(chip->pdev, sdhci_pci_o2_fujin2_pci_init() 113 pci_write_config_dword(chip->pdev, O2_SD_TUNING_CTRL, scratch_32); sdhci_pci_o2_fujin2_pci_init() 116 ret = pci_read_config_dword(chip->pdev, sdhci_pci_o2_fujin2_pci_init() 122 pci_write_config_dword(chip->pdev, O2_SD_UHS2_L1_CTRL, scratch_32); sdhci_pci_o2_fujin2_pci_init() 125 ret = pci_read_config_dword(chip->pdev, O2_SD_FUNC_REG3, &scratch_32); sdhci_pci_o2_fujin2_pci_init() 130 pci_write_config_dword(chip->pdev, O2_SD_FUNC_REG3, scratch_32); sdhci_pci_o2_fujin2_pci_init() 133 ret = pci_read_config_dword(chip->pdev, O2_SD_CAPS, &scratch_32); sdhci_pci_o2_fujin2_pci_init() 138 pci_write_config_dword(chip->pdev, O2_SD_CAPS, scratch_32); sdhci_pci_o2_fujin2_pci_init() 140 ret = pci_read_config_dword(chip->pdev, sdhci_pci_o2_fujin2_pci_init() 146 pci_write_config_dword(chip->pdev, O2_SD_MISC_CTRL4, scratch_32); sdhci_pci_o2_fujin2_pci_init() 158 switch (chip->pdev->device) { sdhci_pci_o2_probe_slot() 168 if (chip->pdev->device != PCI_DEVICE_ID_O2_FUJIN2) sdhci_pci_o2_probe_slot() 190 switch (chip->pdev->device) { sdhci_pci_o2_probe() 196 ret = pci_read_config_byte(chip->pdev, sdhci_pci_o2_probe() 201 pci_write_config_byte(chip->pdev, O2_SD_LOCK_WP, scratch); sdhci_pci_o2_probe() 204 pci_write_config_byte(chip->pdev, O2_SD_MULTI_VCC3V, 0x08); sdhci_pci_o2_probe() 207 ret = pci_read_config_byte(chip->pdev, sdhci_pci_o2_probe() 212 pci_write_config_byte(chip->pdev, O2_SD_CLKREQ, scratch); sdhci_pci_o2_probe() 217 ret = pci_read_config_byte(chip->pdev, O2_SD_CAPS, &scratch); sdhci_pci_o2_probe() 221 pci_write_config_byte(chip->pdev, O2_SD_CAPS, scratch); sdhci_pci_o2_probe() 222 pci_write_config_byte(chip->pdev, O2_SD_CAPS, 0x73); sdhci_pci_o2_probe() 225 pci_write_config_byte(chip->pdev, O2_SD_ADMA1, 0x39); sdhci_pci_o2_probe() 226 pci_write_config_byte(chip->pdev, O2_SD_ADMA2, 0x08); sdhci_pci_o2_probe() 229 ret = pci_read_config_byte(chip->pdev, sdhci_pci_o2_probe() 234 pci_write_config_byte(chip->pdev, O2_SD_INF_MOD, scratch); sdhci_pci_o2_probe() 237 ret = pci_read_config_byte(chip->pdev, sdhci_pci_o2_probe() 242 pci_write_config_byte(chip->pdev, O2_SD_LOCK_WP, scratch); sdhci_pci_o2_probe() 248 ret = pci_read_config_byte(chip->pdev, sdhci_pci_o2_probe() 254 pci_write_config_byte(chip->pdev, O2_SD_LOCK_WP, scratch); sdhci_pci_o2_probe() 257 if (chip->pdev->device == PCI_DEVICE_ID_O2_FUJIN2) { sdhci_pci_o2_probe() 258 ret = pci_read_config_dword(chip->pdev, sdhci_pci_o2_probe() 269 ret = pci_read_config_dword(chip->pdev, sdhci_pci_o2_probe() 275 pci_write_config_dword(chip->pdev, sdhci_pci_o2_probe() 280 pci_write_config_byte(chip->pdev, sdhci_pci_o2_probe() 291 ret = pci_read_config_dword(chip->pdev, sdhci_pci_o2_probe() 298 pci_write_config_dword(chip->pdev, sdhci_pci_o2_probe() 301 ret = pci_read_config_dword(chip->pdev, sdhci_pci_o2_probe() 306 pci_write_config_dword(chip->pdev, O2_SD_CLKREQ, scratch_32); sdhci_pci_o2_probe() 308 ret = pci_read_config_dword(chip->pdev, sdhci_pci_o2_probe() 315 pci_write_config_dword(chip->pdev, sdhci_pci_o2_probe() 319 ret = pci_read_config_dword(chip->pdev, sdhci_pci_o2_probe() 324 pci_write_config_dword(chip->pdev, sdhci_pci_o2_probe() 327 if (chip->pdev->device == PCI_DEVICE_ID_O2_FUJIN2) sdhci_pci_o2_probe() 331 ret = pci_read_config_byte(chip->pdev, sdhci_pci_o2_probe() 336 pci_write_config_byte(chip->pdev, O2_SD_LOCK_WP, scratch); sdhci_pci_o2_probe() 341 ret = pci_read_config_byte(chip->pdev, sdhci_pci_o2_probe() 347 pci_write_config_byte(chip->pdev, O2_SD_LOCK_WP, scratch); sdhci_pci_o2_probe() 349 ret = pci_read_config_dword(chip->pdev, sdhci_pci_o2_probe() 356 pci_write_config_dword(chip->pdev, sdhci_pci_o2_probe() 362 pci_write_config_dword(chip->pdev, sdhci_pci_o2_probe() 365 ret = pci_read_config_dword(chip->pdev, sdhci_pci_o2_probe() 369 pci_write_config_dword(chip->pdev, sdhci_pci_o2_probe() 374 pci_write_config_byte(chip->pdev, sdhci_pci_o2_probe() 377 ret = pci_read_config_byte(chip->pdev, sdhci_pci_o2_probe() 382 pci_write_config_byte(chip->pdev, O2_SD_LOCK_WP, scratch); sdhci_pci_o2_probe()
|
H A D | dw_mmc-pci.c | 39 static int dw_mci_pci_probe(struct pci_dev *pdev, dw_mci_pci_probe() argument 45 ret = pcim_enable_device(pdev); dw_mci_pci_probe() 49 host = devm_kzalloc(&pdev->dev, sizeof(struct dw_mci), GFP_KERNEL); dw_mci_pci_probe() 53 host->irq = pdev->irq; dw_mci_pci_probe() 55 host->dev = &pdev->dev; dw_mci_pci_probe() 58 ret = pcim_iomap_regions(pdev, 1 << PCI_BAR_NO, pci_name(pdev)); dw_mci_pci_probe() 62 host->regs = pcim_iomap_table(pdev)[PCI_BAR_NO]; dw_mci_pci_probe() 64 pci_set_master(pdev); dw_mci_pci_probe() 70 pci_set_drvdata(pdev, host); dw_mci_pci_probe() 75 static void dw_mci_pci_remove(struct pci_dev *pdev) dw_mci_pci_remove() argument 77 struct dw_mci *host = pci_get_drvdata(pdev); dw_mci_pci_remove() 85 struct pci_dev *pdev = to_pci_dev(dev); dw_mci_pci_suspend() local 86 struct dw_mci *host = pci_get_drvdata(pdev); dw_mci_pci_suspend() 93 struct pci_dev *pdev = to_pci_dev(dev); dw_mci_pci_resume() local 94 struct dw_mci *host = pci_get_drvdata(pdev); dw_mci_pci_resume()
|
H A D | sdhci-pci-data.c | 4 struct sdhci_pci_data *(*sdhci_pci_get_data)(struct pci_dev *pdev, int slotno);
|
H A D | tmio_mmc.c | 29 struct platform_device *pdev = to_platform_device(dev); tmio_mmc_suspend() local 30 const struct mfd_cell *cell = mfd_get_cell(pdev); tmio_mmc_suspend() 37 cell->disable(pdev); tmio_mmc_suspend() 44 struct platform_device *pdev = to_platform_device(dev); tmio_mmc_resume() local 45 const struct mfd_cell *cell = mfd_get_cell(pdev); tmio_mmc_resume() 50 ret = cell->resume(pdev); tmio_mmc_resume() 59 static int tmio_mmc_probe(struct platform_device *pdev) tmio_mmc_probe() argument 61 const struct mfd_cell *cell = mfd_get_cell(pdev); tmio_mmc_probe() 67 if (pdev->num_resources != 2) tmio_mmc_probe() 70 pdata = pdev->dev.platform_data; tmio_mmc_probe() 74 irq = platform_get_irq(pdev, 0); tmio_mmc_probe() 82 ret = cell->enable(pdev); tmio_mmc_probe() 87 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); tmio_mmc_probe() 93 host = tmio_mmc_host_alloc(pdev); tmio_mmc_probe() 105 dev_name(&pdev->dev), host); tmio_mmc_probe() 120 cell->disable(pdev); tmio_mmc_probe() 125 static int tmio_mmc_remove(struct platform_device *pdev) tmio_mmc_remove() argument 127 const struct mfd_cell *cell = mfd_get_cell(pdev); tmio_mmc_remove() 128 struct mmc_host *mmc = platform_get_drvdata(pdev); tmio_mmc_remove() 132 free_irq(platform_get_irq(pdev, 0), host); tmio_mmc_remove() 135 cell->disable(pdev); tmio_mmc_remove()
|
H A D | toshsd.c | 41 pci_write_config_byte(host->pdev, SD_PCICFG_CLKSTOP, toshsd_init() 43 pci_write_config_byte(host->pdev, SD_PCICFG_CARDDETECT, 2); toshsd_init() 61 pci_write_config_byte(host->pdev, SD_PCICFG_SDLED_ENABLE1, toshsd_init() 63 pci_write_config_byte(host->pdev, SD_PCICFG_SDLED_ENABLE2, toshsd_init() 95 pci_write_config_byte(host->pdev, SD_PCICFG_CLKMODE, __toshsd_set_ios() 99 pci_write_config_byte(host->pdev, SD_PCICFG_CLKMODE, 0); __toshsd_set_ios() 110 pci_write_config_byte(host->pdev, SD_PCICFG_POWER1, __toshsd_set_ios() 117 pci_write_config_byte(host->pdev, SD_PCICFG_POWER1, __toshsd_set_ios() 119 pci_write_config_byte(host->pdev, SD_PCICFG_POWER2, __toshsd_set_ios() 169 dev_warn(&host->pdev->dev, "Spurious Data IRQ\n"); toshsd_thread_irq() 190 dev_dbg(&host->pdev->dev, "count: %08x, flags %08x\n", count, toshsd_thread_irq() 215 dev_warn(&host->pdev->dev, "Spurious CMD irq\n"); toshsd_cmd_irq() 257 dev_dbg(&host->pdev->dev, "Command IRQ complete %d %d %x\n", toshsd_cmd_irq() 275 dev_warn(&host->pdev->dev, "Spurious data end IRQ\n"); toshsd_data_end_irq() 284 dev_dbg(&host->pdev->dev, "Completed data request xfr=%d\n", toshsd_data_end_irq() 303 dev_dbg(&host->pdev->dev, "IRQ status:%x mask:%x\n", toshsd_irq() 314 dev_dbg(&host->pdev->dev, "Timeout\n"); toshsd_irq() 317 dev_err(&host->pdev->dev, "BadCRC\n"); toshsd_irq() 324 dev_err(&host->pdev->dev, "Buffer status error: { %s%s%s%s%s%s}\n", toshsd_irq() 333 dev_err(&host->pdev->dev, "detail error status { %s%s%s%s%s%s%s%s%s%s%s%s%s}\n", toshsd_irq() 410 dev_dbg(&host->pdev->dev, "Command opcode: %d\n", cmd->opcode); toshsd_start_cmd() 444 dev_err(&host->pdev->dev, "Unknown response type %d\n", toshsd_start_cmd() 481 dev_dbg(&host->pdev->dev, "setup data transfer: blocksize %08x nr_blocks %d, offset: %08x\n", toshsd_start_data() 568 pci_write_config_byte(host->pdev, SD_PCICFG_POWER1, SD_PCICFG_PWR1_OFF); toshsd_powerdown() 570 pci_write_config_byte(host->pdev, SD_PCICFG_CLKSTOP, 0); toshsd_powerdown() 576 struct pci_dev *pdev = to_pci_dev(dev); toshsd_pm_suspend() local 577 struct toshsd_host *host = pci_get_drvdata(pdev); toshsd_pm_suspend() 581 pci_save_state(pdev); toshsd_pm_suspend() 582 pci_enable_wake(pdev, PCI_D3hot, 0); toshsd_pm_suspend() 583 pci_disable_device(pdev); toshsd_pm_suspend() 584 pci_set_power_state(pdev, PCI_D3hot); toshsd_pm_suspend() 591 struct pci_dev *pdev = to_pci_dev(dev); toshsd_pm_resume() local 592 struct toshsd_host *host = pci_get_drvdata(pdev); toshsd_pm_resume() 595 pci_set_power_state(pdev, PCI_D0); toshsd_pm_resume() 596 pci_restore_state(pdev); toshsd_pm_resume() 597 ret = pci_enable_device(pdev); toshsd_pm_resume() 607 static int toshsd_probe(struct pci_dev *pdev, const struct pci_device_id *ent) toshsd_probe() argument 614 ret = pci_enable_device(pdev); toshsd_probe() 618 mmc = mmc_alloc_host(sizeof(struct toshsd_host), &pdev->dev); toshsd_probe() 627 host->pdev = pdev; toshsd_probe() 628 pci_set_drvdata(pdev, host); toshsd_probe() 630 ret = pci_request_regions(pdev, DRIVER_NAME); toshsd_probe() 634 host->ioaddr = pci_iomap(pdev, 0, 0); toshsd_probe() 652 ret = request_threaded_irq(pdev->irq, toshsd_irq, toshsd_thread_irq, toshsd_probe() 659 base = pci_resource_start(pdev, 0); toshsd_probe() 660 dev_dbg(&pdev->dev, "MMIO %pa, IRQ %d\n", &base, pdev->irq); toshsd_probe() 662 pm_suspend_ignore_children(&pdev->dev, 1); toshsd_probe() 667 pci_iounmap(pdev, host->ioaddr); toshsd_probe() 669 pci_release_regions(pdev); toshsd_probe() 672 pci_set_drvdata(pdev, NULL); toshsd_probe() 674 pci_disable_device(pdev); toshsd_probe() 678 static void toshsd_remove(struct pci_dev *pdev) toshsd_remove() argument 680 struct toshsd_host *host = pci_get_drvdata(pdev); toshsd_remove() 684 free_irq(pdev->irq, host); toshsd_remove() 685 pci_iounmap(pdev, host->ioaddr); toshsd_remove() 686 pci_release_regions(pdev); toshsd_remove() 688 pci_set_drvdata(pdev, NULL); toshsd_remove() 689 pci_disable_device(pdev); toshsd_remove()
|
H A D | dw_mmc-pltfm.c | 42 int dw_mci_pltfm_register(struct platform_device *pdev, dw_mci_pltfm_register() argument 48 host = devm_kzalloc(&pdev->dev, sizeof(struct dw_mci), GFP_KERNEL); dw_mci_pltfm_register() 52 host->irq = platform_get_irq(pdev, 0); dw_mci_pltfm_register() 57 host->dev = &pdev->dev; dw_mci_pltfm_register() 59 host->pdata = pdev->dev.platform_data; dw_mci_pltfm_register() 61 regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); dw_mci_pltfm_register() 62 host->regs = devm_ioremap_resource(&pdev->dev, regs); dw_mci_pltfm_register() 66 platform_set_drvdata(pdev, host); dw_mci_pltfm_register() 103 static int dw_mci_pltfm_probe(struct platform_device *pdev) dw_mci_pltfm_probe() argument 108 if (pdev->dev.of_node) { dw_mci_pltfm_probe() 109 match = of_match_node(dw_mci_pltfm_match, pdev->dev.of_node); dw_mci_pltfm_probe() 113 return dw_mci_pltfm_register(pdev, drv_data); dw_mci_pltfm_probe() 116 int dw_mci_pltfm_remove(struct platform_device *pdev) dw_mci_pltfm_remove() argument 118 struct dw_mci *host = platform_get_drvdata(pdev); dw_mci_pltfm_remove()
|
H A D | sdhci-spear.c | 58 static int sdhci_probe(struct platform_device *pdev) sdhci_probe() argument 66 dev = pdev->dev.parent ? pdev->dev.parent : &pdev->dev; sdhci_probe() 70 dev_dbg(&pdev->dev, "cannot allocate memory for sdhci\n"); sdhci_probe() 74 iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); sdhci_probe() 75 host->ioaddr = devm_ioremap_resource(&pdev->dev, iomem); sdhci_probe() 78 dev_dbg(&pdev->dev, "unable to map iomem: %d\n", ret); sdhci_probe() 84 host->irq = platform_get_irq(pdev, 0); sdhci_probe() 90 sdhci->clk = devm_clk_get(&pdev->dev, NULL); sdhci_probe() 93 dev_dbg(&pdev->dev, "Error getting clock\n"); sdhci_probe() 99 dev_dbg(&pdev->dev, "Error enabling clock\n"); sdhci_probe() 105 dev_dbg(&pdev->dev, "Error setting desired clk, clk=%lu\n", sdhci_probe() 108 sdhci_probe_config_dt(pdev->dev.of_node, sdhci); sdhci_probe() 117 dev_dbg(&pdev->dev, sdhci_probe() 126 dev_dbg(&pdev->dev, "error adding host\n"); sdhci_probe() 130 platform_set_drvdata(pdev, host); sdhci_probe() 139 dev_err(&pdev->dev, "spear-sdhci probe failed: %d\n", ret); sdhci_probe() 143 static int sdhci_remove(struct platform_device *pdev) sdhci_remove() argument 145 struct sdhci_host *host = platform_get_drvdata(pdev); sdhci_remove()
|
H A D | sh_mobile_sdhi.c | 114 static int sh_mobile_sdhi_clk_enable(struct platform_device *pdev, unsigned int *f) sh_mobile_sdhi_clk_enable() argument 116 struct mmc_host *mmc = platform_get_drvdata(pdev); sh_mobile_sdhi_clk_enable() 131 static void sh_mobile_sdhi_clk_disable(struct platform_device *pdev) sh_mobile_sdhi_clk_disable() argument 133 struct mmc_host *mmc = platform_get_drvdata(pdev); sh_mobile_sdhi_clk_disable() 147 dev_warn(&host->pdev->dev, "timeout waiting for SD bus idle\n"); sh_mobile_sdhi_wait_idle() 198 static int sh_mobile_sdhi_probe(struct platform_device *pdev) sh_mobile_sdhi_probe() argument 201 of_match_device(sh_mobile_sdhi_of_match, &pdev->dev); sh_mobile_sdhi_probe() 204 struct tmio_mmc_data *mmd = pdev->dev.platform_data; sh_mobile_sdhi_probe() 211 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); sh_mobile_sdhi_probe() 215 priv = devm_kzalloc(&pdev->dev, sizeof(struct sh_mobile_sdhi), GFP_KERNEL); sh_mobile_sdhi_probe() 217 dev_err(&pdev->dev, "kzalloc failed\n"); sh_mobile_sdhi_probe() 224 priv->clk = devm_clk_get(&pdev->dev, NULL); sh_mobile_sdhi_probe() 227 dev_err(&pdev->dev, "cannot get clock: %d\n", ret); sh_mobile_sdhi_probe() 231 host = tmio_mmc_host_alloc(pdev); sh_mobile_sdhi_probe() 296 irq = platform_get_irq_byname(pdev, SH_MOBILE_SDHI_IRQ_CARD_DETECT); sh_mobile_sdhi_probe() 299 ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_card_detect_irq, 0, sh_mobile_sdhi_probe() 300 dev_name(&pdev->dev), host); sh_mobile_sdhi_probe() 305 irq = platform_get_irq_byname(pdev, SH_MOBILE_SDHI_IRQ_SDIO); sh_mobile_sdhi_probe() 308 ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_sdio_irq, 0, sh_mobile_sdhi_probe() 309 dev_name(&pdev->dev), host); sh_mobile_sdhi_probe() 314 irq = platform_get_irq_byname(pdev, SH_MOBILE_SDHI_IRQ_SDCARD); sh_mobile_sdhi_probe() 317 ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_sdcard_irq, 0, sh_mobile_sdhi_probe() 318 dev_name(&pdev->dev), host); sh_mobile_sdhi_probe() 322 dev_err(&pdev->dev, sh_mobile_sdhi_probe() 330 irq = platform_get_irq(pdev, i); sh_mobile_sdhi_probe() 334 ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_irq, 0, sh_mobile_sdhi_probe() 335 dev_name(&pdev->dev), host); sh_mobile_sdhi_probe() 347 dev_info(&pdev->dev, "%s base at 0x%08lx clock rate %u MHz\n", sh_mobile_sdhi_probe() 349 (platform_get_resource(pdev, IORESOURCE_MEM, 0)->start), sh_mobile_sdhi_probe() 362 static int sh_mobile_sdhi_remove(struct platform_device *pdev) sh_mobile_sdhi_remove() argument 364 struct mmc_host *mmc = platform_get_drvdata(pdev); sh_mobile_sdhi_remove()
|
H A D | sdhci-of-arasan.c | 77 struct platform_device *pdev = to_platform_device(dev); sdhci_arasan_suspend() local 78 struct sdhci_host *host = platform_get_drvdata(pdev); sdhci_arasan_suspend() 102 struct platform_device *pdev = to_platform_device(dev); sdhci_arasan_resume() local 103 struct sdhci_host *host = platform_get_drvdata(pdev); sdhci_arasan_resume() 128 static int sdhci_arasan_probe(struct platform_device *pdev) sdhci_arasan_probe() argument 136 sdhci_arasan = devm_kzalloc(&pdev->dev, sizeof(*sdhci_arasan), sdhci_arasan_probe() 141 sdhci_arasan->clk_ahb = devm_clk_get(&pdev->dev, "clk_ahb"); sdhci_arasan_probe() 143 dev_err(&pdev->dev, "clk_ahb clock not found.\n"); sdhci_arasan_probe() 147 clk_xin = devm_clk_get(&pdev->dev, "clk_xin"); sdhci_arasan_probe() 149 dev_err(&pdev->dev, "clk_xin clock not found.\n"); sdhci_arasan_probe() 155 dev_err(&pdev->dev, "Unable to enable AHB clock.\n"); sdhci_arasan_probe() 161 dev_err(&pdev->dev, "Unable to enable SD clock.\n"); sdhci_arasan_probe() 165 host = sdhci_pltfm_init(pdev, &sdhci_arasan_pdata, 0); sdhci_arasan_probe() 171 sdhci_get_of_property(pdev); sdhci_arasan_probe() 178 dev_err(&pdev->dev, "parsing dt failed (%u)\n", ret); sdhci_arasan_probe() 189 sdhci_pltfm_free(pdev); sdhci_arasan_probe() 198 static int sdhci_arasan_remove(struct platform_device *pdev) sdhci_arasan_remove() argument 200 struct sdhci_host *host = platform_get_drvdata(pdev); sdhci_arasan_remove() 206 return sdhci_pltfm_unregister(pdev); sdhci_arasan_remove()
|
/linux-4.1.27/arch/x86/include/asm/ |
H A D | probe_roms.h | 5 extern void __iomem *pci_map_biosrom(struct pci_dev *pdev); 7 extern size_t pci_biosrom_size(struct pci_dev *pdev);
|
/linux-4.1.27/include/linux/platform_data/ |
H A D | usb-ehci-mxc.h | 5 int (*init)(struct platform_device *pdev); 6 int (*exit)(struct platform_device *pdev);
|
/linux-4.1.27/arch/m68k/amiga/ |
H A D | platform.c | 51 struct platform_device *pdev; amiga_init_bus() local 58 pdev = platform_device_register_simple("amiga-zorro", -1, amiga_init_bus() 60 return PTR_ERR_OR_ZERO(pdev); amiga_init_bus() 136 struct platform_device *pdev; amiga_init_devices() local 144 pdev = platform_device_register_simple("amiga-video", -1, NULL, amiga_init_devices() 146 if (IS_ERR(pdev)) amiga_init_devices() 147 return PTR_ERR(pdev); amiga_init_devices() 153 pdev = platform_device_register_simple("amiga-audio", -1, NULL, amiga_init_devices() 155 if (IS_ERR(pdev)) amiga_init_devices() 156 return PTR_ERR(pdev); amiga_init_devices() 162 pdev = platform_device_register_simple("amiga-floppy", -1, amiga_init_devices() 164 if (IS_ERR(pdev)) amiga_init_devices() 165 return PTR_ERR(pdev); amiga_init_devices() 169 pdev = platform_device_register_simple("amiga-a3000-scsi", -1, amiga_init_devices() 171 if (IS_ERR(pdev)) amiga_init_devices() 172 return PTR_ERR(pdev); amiga_init_devices() 176 pdev = platform_device_register_simple("amiga-a4000t-scsi", -1, amiga_init_devices() 179 if (IS_ERR(pdev)) amiga_init_devices() 180 return PTR_ERR(pdev); amiga_init_devices() 185 pdev = platform_device_register_simple("amiga-gayle-ide", -1, amiga_init_devices() 187 if (IS_ERR(pdev)) amiga_init_devices() 188 return PTR_ERR(pdev); amiga_init_devices() 189 error = platform_device_add_data(pdev, &a1200_ide_pdata, amiga_init_devices() 196 pdev = platform_device_register_simple("amiga-gayle-ide", -1, amiga_init_devices() 198 if (IS_ERR(pdev)) amiga_init_devices() 199 return PTR_ERR(pdev); amiga_init_devices() 200 error = platform_device_add_data(pdev, &a4000_ide_pdata, amiga_init_devices() 209 pdev = platform_device_register_simple("amiga-keyboard", -1, amiga_init_devices() 211 if (IS_ERR(pdev)) amiga_init_devices() 212 return PTR_ERR(pdev); amiga_init_devices() 216 pdev = platform_device_register_simple("amiga-mouse", -1, NULL, amiga_init_devices() 218 if (IS_ERR(pdev)) amiga_init_devices() 219 return PTR_ERR(pdev); amiga_init_devices() 223 pdev = platform_device_register_simple("amiga-serial", -1, amiga_init_devices() 225 if (IS_ERR(pdev)) amiga_init_devices() 226 return PTR_ERR(pdev); amiga_init_devices() 230 pdev = platform_device_register_simple("amiga-parallel", -1, amiga_init_devices() 232 if (IS_ERR(pdev)) amiga_init_devices() 233 return PTR_ERR(pdev); amiga_init_devices() 239 pdev = platform_device_register_simple("rtc-msm6242", -1, amiga_init_devices() 241 if (IS_ERR(pdev)) amiga_init_devices() 242 return PTR_ERR(pdev); amiga_init_devices() 246 pdev = platform_device_register_simple("rtc-rp5c01", -1, amiga_init_devices() 248 if (IS_ERR(pdev)) amiga_init_devices() 249 return PTR_ERR(pdev); amiga_init_devices()
|
/linux-4.1.27/drivers/media/pci/mantis/ |
H A D | mantis_pci.c | 53 struct pci_dev *pdev = mantis->pdev; mantis_pci_init() local 59 mantis->pdev->bus->number, mantis_pci_init() 60 PCI_SLOT(mantis->pdev->devfn), mantis_pci_init() 61 PCI_FUNC(mantis->pdev->devfn)); mantis_pci_init() 63 err = pci_enable_device(pdev); mantis_pci_init() 70 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); mantis_pci_init() 77 pci_set_master(pdev); mantis_pci_init() 79 if (!request_mem_region(pci_resource_start(pdev, 0), mantis_pci_init() 80 pci_resource_len(pdev, 0), mantis_pci_init() 88 mantis->mmio = ioremap(pci_resource_start(pdev, 0), mantis_pci_init() 89 pci_resource_len(pdev, 0)); mantis_pci_init() 97 pci_read_config_byte(pdev, PCI_LATENCY_TIMER, &latency); mantis_pci_init() 99 mantis->revision = pdev->revision; mantis_pci_init() 103 mantis->pdev->subsystem_vendor, mantis_pci_init() 104 mantis->pdev->subsystem_device); mantis_pci_init() 108 mantis->pdev->irq, mantis_pci_init() 113 err = request_irq(pdev->irq, mantis_pci_init() 126 pci_set_drvdata(pdev, mantis); mantis_pci_init() 137 release_mem_region(pci_resource_start(pdev, 0), mantis_pci_init() 138 pci_resource_len(pdev, 0)); mantis_pci_init() 142 pci_disable_device(pdev); mantis_pci_init() 152 struct pci_dev *pdev = mantis->pdev; mantis_pci_exit() local 155 free_irq(pdev->irq, mantis); mantis_pci_exit() 158 release_mem_region(pci_resource_start(pdev, 0), mantis_pci_exit() 159 pci_resource_len(pdev, 0)); mantis_pci_exit() 162 pci_disable_device(pdev); mantis_pci_exit()
|
/linux-4.1.27/arch/x86/kernel/ |
H A D | pmem.c | 13 struct platform_device *pdev; register_pmem_device() local 16 pdev = platform_device_alloc("pmem", PLATFORM_DEVID_AUTO); register_pmem_device() 17 if (!pdev) register_pmem_device() 20 error = platform_device_add_resources(pdev, res, 1); register_pmem_device() 24 error = platform_device_add(pdev); register_pmem_device() 30 dev_warn(&pdev->dev, "failed to add 'pmem' (persistent memory) device!\n"); register_pmem_device() 31 platform_device_put(pdev); register_pmem_device()
|
/linux-4.1.27/include/linux/ |
H A D | pci-aspm.h | 26 void pcie_aspm_init_link_state(struct pci_dev *pdev); 27 void pcie_aspm_exit_link_state(struct pci_dev *pdev); 28 void pcie_aspm_pm_state_change(struct pci_dev *pdev); 29 void pcie_aspm_powersave_config_link(struct pci_dev *pdev); 30 void pci_disable_link_state(struct pci_dev *pdev, int state); 31 void pci_disable_link_state_locked(struct pci_dev *pdev, int state); 34 static inline void pcie_aspm_init_link_state(struct pci_dev *pdev) pcie_aspm_init_link_state() argument 37 static inline void pcie_aspm_exit_link_state(struct pci_dev *pdev) pcie_aspm_exit_link_state() argument 40 static inline void pcie_aspm_pm_state_change(struct pci_dev *pdev) pcie_aspm_pm_state_change() argument 43 static inline void pcie_aspm_powersave_config_link(struct pci_dev *pdev) pcie_aspm_powersave_config_link() argument 46 static inline void pci_disable_link_state(struct pci_dev *pdev, int state) pci_disable_link_state() argument 55 void pcie_aspm_create_sysfs_dev_files(struct pci_dev *pdev); 56 void pcie_aspm_remove_sysfs_dev_files(struct pci_dev *pdev); 58 static inline void pcie_aspm_create_sysfs_dev_files(struct pci_dev *pdev) pcie_aspm_create_sysfs_dev_files() argument 61 static inline void pcie_aspm_remove_sysfs_dev_files(struct pci_dev *pdev) pcie_aspm_remove_sysfs_dev_files() argument
|
H A D | pci-ats.h | 57 int pci_enable_pri(struct pci_dev *pdev, u32 reqs); 58 void pci_disable_pri(struct pci_dev *pdev); 59 int pci_reset_pri(struct pci_dev *pdev); 63 static inline int pci_enable_pri(struct pci_dev *pdev, u32 reqs) pci_enable_pri() argument 68 static inline void pci_disable_pri(struct pci_dev *pdev) pci_disable_pri() argument 72 static inline int pci_reset_pri(struct pci_dev *pdev) pci_reset_pri() argument 81 int pci_enable_pasid(struct pci_dev *pdev, int features); 82 void pci_disable_pasid(struct pci_dev *pdev); 83 int pci_pasid_features(struct pci_dev *pdev); 84 int pci_max_pasids(struct pci_dev *pdev); 88 static inline int pci_enable_pasid(struct pci_dev *pdev, int features) pci_enable_pasid() argument 93 static inline void pci_disable_pasid(struct pci_dev *pdev) pci_disable_pasid() argument 97 static inline int pci_pasid_features(struct pci_dev *pdev) pci_pasid_features() argument 102 static inline int pci_max_pasids(struct pci_dev *pdev) pci_max_pasids() argument
|
/linux-4.1.27/drivers/edac/ |
H A D | highbank_l2_edac.c | 59 static int highbank_l2_err_probe(struct platform_device *pdev) highbank_l2_err_probe() argument 73 dci->dev = &pdev->dev; highbank_l2_err_probe() 74 platform_set_drvdata(pdev, dci); highbank_l2_err_probe() 76 if (!devres_open_group(&pdev->dev, NULL, GFP_KERNEL)) highbank_l2_err_probe() 79 r = platform_get_resource(pdev, IORESOURCE_MEM, 0); highbank_l2_err_probe() 81 dev_err(&pdev->dev, "Unable to get mem resource\n"); highbank_l2_err_probe() 86 if (!devm_request_mem_region(&pdev->dev, r->start, highbank_l2_err_probe() 87 resource_size(r), dev_name(&pdev->dev))) { highbank_l2_err_probe() 88 dev_err(&pdev->dev, "Error while requesting mem region\n"); highbank_l2_err_probe() 93 drvdata->base = devm_ioremap(&pdev->dev, r->start, resource_size(r)); highbank_l2_err_probe() 95 dev_err(&pdev->dev, "Unable to map regs\n"); highbank_l2_err_probe() 100 id = of_match_device(hb_l2_err_of_match, &pdev->dev); highbank_l2_err_probe() 101 dci->mod_name = pdev->dev.driver->name; highbank_l2_err_probe() 103 dci->dev_name = dev_name(&pdev->dev); highbank_l2_err_probe() 108 drvdata->db_irq = platform_get_irq(pdev, 0); highbank_l2_err_probe() 109 res = devm_request_irq(&pdev->dev, drvdata->db_irq, highbank_l2_err_probe() 111 0, dev_name(&pdev->dev), dci); highbank_l2_err_probe() 115 drvdata->sb_irq = platform_get_irq(pdev, 1); highbank_l2_err_probe() 116 res = devm_request_irq(&pdev->dev, drvdata->sb_irq, highbank_l2_err_probe() 118 0, dev_name(&pdev->dev), dci); highbank_l2_err_probe() 122 devres_close_group(&pdev->dev, NULL); highbank_l2_err_probe() 125 edac_device_del_device(&pdev->dev); highbank_l2_err_probe() 127 devres_release_group(&pdev->dev, NULL); highbank_l2_err_probe() 132 static int highbank_l2_err_remove(struct platform_device *pdev) highbank_l2_err_remove() argument 134 struct edac_device_ctl_info *dci = platform_get_drvdata(pdev); highbank_l2_err_remove() 136 edac_device_del_device(&pdev->dev); highbank_l2_err_remove()
|
H A D | mv64x60_edac.c | 81 static int __init mv64x60_pci_fixup(struct platform_device *pdev) mv64x60_pci_fixup() argument 86 r = platform_get_resource(pdev, IORESOURCE_MEM, 1); mv64x60_pci_fixup() 103 static int mv64x60_pci_err_probe(struct platform_device *pdev) mv64x60_pci_err_probe() argument 110 if (!devres_open_group(&pdev->dev, mv64x60_pci_err_probe, GFP_KERNEL)) mv64x60_pci_err_probe() 119 pdata->pci_hose = pdev->id; mv64x60_pci_err_probe() 122 platform_set_drvdata(pdev, pci); mv64x60_pci_err_probe() 123 pci->dev = &pdev->dev; mv64x60_pci_err_probe() 124 pci->dev_name = dev_name(&pdev->dev); mv64x60_pci_err_probe() 133 r = platform_get_resource(pdev, IORESOURCE_MEM, 0); mv64x60_pci_err_probe() 141 if (!devm_request_mem_region(&pdev->dev, mv64x60_pci_err_probe() 151 pdata->pci_vbase = devm_ioremap(&pdev->dev, mv64x60_pci_err_probe() 160 res = mv64x60_pci_fixup(pdev); mv64x60_pci_err_probe() 177 pdata->irq = platform_get_irq(pdev, 0); mv64x60_pci_err_probe() 178 res = devm_request_irq(&pdev->dev, mv64x60_pci_err_probe() 194 devres_remove_group(&pdev->dev, mv64x60_pci_err_probe); mv64x60_pci_err_probe() 202 edac_pci_del_device(&pdev->dev); mv64x60_pci_err_probe() 205 devres_release_group(&pdev->dev, mv64x60_pci_err_probe); mv64x60_pci_err_probe() 209 static int mv64x60_pci_err_remove(struct platform_device *pdev) mv64x60_pci_err_remove() argument 211 struct edac_pci_ctl_info *pci = platform_get_drvdata(pdev); mv64x60_pci_err_remove() 215 edac_pci_del_device(&pdev->dev); mv64x60_pci_err_remove() 274 static int mv64x60_sram_err_probe(struct platform_device *pdev) mv64x60_sram_err_probe() argument 281 if (!devres_open_group(&pdev->dev, mv64x60_sram_err_probe, GFP_KERNEL)) mv64x60_sram_err_probe() 288 devres_release_group(&pdev->dev, mv64x60_sram_err_probe); mv64x60_sram_err_probe() 295 edac_dev->dev = &pdev->dev; mv64x60_sram_err_probe() 296 platform_set_drvdata(pdev, edac_dev); mv64x60_sram_err_probe() 297 edac_dev->dev_name = dev_name(&pdev->dev); mv64x60_sram_err_probe() 299 r = platform_get_resource(pdev, IORESOURCE_MEM, 0); mv64x60_sram_err_probe() 307 if (!devm_request_mem_region(&pdev->dev, mv64x60_sram_err_probe() 317 pdata->sram_vbase = devm_ioremap(&pdev->dev, mv64x60_sram_err_probe() 344 pdata->irq = platform_get_irq(pdev, 0); mv64x60_sram_err_probe() 345 res = devm_request_irq(&pdev->dev, mv64x60_sram_err_probe() 363 devres_remove_group(&pdev->dev, mv64x60_sram_err_probe); mv64x60_sram_err_probe() 371 edac_device_del_device(&pdev->dev); mv64x60_sram_err_probe() 373 devres_release_group(&pdev->dev, mv64x60_sram_err_probe); mv64x60_sram_err_probe() 378 static int mv64x60_sram_err_remove(struct platform_device *pdev) mv64x60_sram_err_remove() argument 380 struct edac_device_ctl_info *edac_dev = platform_get_drvdata(pdev); mv64x60_sram_err_remove() 384 edac_device_del_device(&pdev->dev); mv64x60_sram_err_remove() 442 static int mv64x60_cpu_err_probe(struct platform_device *pdev) mv64x60_cpu_err_probe() argument 449 if (!devres_open_group(&pdev->dev, mv64x60_cpu_err_probe, GFP_KERNEL)) mv64x60_cpu_err_probe() 456 devres_release_group(&pdev->dev, mv64x60_cpu_err_probe); mv64x60_cpu_err_probe() 463 edac_dev->dev = &pdev->dev; mv64x60_cpu_err_probe() 464 platform_set_drvdata(pdev, edac_dev); mv64x60_cpu_err_probe() 465 edac_dev->dev_name = dev_name(&pdev->dev); mv64x60_cpu_err_probe() 467 r = platform_get_resource(pdev, IORESOURCE_MEM, 0); mv64x60_cpu_err_probe() 475 if (!devm_request_mem_region(&pdev->dev, mv64x60_cpu_err_probe() 485 pdata->cpu_vbase[0] = devm_ioremap(&pdev->dev, mv64x60_cpu_err_probe() 494 r = platform_get_resource(pdev, IORESOURCE_MEM, 1); mv64x60_cpu_err_probe() 502 if (!devm_request_mem_region(&pdev->dev, mv64x60_cpu_err_probe() 512 pdata->cpu_vbase[1] = devm_ioremap(&pdev->dev, mv64x60_cpu_err_probe() 539 pdata->irq = platform_get_irq(pdev, 0); mv64x60_cpu_err_probe() 540 res = devm_request_irq(&pdev->dev, mv64x60_cpu_err_probe() 558 devres_remove_group(&pdev->dev, mv64x60_cpu_err_probe); mv64x60_cpu_err_probe() 566 edac_device_del_device(&pdev->dev); mv64x60_cpu_err_probe() 568 devres_release_group(&pdev->dev, mv64x60_cpu_err_probe); mv64x60_cpu_err_probe() 573 static int mv64x60_cpu_err_remove(struct platform_device *pdev) mv64x60_cpu_err_remove() argument 575 struct edac_device_ctl_info *edac_dev = platform_get_drvdata(pdev); mv64x60_cpu_err_remove() 579 edac_device_del_device(&pdev->dev); mv64x60_cpu_err_remove() 700 static int mv64x60_mc_err_probe(struct platform_device *pdev) mv64x60_mc_err_probe() argument 709 if (!devres_open_group(&pdev->dev, mv64x60_mc_err_probe, GFP_KERNEL)) mv64x60_mc_err_probe() 722 devres_release_group(&pdev->dev, mv64x60_mc_err_probe); mv64x60_mc_err_probe() 727 mci->pdev = &pdev->dev; mv64x60_mc_err_probe() 728 platform_set_drvdata(pdev, mci); mv64x60_mc_err_probe() 731 mci->dev_name = dev_name(&pdev->dev); mv64x60_mc_err_probe() 734 r = platform_get_resource(pdev, IORESOURCE_MEM, 0); mv64x60_mc_err_probe() 742 if (!devm_request_mem_region(&pdev->dev, mv64x60_mc_err_probe() 752 pdata->mc_vbase = devm_ioremap(&pdev->dev, mv64x60_mc_err_probe() 800 pdata->irq = platform_get_irq(pdev, 0); mv64x60_mc_err_probe() 801 res = devm_request_irq(&pdev->dev, mv64x60_mc_err_probe() 824 edac_mc_del_mc(&pdev->dev); mv64x60_mc_err_probe() 826 devres_release_group(&pdev->dev, mv64x60_mc_err_probe); mv64x60_mc_err_probe() 831 static int mv64x60_mc_err_remove(struct platform_device *pdev) mv64x60_mc_err_remove() argument 833 struct mem_ctl_info *mci = platform_get_drvdata(pdev); mv64x60_mc_err_remove() 837 edac_mc_del_mc(&pdev->dev); mv64x60_mc_err_remove()
|
/linux-4.1.27/drivers/xen/xen-pciback/ |
H A D | xenbus.c | 39 struct xen_pcibk_device *pdev; alloc_pdev() local 41 pdev = kzalloc(sizeof(struct xen_pcibk_device), GFP_KERNEL); alloc_pdev() 42 if (pdev == NULL) alloc_pdev() 44 dev_dbg(&xdev->dev, "allocated pdev @ 0x%p\n", pdev); alloc_pdev() 46 pdev->xdev = xdev; alloc_pdev() 47 dev_set_drvdata(&xdev->dev, pdev); alloc_pdev() 49 mutex_init(&pdev->dev_lock); alloc_pdev() 51 pdev->sh_info = NULL; alloc_pdev() 52 pdev->evtchn_irq = INVALID_EVTCHN_IRQ; alloc_pdev() 53 pdev->be_watching = 0; alloc_pdev() 55 INIT_WORK(&pdev->op_work, xen_pcibk_do_op); alloc_pdev() 57 if (xen_pcibk_init_devices(pdev)) { alloc_pdev() 58 kfree(pdev); alloc_pdev() 59 pdev = NULL; alloc_pdev() 62 return pdev; alloc_pdev() 65 static void xen_pcibk_disconnect(struct xen_pcibk_device *pdev) xen_pcibk_disconnect() argument 67 mutex_lock(&pdev->dev_lock); xen_pcibk_disconnect() 69 if (pdev->evtchn_irq != INVALID_EVTCHN_IRQ) { xen_pcibk_disconnect() 70 unbind_from_irqhandler(pdev->evtchn_irq, pdev); xen_pcibk_disconnect() 71 pdev->evtchn_irq = INVALID_EVTCHN_IRQ; xen_pcibk_disconnect() 80 if (pdev->sh_info != NULL) { xen_pcibk_disconnect() 81 xenbus_unmap_ring_vfree(pdev->xdev, pdev->sh_info); xen_pcibk_disconnect() 82 pdev->sh_info = NULL; xen_pcibk_disconnect() 84 mutex_unlock(&pdev->dev_lock); xen_pcibk_disconnect() 87 static void free_pdev(struct xen_pcibk_device *pdev) free_pdev() argument 89 if (pdev->be_watching) { free_pdev() 90 unregister_xenbus_watch(&pdev->be_watch); free_pdev() 91 pdev->be_watching = 0; free_pdev() 94 xen_pcibk_disconnect(pdev); free_pdev() 98 xen_pcibk_release_devices(pdev); free_pdev() 100 dev_set_drvdata(&pdev->xdev->dev, NULL); free_pdev() 101 pdev->xdev = NULL; free_pdev() 103 kfree(pdev); free_pdev() 106 static int xen_pcibk_do_attach(struct xen_pcibk_device *pdev, int gnt_ref, xen_pcibk_do_attach() argument 112 dev_dbg(&pdev->xdev->dev, xen_pcibk_do_attach() 116 err = xenbus_map_ring_valloc(pdev->xdev, &gnt_ref, 1, &vaddr); xen_pcibk_do_attach() 118 xenbus_dev_fatal(pdev->xdev, err, xen_pcibk_do_attach() 123 pdev->sh_info = vaddr; xen_pcibk_do_attach() 126 pdev->xdev->otherend_id, remote_evtchn, xen_pcibk_handle_event, xen_pcibk_do_attach() 127 0, DRV_NAME, pdev); xen_pcibk_do_attach() 129 xenbus_dev_fatal(pdev->xdev, err, xen_pcibk_do_attach() 133 pdev->evtchn_irq = err; xen_pcibk_do_attach() 136 dev_dbg(&pdev->xdev->dev, "Attached!\n"); xen_pcibk_do_attach() 141 static int xen_pcibk_attach(struct xen_pcibk_device *pdev) xen_pcibk_attach() argument 148 mutex_lock(&pdev->dev_lock); xen_pcibk_attach() 150 if (xenbus_read_driver_state(pdev->xdev->nodename) != xen_pcibk_attach() 155 if (xenbus_read_driver_state(pdev->xdev->otherend) != xen_pcibk_attach() 159 dev_dbg(&pdev->xdev->dev, "Reading frontend config\n"); xen_pcibk_attach() 161 err = xenbus_gather(XBT_NIL, pdev->xdev->otherend, xen_pcibk_attach() 167 xenbus_dev_fatal(pdev->xdev, err, xen_pcibk_attach() 173 xenbus_dev_fatal(pdev->xdev, -EFAULT, xen_pcibk_attach() 181 err = xen_pcibk_do_attach(pdev, gnt_ref, remote_evtchn); xen_pcibk_attach() 185 dev_dbg(&pdev->xdev->dev, "Connecting...\n"); xen_pcibk_attach() 187 err = xenbus_switch_state(pdev->xdev, XenbusStateConnected); xen_pcibk_attach() 189 xenbus_dev_fatal(pdev->xdev, err, xen_pcibk_attach() 192 dev_dbg(&pdev->xdev->dev, "Connected? %d\n", err); xen_pcibk_attach() 194 mutex_unlock(&pdev->dev_lock); xen_pcibk_attach() 201 static int xen_pcibk_publish_pci_dev(struct xen_pcibk_device *pdev, xen_pcibk_publish_pci_dev() argument 216 err = xenbus_printf(XBT_NIL, pdev->xdev->nodename, str, xen_pcibk_publish_pci_dev() 224 static int xen_pcibk_export_device(struct xen_pcibk_device *pdev, xen_pcibk_export_device() argument 231 dev_dbg(&pdev->xdev->dev, "exporting dom %x bus %x slot %x func %x\n", xen_pcibk_export_device() 234 dev = pcistub_get_pci_dev_by_slot(pdev, domain, bus, slot, func); xen_pcibk_export_device() 237 xenbus_dev_fatal(pdev->xdev, err, xen_pcibk_export_device() 245 err = xen_pcibk_add_pci_dev(pdev, dev, devid, xen_pcibk_export_device() 250 dev_info(&dev->dev, "registering for %d\n", pdev->xdev->otherend_id); xen_pcibk_export_device() 252 pdev->xdev->otherend_id) != 0) { xen_pcibk_export_device() 256 xen_register_device_domain_owner(dev, pdev->xdev->otherend_id); xen_pcibk_export_device() 271 static int xen_pcibk_remove_device(struct xen_pcibk_device *pdev, xen_pcibk_remove_device() argument 277 dev_dbg(&pdev->xdev->dev, "removing dom %x bus %x slot %x func %x\n", xen_pcibk_remove_device() 280 dev = xen_pcibk_get_pci_dev(pdev, domain, bus, PCI_DEVFN(slot, func)); xen_pcibk_remove_device() 283 dev_dbg(&pdev->xdev->dev, "Couldn't locate PCI device " xen_pcibk_remove_device() 289 dev_dbg(&dev->dev, "unregistering for %d\n", pdev->xdev->otherend_id); xen_pcibk_remove_device() 294 xen_pcibk_release_pci_dev(pdev, dev, true /* use the lock. */); xen_pcibk_remove_device() 300 static int xen_pcibk_publish_pci_root(struct xen_pcibk_device *pdev, xen_pcibk_publish_pci_root() argument 307 dev_dbg(&pdev->xdev->dev, "Publishing pci roots\n"); xen_pcibk_publish_pci_root() 309 err = xenbus_scanf(XBT_NIL, pdev->xdev->nodename, xen_pcibk_publish_pci_root() 324 err = xenbus_scanf(XBT_NIL, pdev->xdev->nodename, xen_pcibk_publish_pci_root() 345 dev_dbg(&pdev->xdev->dev, "writing root %d at %04x:%02x\n", xen_pcibk_publish_pci_root() 348 err = xenbus_printf(XBT_NIL, pdev->xdev->nodename, str, xen_pcibk_publish_pci_root() 353 err = xenbus_printf(XBT_NIL, pdev->xdev->nodename, xen_pcibk_publish_pci_root() 360 static int xen_pcibk_reconfigure(struct xen_pcibk_device *pdev) xen_pcibk_reconfigure() argument 371 dev_dbg(&pdev->xdev->dev, "Reconfiguring device ...\n"); xen_pcibk_reconfigure() 373 mutex_lock(&pdev->dev_lock); xen_pcibk_reconfigure() 375 if (xenbus_read_driver_state(pdev->xdev->nodename) != xen_pcibk_reconfigure() 379 err = xenbus_scanf(XBT_NIL, pdev->xdev->nodename, "num_devs", "%d", xen_pcibk_reconfigure() 384 xenbus_dev_fatal(pdev->xdev, err, xen_pcibk_reconfigure() 393 xenbus_dev_fatal(pdev->xdev, err, xen_pcibk_reconfigure() 398 err = xenbus_scanf(XBT_NIL, pdev->xdev->nodename, state_str, xen_pcibk_reconfigure() 405 dev_dbg(&pdev->xdev->dev, "Attaching dev-%d ...\n", i); xen_pcibk_reconfigure() 410 xenbus_dev_fatal(pdev->xdev, err, xen_pcibk_reconfigure() 415 err = xenbus_scanf(XBT_NIL, pdev->xdev->nodename, xen_pcibk_reconfigure() 419 xenbus_dev_fatal(pdev->xdev, err, xen_pcibk_reconfigure() 426 xenbus_dev_fatal(pdev->xdev, err, xen_pcibk_reconfigure() 432 err = xen_pcibk_export_device(pdev, domain, bus, slot, xen_pcibk_reconfigure() 438 err = xen_pcibk_publish_pci_roots(pdev, xen_pcibk_reconfigure() 441 xenbus_dev_fatal(pdev->xdev, err, xen_pcibk_reconfigure() 447 err = xenbus_printf(XBT_NIL, pdev->xdev->nodename, xen_pcibk_reconfigure() 451 xenbus_dev_fatal(pdev->xdev, err, xen_pcibk_reconfigure() 459 dev_dbg(&pdev->xdev->dev, "Detaching dev-%d ...\n", i); xen_pcibk_reconfigure() 464 xenbus_dev_fatal(pdev->xdev, err, xen_pcibk_reconfigure() 469 err = xenbus_scanf(XBT_NIL, pdev->xdev->nodename, xen_pcibk_reconfigure() 473 xenbus_dev_fatal(pdev->xdev, err, xen_pcibk_reconfigure() 480 xenbus_dev_fatal(pdev->xdev, err, xen_pcibk_reconfigure() 486 err = xen_pcibk_remove_device(pdev, domain, bus, slot, xen_pcibk_reconfigure() 503 err = xenbus_switch_state(pdev->xdev, XenbusStateReconfigured); xen_pcibk_reconfigure() 505 xenbus_dev_fatal(pdev->xdev, err, xen_pcibk_reconfigure() 511 mutex_unlock(&pdev->dev_lock); xen_pcibk_reconfigure() 518 struct xen_pcibk_device *pdev = dev_get_drvdata(&xdev->dev); xen_pcibk_frontend_changed() local 524 xen_pcibk_attach(pdev); xen_pcibk_frontend_changed() 528 xen_pcibk_reconfigure(pdev); xen_pcibk_frontend_changed() 539 xen_pcibk_disconnect(pdev); xen_pcibk_frontend_changed() 544 xen_pcibk_disconnect(pdev); xen_pcibk_frontend_changed() 559 static int xen_pcibk_setup_backend(struct xen_pcibk_device *pdev) xen_pcibk_setup_backend() argument 568 mutex_lock(&pdev->dev_lock); xen_pcibk_setup_backend() 572 if (xenbus_read_driver_state(pdev->xdev->nodename) != xen_pcibk_setup_backend() 576 dev_dbg(&pdev->xdev->dev, "getting be setup\n"); xen_pcibk_setup_backend() 578 err = xenbus_scanf(XBT_NIL, pdev->xdev->nodename, "num_devs", "%d", xen_pcibk_setup_backend() 583 xenbus_dev_fatal(pdev->xdev, err, xen_pcibk_setup_backend() 592 xenbus_dev_fatal(pdev->xdev, err, xen_pcibk_setup_backend() 598 err = xenbus_scanf(XBT_NIL, pdev->xdev->nodename, dev_str, xen_pcibk_setup_backend() 601 xenbus_dev_fatal(pdev->xdev, err, xen_pcibk_setup_backend() 607 xenbus_dev_fatal(pdev->xdev, err, xen_pcibk_setup_backend() 613 err = xen_pcibk_export_device(pdev, domain, bus, slot, func, i); xen_pcibk_setup_backend() 621 xenbus_dev_fatal(pdev->xdev, err, xen_pcibk_setup_backend() 626 err = xenbus_printf(XBT_NIL, pdev->xdev->nodename, state_str, xen_pcibk_setup_backend() 629 xenbus_dev_fatal(pdev->xdev, err, "Error switching " xen_pcibk_setup_backend() 635 err = xen_pcibk_publish_pci_roots(pdev, xen_pcibk_publish_pci_root); xen_pcibk_setup_backend() 637 xenbus_dev_fatal(pdev->xdev, err, xen_pcibk_setup_backend() 643 err = xenbus_switch_state(pdev->xdev, XenbusStateInitialised); xen_pcibk_setup_backend() 645 xenbus_dev_fatal(pdev->xdev, err, xen_pcibk_setup_backend() 649 mutex_unlock(&pdev->dev_lock); xen_pcibk_setup_backend() 652 xen_pcibk_attach(pdev); xen_pcibk_setup_backend() 659 struct xen_pcibk_device *pdev = xen_pcibk_be_watch() local 662 switch (xenbus_read_driver_state(pdev->xdev->nodename)) { xen_pcibk_be_watch() 664 xen_pcibk_setup_backend(pdev); xen_pcibk_be_watch() 676 struct xen_pcibk_device *pdev = alloc_pdev(dev); xen_pcibk_xenbus_probe() local 678 if (pdev == NULL) { xen_pcibk_xenbus_probe() 691 err = xenbus_watch_path(dev, dev->nodename, &pdev->be_watch, xen_pcibk_xenbus_probe() 696 pdev->be_watching = 1; xen_pcibk_xenbus_probe() 701 xen_pcibk_be_watch(&pdev->be_watch, NULL, 0); xen_pcibk_xenbus_probe() 709 struct xen_pcibk_device *pdev = dev_get_drvdata(&dev->dev); xen_pcibk_xenbus_remove() local 711 if (pdev != NULL) xen_pcibk_xenbus_remove() 712 free_pdev(pdev); xen_pcibk_xenbus_remove()
|
H A D | vpci.c | 29 static struct pci_dev *__xen_pcibk_get_pci_dev(struct xen_pcibk_device *pdev, __xen_pcibk_get_pci_dev() argument 36 struct vpci_dev_data *vpci_dev = pdev->pci_dev_data; __xen_pcibk_get_pci_dev() 67 static int __xen_pcibk_add_pci_dev(struct xen_pcibk_device *pdev, __xen_pcibk_add_pci_dev() argument 73 struct vpci_dev_data *vpci_dev = pdev->pci_dev_data; __xen_pcibk_add_pci_dev() 77 xenbus_dev_fatal(pdev->xdev, err, __xen_pcibk_add_pci_dev() 85 xenbus_dev_fatal(pdev->xdev, err, __xen_pcibk_add_pci_dev() 131 xenbus_dev_fatal(pdev->xdev, err, __xen_pcibk_add_pci_dev() 139 err = publish_cb(pdev, 0, 0, PCI_DEVFN(slot, func), devid); __xen_pcibk_add_pci_dev() 147 static void __xen_pcibk_release_pci_dev(struct xen_pcibk_device *pdev, __xen_pcibk_release_pci_dev() argument 151 struct vpci_dev_data *vpci_dev = pdev->pci_dev_data; __xen_pcibk_release_pci_dev() 181 static int __xen_pcibk_init_devices(struct xen_pcibk_device *pdev) __xen_pcibk_init_devices() argument 195 pdev->pci_dev_data = vpci_dev; __xen_pcibk_init_devices() 200 static int __xen_pcibk_publish_pci_roots(struct xen_pcibk_device *pdev, __xen_pcibk_publish_pci_roots() argument 204 return publish_cb(pdev, 0, 0); __xen_pcibk_publish_pci_roots() 207 static void __xen_pcibk_release_devices(struct xen_pcibk_device *pdev) __xen_pcibk_release_devices() argument 210 struct vpci_dev_data *vpci_dev = pdev->pci_dev_data; __xen_pcibk_release_devices() 226 pdev->pci_dev_data = NULL; __xen_pcibk_release_devices() 230 struct xen_pcibk_device *pdev, __xen_pcibk_get_pcifront_dev() 236 struct vpci_dev_data *vpci_dev = pdev->pci_dev_data; __xen_pcibk_get_pcifront_dev() 229 __xen_pcibk_get_pcifront_dev(struct pci_dev *pcidev, struct xen_pcibk_device *pdev, unsigned int *domain, unsigned int *bus, unsigned int *devfn) __xen_pcibk_get_pcifront_dev() argument
|
/linux-4.1.27/drivers/i2c/busses/ |
H A D | i2c-designware-platdrv.c | 71 static void dw_i2c_acpi_params(struct platform_device *pdev, char method[], dw_i2c_acpi_params() argument 75 acpi_handle handle = ACPI_HANDLE(&pdev->dev); dw_i2c_acpi_params() 97 static int dw_i2c_acpi_configure(struct platform_device *pdev) dw_i2c_acpi_configure() argument 99 struct dw_i2c_dev *dev = platform_get_drvdata(pdev); dw_i2c_acpi_configure() 110 dw_i2c_acpi_params(pdev, "SSCN", &dev->ss_hcnt, &dev->ss_lcnt, NULL); dw_i2c_acpi_configure() 111 dw_i2c_acpi_params(pdev, "FMCN", &dev->fs_hcnt, &dev->fs_lcnt, dw_i2c_acpi_configure() 119 id = acpi_match_device(pdev->dev.driver->acpi_match_table, &pdev->dev); dw_i2c_acpi_configure() 121 clk_register_fixed_rate(&pdev->dev, dev_name(&pdev->dev), NULL, dw_i2c_acpi_configure() 127 static void dw_i2c_acpi_unconfigure(struct platform_device *pdev) dw_i2c_acpi_unconfigure() argument 129 struct dw_i2c_dev *dev = platform_get_drvdata(pdev); dw_i2c_acpi_unconfigure() 132 id = acpi_match_device(pdev->dev.driver->acpi_match_table, &pdev->dev); dw_i2c_acpi_unconfigure() 149 static inline int dw_i2c_acpi_configure(struct platform_device *pdev) dw_i2c_acpi_configure() argument 153 static inline void dw_i2c_acpi_unconfigure(struct platform_device *pdev) { } dw_i2c_acpi_unconfigure() argument 156 static int dw_i2c_probe(struct platform_device *pdev) dw_i2c_probe() argument 165 irq = platform_get_irq(pdev, 0); dw_i2c_probe() 169 dev = devm_kzalloc(&pdev->dev, sizeof(struct dw_i2c_dev), GFP_KERNEL); dw_i2c_probe() 173 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); dw_i2c_probe() 174 dev->base = devm_ioremap_resource(&pdev->dev, mem); dw_i2c_probe() 180 dev->dev = &pdev->dev; dw_i2c_probe() 182 platform_set_drvdata(pdev, dev); dw_i2c_probe() 187 if (has_acpi_companion(&pdev->dev)) { dw_i2c_probe() 188 dw_i2c_acpi_configure(pdev); dw_i2c_probe() 189 } else if (pdev->dev.of_node) { dw_i2c_probe() 190 of_property_read_u32(pdev->dev.of_node, dw_i2c_probe() 193 of_property_read_u32(pdev->dev.of_node, dw_i2c_probe() 196 of_property_read_u32(pdev->dev.of_node, dw_i2c_probe() 200 of_property_read_u32(pdev->dev.of_node, "clock-frequency", dw_i2c_probe() 207 dev_err(&pdev->dev, "Only 100kHz and 400kHz supported"); dw_i2c_probe() 211 pdata = dev_get_platdata(&pdev->dev); dw_i2c_probe() 234 dev->clk = devm_clk_get(&pdev->dev, NULL); dw_i2c_probe() 252 dev->adapter.nr = pdev->id; dw_i2c_probe() 259 r = devm_request_irq(&pdev->dev, dev->irq, i2c_dw_isr, IRQF_SHARED, dw_i2c_probe() 260 pdev->name, dev); dw_i2c_probe() 262 dev_err(&pdev->dev, "failure requesting irq %i\n", dev->irq); dw_i2c_probe() 273 adap->dev.parent = &pdev->dev; dw_i2c_probe() 274 adap->dev.of_node = pdev->dev.of_node; dw_i2c_probe() 277 pm_runtime_forbid(&pdev->dev); dw_i2c_probe() 279 pm_runtime_set_autosuspend_delay(&pdev->dev, 1000); dw_i2c_probe() 280 pm_runtime_use_autosuspend(&pdev->dev); dw_i2c_probe() 281 pm_runtime_set_active(&pdev->dev); dw_i2c_probe() 282 pm_runtime_enable(&pdev->dev); dw_i2c_probe() 287 dev_err(&pdev->dev, "failure adding adapter\n"); dw_i2c_probe() 288 pm_runtime_disable(&pdev->dev); dw_i2c_probe() 295 static int dw_i2c_remove(struct platform_device *pdev) dw_i2c_remove() argument 297 struct dw_i2c_dev *dev = platform_get_drvdata(pdev); dw_i2c_remove() 299 pm_runtime_get_sync(&pdev->dev); dw_i2c_remove() 305 pm_runtime_put(&pdev->dev); dw_i2c_remove() 306 pm_runtime_disable(&pdev->dev); dw_i2c_remove() 308 if (has_acpi_companion(&pdev->dev)) dw_i2c_remove() 309 dw_i2c_acpi_unconfigure(pdev); dw_i2c_remove() 325 struct platform_device *pdev = to_platform_device(dev); dw_i2c_suspend() local 326 struct dw_i2c_dev *i_dev = platform_get_drvdata(pdev); dw_i2c_suspend() 336 struct platform_device *pdev = to_platform_device(dev); dw_i2c_resume() local 337 struct dw_i2c_dev *i_dev = platform_get_drvdata(pdev); dw_i2c_resume()
|
H A D | i2c-pxa-pci.c | 17 struct platform_device *pdev[CE4100_PCI_I2C_DEVS]; member in struct:ce4100_devices 22 struct platform_device *pdev; add_i2c_device() local 69 pdev = platform_device_alloc("ce4100-i2c", devnum); add_i2c_device() 70 if (!pdev) { add_i2c_device() 75 pdev->dev.parent = &dev->dev; add_i2c_device() 76 pdev->dev.of_node = child; add_i2c_device() 78 ret = platform_device_add_resources(pdev, res, ARRAY_SIZE(res)); add_i2c_device() 82 ret = platform_device_add_data(pdev, &pdata, sizeof(pdata)); add_i2c_device() 86 ret = platform_device_add(pdev); add_i2c_device() 90 return pdev; add_i2c_device() 92 platform_device_put(pdev); add_i2c_device() 118 for (i = 0; i < ARRAY_SIZE(sds->pdev); i++) { ce4100_i2c_probe() 119 sds->pdev[i] = add_i2c_device(dev, i); ce4100_i2c_probe() 120 if (IS_ERR(sds->pdev[i])) { ce4100_i2c_probe() 121 ret = PTR_ERR(sds->pdev[i]); ce4100_i2c_probe() 123 platform_device_unregister(sds->pdev[i]); ce4100_i2c_probe() 144 for (i = 0; i < ARRAY_SIZE(sds->pdev); i++) ce4100_i2c_remove() 145 platform_device_unregister(sds->pdev[i]); ce4100_i2c_remove()
|
/linux-4.1.27/drivers/usb/chipidea/ |
H A D | ci_hdrc_zevio.c | 25 static int ci_hdrc_zevio_probe(struct platform_device *pdev) ci_hdrc_zevio_probe() argument 29 dev_dbg(&pdev->dev, "ci_hdrc_zevio_probe\n"); ci_hdrc_zevio_probe() 31 ci_pdev = ci_hdrc_add_device(&pdev->dev, ci_hdrc_zevio_probe() 32 pdev->resource, pdev->num_resources, ci_hdrc_zevio_probe() 36 dev_err(&pdev->dev, "ci_hdrc_add_device failed!\n"); ci_hdrc_zevio_probe() 40 platform_set_drvdata(pdev, ci_pdev); ci_hdrc_zevio_probe() 45 static int ci_hdrc_zevio_remove(struct platform_device *pdev) ci_hdrc_zevio_remove() argument 47 struct platform_device *ci_pdev = platform_get_drvdata(pdev); ci_hdrc_zevio_remove()
|
H A D | ci_hdrc_pci.c | 50 * @pdev: USB device controller being probed 57 static int ci_hdrc_pci_probe(struct pci_dev *pdev, ci_hdrc_pci_probe() argument 66 dev_err(&pdev->dev, "device doesn't provide driver data\n"); ci_hdrc_pci_probe() 70 ci = devm_kzalloc(&pdev->dev, sizeof(*ci), GFP_KERNEL); ci_hdrc_pci_probe() 74 retval = pcim_enable_device(pdev); ci_hdrc_pci_probe() 78 if (!pdev->irq) { ci_hdrc_pci_probe() 79 dev_err(&pdev->dev, "No IRQ, check BIOS/PCI setup!"); ci_hdrc_pci_probe() 83 pci_set_master(pdev); ci_hdrc_pci_probe() 84 pci_try_set_mwi(pdev); ci_hdrc_pci_probe() 92 res[0].start = pci_resource_start(pdev, 0); ci_hdrc_pci_probe() 93 res[0].end = pci_resource_end(pdev, 0); ci_hdrc_pci_probe() 95 res[1].start = pdev->irq; ci_hdrc_pci_probe() 98 ci->ci = ci_hdrc_add_device(&pdev->dev, res, nres, platdata); ci_hdrc_pci_probe() 100 dev_err(&pdev->dev, "ci_hdrc_add_device failed!\n"); ci_hdrc_pci_probe() 105 pci_set_drvdata(pdev, ci); ci_hdrc_pci_probe() 112 * @pdev: USB Device Controller being removed 118 static void ci_hdrc_pci_remove(struct pci_dev *pdev) ci_hdrc_pci_remove() argument 120 struct ci_hdrc_pci *ci = pci_get_drvdata(pdev); ci_hdrc_pci_remove()
|
H A D | ci_hdrc_msm.c | 54 static int ci_hdrc_msm_probe(struct platform_device *pdev) ci_hdrc_msm_probe() argument 59 dev_dbg(&pdev->dev, "ci_hdrc_msm_probe\n"); ci_hdrc_msm_probe() 66 phy = devm_usb_get_phy_by_phandle(&pdev->dev, "usb-phy", 0); ci_hdrc_msm_probe() 72 plat_ci = ci_hdrc_add_device(&pdev->dev, ci_hdrc_msm_probe() 73 pdev->resource, pdev->num_resources, ci_hdrc_msm_probe() 76 dev_err(&pdev->dev, "ci_hdrc_add_device failed!\n"); ci_hdrc_msm_probe() 80 platform_set_drvdata(pdev, plat_ci); ci_hdrc_msm_probe() 82 pm_runtime_no_callbacks(&pdev->dev); ci_hdrc_msm_probe() 83 pm_runtime_enable(&pdev->dev); ci_hdrc_msm_probe() 88 static int ci_hdrc_msm_remove(struct platform_device *pdev) ci_hdrc_msm_remove() argument 90 struct platform_device *plat_ci = platform_get_drvdata(pdev); ci_hdrc_msm_remove() 92 pm_runtime_disable(&pdev->dev); ci_hdrc_msm_remove()
|
/linux-4.1.27/drivers/pci/ |
H A D | irq.c | 13 static void pci_note_irq_problem(struct pci_dev *pdev, const char *reason) pci_note_irq_problem() argument 15 struct pci_dev *parent = to_pci_dev(pdev->dev.parent); pci_note_irq_problem() 17 dev_err(&pdev->dev, pci_note_irq_problem() 20 dev_err(&pdev->dev, "%s\n", reason); pci_note_irq_problem() 21 dev_err(&pdev->dev, "Please report to linux-kernel@vger.kernel.org\n"); pci_note_irq_problem() 27 * @pdev: device whose interrupt is lost 37 enum pci_lost_interrupt_reason pci_lost_interrupt(struct pci_dev *pdev) pci_lost_interrupt() argument 39 if (pdev->msi_enabled || pdev->msix_enabled) { pci_lost_interrupt() 42 if (pdev->msix_enabled) { pci_lost_interrupt() 43 pci_note_irq_problem(pdev, "MSIX routing failure"); pci_lost_interrupt() 46 pci_note_irq_problem(pdev, "MSI routing failure"); pci_lost_interrupt() 53 pci_note_irq_problem(pdev, "Potential ACPI misrouting please reboot with acpi=noirq"); pci_lost_interrupt() 58 pci_note_irq_problem(pdev, "unknown cause (not MSI or ACPI)"); pci_lost_interrupt()
|
H A D | xen-pcifront.c | 56 struct pcifront_device *pdev; member in struct:pcifront_sd 62 return sd->pdev; pcifront_get_pdev() 67 struct pcifront_device *pdev) pcifront_init_sd() 72 sd->pdev = pdev; pcifront_init_sd() 103 static inline void schedule_pcifront_aer_op(struct pcifront_device *pdev) schedule_pcifront_aer_op() argument 105 if (test_bit(_XEN_PCIB_active, (unsigned long *)&pdev->sh_info->flags) schedule_pcifront_aer_op() 106 && !test_and_set_bit(_PDEVB_op_active, &pdev->flags)) { schedule_pcifront_aer_op() 107 dev_dbg(&pdev->xdev->dev, "schedule aer frontend job\n"); schedule_pcifront_aer_op() 108 schedule_work(&pdev->op_work); schedule_pcifront_aer_op() 112 static int do_pci_op(struct pcifront_device *pdev, struct xen_pci_op *op) do_pci_op() argument 115 struct xen_pci_op *active_op = &pdev->sh_info->op; do_pci_op() 117 evtchn_port_t port = pdev->evtchn; do_pci_op() 118 unsigned irq = pdev->irq; do_pci_op() 122 spin_lock_irqsave(&pdev->sh_info_lock, irq_flags); do_pci_op() 128 set_bit(_XEN_PCIF_active, (unsigned long *)&pdev->sh_info->flags); do_pci_op() 143 (unsigned long *)&pdev->sh_info->flags)) { do_pci_op() 149 dev_err(&pdev->xdev->dev, do_pci_op() 152 (unsigned long *)&pdev->sh_info->flags); do_pci_op() 164 (unsigned long *)&pdev->sh_info->flags)) { do_pci_op() 165 dev_err(&pdev->xdev->dev, do_pci_op() 167 schedule_pcifront_aer_op(pdev); do_pci_op() 174 spin_unlock_irqrestore(&pdev->sh_info_lock, irq_flags); do_pci_op() 192 struct pcifront_device *pdev = pcifront_get_pdev(sd); pcifront_bus_read() local 195 dev_info(&pdev->xdev->dev, pcifront_bus_read() 200 err = do_pci_op(pdev, &op); pcifront_bus_read() 204 dev_info(&pdev->xdev->dev, "read got back value %x\n", pcifront_bus_read() 231 struct pcifront_device *pdev = pcifront_get_pdev(sd); pcifront_bus_write() local 234 dev_info(&pdev->xdev->dev, pcifront_bus_write() 240 return errno_to_pcibios_err(do_pci_op(pdev, &op)); pcifront_bus_write() 262 struct pcifront_device *pdev = pcifront_get_pdev(sd); pci_frontend_enable_msix() local 279 err = do_pci_op(pdev, &op); pci_frontend_enable_msix() 315 struct pcifront_device *pdev = pcifront_get_pdev(sd); pci_frontend_disable_msix() local 317 err = do_pci_op(pdev, &op); pci_frontend_disable_msix() 334 struct pcifront_device *pdev = pcifront_get_pdev(sd); pci_frontend_enable_msi() local 336 err = do_pci_op(pdev, &op); pci_frontend_enable_msi() 363 struct pcifront_device *pdev = pcifront_get_pdev(sd); pci_frontend_disable_msi() local 365 err = do_pci_op(pdev, &op); pci_frontend_disable_msi() 397 struct pcifront_device *pdev = data; pcifront_claim_resource() local 405 dev_info(&pdev->xdev->dev, "claiming resource %s/%d\n", pcifront_claim_resource() 408 dev_err(&pdev->xdev->dev, "Could not claim resource %s/%d! " pcifront_claim_resource() 418 static int pcifront_scan_bus(struct pcifront_device *pdev, pcifront_scan_bus() argument 439 dev_info(&pdev->xdev->dev, "New device on " pcifront_scan_bus() 447 static int pcifront_scan_root(struct pcifront_device *pdev, pcifront_scan_root() argument 457 dev_err(&pdev->xdev->dev, pcifront_scan_root() 459 dev_err(&pdev->xdev->dev, pcifront_scan_root() 466 dev_info(&pdev->xdev->dev, "Creating PCI Frontend Bus %04x:%02x\n", pcifront_scan_root() 475 pcifront_init_sd(sd, domain, bus, pdev); pcifront_scan_root() 479 b = pci_scan_bus_parented(&pdev->xdev->dev, bus, pcifront_scan_root() 482 dev_err(&pdev->xdev->dev, pcifront_scan_root() 491 list_add(&bus_entry->list, &pdev->root_buses); pcifront_scan_root() 495 err = pcifront_scan_bus(pdev, domain, bus, b); pcifront_scan_root() 498 pci_walk_bus(b, pcifront_claim_resource, pdev); pcifront_scan_root() 513 static int pcifront_rescan_root(struct pcifront_device *pdev, pcifront_rescan_root() argument 521 dev_err(&pdev->xdev->dev, pcifront_rescan_root() 523 dev_err(&pdev->xdev->dev, pcifront_rescan_root() 529 dev_info(&pdev->xdev->dev, "Rescanning PCI Frontend Bus %04x:%02x\n", pcifront_rescan_root() 535 return pcifront_scan_root(pdev, domain, bus); pcifront_rescan_root() 537 err = pcifront_scan_bus(pdev, domain, bus, b); pcifront_rescan_root() 540 pci_walk_bus(b, pcifront_claim_resource, pdev); pcifront_rescan_root() 560 static void pcifront_free_roots(struct pcifront_device *pdev) pcifront_free_roots() argument 564 dev_dbg(&pdev->xdev->dev, "cleaning up root buses\n"); pcifront_free_roots() 567 list_for_each_entry_safe(bus_entry, t, &pdev->root_buses, list) { pcifront_free_roots() 583 struct pcifront_device *pdev, pcifront_common_process() 588 int bus = pdev->sh_info->aer_op.bus; pcifront_common_process() 589 int devfn = pdev->sh_info->aer_op.devfn; pcifront_common_process() 593 dev_dbg(&pdev->xdev->dev, pcifront_common_process() 600 dev_err(&pdev->xdev->dev, "device or AER driver is NULL\n"); pcifront_common_process() 629 dev_err(&pdev->xdev->dev, pcifront_common_process() 646 struct pcifront_device *pdev = pcifront_do_aer() local 648 int cmd = pdev->sh_info->aer_op.cmd; pcifront_do_aer() 650 (pci_channel_state_t)pdev->sh_info->aer_op.err; pcifront_do_aer() 654 dev_dbg(&pdev->xdev->dev, pcifront_do_aer() 656 pdev->sh_info->aer_op.bus, pdev->sh_info->aer_op.devfn); pcifront_do_aer() 658 pdev->sh_info->aer_op.err = pcifront_common_process(cmd, pdev, state); pcifront_do_aer() 662 clear_bit(_XEN_PCIB_active, (unsigned long *)&pdev->sh_info->flags); pcifront_do_aer() 663 notify_remote_via_evtchn(pdev->evtchn); pcifront_do_aer() 667 clear_bit(_PDEVB_op_active, &pdev->flags); pcifront_do_aer() 670 schedule_pcifront_aer_op(pdev); pcifront_do_aer() 676 struct pcifront_device *pdev = dev; pcifront_handler_aer() local 677 schedule_pcifront_aer_op(pdev); pcifront_handler_aer() 680 static int pcifront_connect_and_init_dma(struct pcifront_device *pdev) pcifront_connect_and_init_dma() argument 687 dev_info(&pdev->xdev->dev, "Installing PCI frontend\n"); pcifront_connect_and_init_dma() 688 pcifront_dev = pdev; pcifront_connect_and_init_dma() 697 dev_err(&pdev->xdev->dev, "Could not setup SWIOTLB!\n"); pcifront_connect_and_init_dma() 702 static void pcifront_disconnect(struct pcifront_device *pdev) pcifront_disconnect() argument 706 if (pdev == pcifront_dev) { pcifront_disconnect() 707 dev_info(&pdev->xdev->dev, pcifront_disconnect() 716 struct pcifront_device *pdev; alloc_pdev() local 718 pdev = kzalloc(sizeof(struct pcifront_device), GFP_KERNEL); alloc_pdev() 719 if (pdev == NULL) alloc_pdev() 722 pdev->sh_info = alloc_pdev() 724 if (pdev->sh_info == NULL) { alloc_pdev() 725 kfree(pdev); alloc_pdev() 726 pdev = NULL; alloc_pdev() 729 pdev->sh_info->flags = 0; alloc_pdev() 732 set_bit(_XEN_PCIB_AERHANDLER, (void *)&pdev->sh_info->flags); alloc_pdev() 734 dev_set_drvdata(&xdev->dev, pdev); alloc_pdev() 735 pdev->xdev = xdev; alloc_pdev() 737 INIT_LIST_HEAD(&pdev->root_buses); alloc_pdev() 739 spin_lock_init(&pdev->sh_info_lock); alloc_pdev() 741 pdev->evtchn = INVALID_EVTCHN; alloc_pdev() 742 pdev->gnt_ref = INVALID_GRANT_REF; alloc_pdev() 743 pdev->irq = -1; alloc_pdev() 745 INIT_WORK(&pdev->op_work, pcifront_do_aer); alloc_pdev() 747 dev_dbg(&xdev->dev, "Allocated pdev @ 0x%p pdev->sh_info @ 0x%p\n", alloc_pdev() 748 pdev, pdev->sh_info); alloc_pdev() 750 return pdev; alloc_pdev() 753 static void free_pdev(struct pcifront_device *pdev) free_pdev() argument 755 dev_dbg(&pdev->xdev->dev, "freeing pdev @ 0x%p\n", pdev); free_pdev() 757 pcifront_free_roots(pdev); free_pdev() 759 cancel_work_sync(&pdev->op_work); free_pdev() 761 if (pdev->irq >= 0) free_pdev() 762 unbind_from_irqhandler(pdev->irq, pdev); free_pdev() 764 if (pdev->evtchn != INVALID_EVTCHN) free_pdev() 765 xenbus_free_evtchn(pdev->xdev, pdev->evtchn); free_pdev() 767 if (pdev->gnt_ref != INVALID_GRANT_REF) free_pdev() 768 gnttab_end_foreign_access(pdev->gnt_ref, 0 /* r/w page */, free_pdev() 769 (unsigned long)pdev->sh_info); free_pdev() 771 free_page((unsigned long)pdev->sh_info); free_pdev() 773 dev_set_drvdata(&pdev->xdev->dev, NULL); free_pdev() 775 kfree(pdev); free_pdev() 778 static int pcifront_publish_info(struct pcifront_device *pdev) pcifront_publish_info() argument 784 err = xenbus_grant_ring(pdev->xdev, pdev->sh_info, 1, &gref); pcifront_publish_info() 788 pdev->gnt_ref = gref; pcifront_publish_info() 790 err = xenbus_alloc_evtchn(pdev->xdev, &pdev->evtchn); pcifront_publish_info() 794 err = bind_evtchn_to_irqhandler(pdev->evtchn, pcifront_handler_aer, pcifront_publish_info() 795 0, "pcifront", pdev); pcifront_publish_info() 800 pdev->irq = err; pcifront_publish_info() 805 xenbus_dev_fatal(pdev->xdev, err, pcifront_publish_info() 811 err = xenbus_printf(trans, pdev->xdev->nodename, pcifront_publish_info() 812 "pci-op-ref", "%u", pdev->gnt_ref); pcifront_publish_info() 814 err = xenbus_printf(trans, pdev->xdev->nodename, pcifront_publish_info() 815 "event-channel", "%u", pdev->evtchn); pcifront_publish_info() 817 err = xenbus_printf(trans, pdev->xdev->nodename, pcifront_publish_info() 822 xenbus_dev_fatal(pdev->xdev, err, pcifront_publish_info() 830 xenbus_dev_fatal(pdev->xdev, err, pcifront_publish_info() 837 xenbus_switch_state(pdev->xdev, XenbusStateInitialised); pcifront_publish_info() 839 dev_dbg(&pdev->xdev->dev, "publishing successful!\n"); pcifront_publish_info() 845 static int pcifront_try_connect(struct pcifront_device *pdev) pcifront_try_connect() argument 854 if (xenbus_read_driver_state(pdev->xdev->nodename) != pcifront_try_connect() 858 err = pcifront_connect_and_init_dma(pdev); pcifront_try_connect() 860 xenbus_dev_fatal(pdev->xdev, err, pcifront_try_connect() 865 err = xenbus_scanf(XBT_NIL, pdev->xdev->otherend, pcifront_try_connect() 868 xenbus_dev_error(pdev->xdev, err, pcifront_try_connect() 870 err = pcifront_scan_root(pdev, 0, 0); pcifront_try_connect() 872 xenbus_dev_fatal(pdev->xdev, err, pcifront_try_connect() 880 xenbus_dev_fatal(pdev->xdev, err, pcifront_try_connect() 892 err = xenbus_scanf(XBT_NIL, pdev->xdev->otherend, str, pcifront_try_connect() 897 xenbus_dev_fatal(pdev->xdev, err, pcifront_try_connect() 902 err = pcifront_scan_root(pdev, domain, bus); pcifront_try_connect() 904 xenbus_dev_fatal(pdev->xdev, err, pcifront_try_connect() 911 err = xenbus_switch_state(pdev->xdev, XenbusStateConnected); pcifront_try_connect() 917 static int pcifront_try_disconnect(struct pcifront_device *pdev) pcifront_try_disconnect() argument 923 prev_state = xenbus_read_driver_state(pdev->xdev->nodename); pcifront_try_disconnect() 929 pcifront_free_roots(pdev); pcifront_try_disconnect() 930 pcifront_disconnect(pdev); pcifront_try_disconnect() 933 err = xenbus_switch_state(pdev->xdev, XenbusStateClosed); pcifront_try_disconnect() 940 static int pcifront_attach_devices(struct pcifront_device *pdev) pcifront_attach_devices() argument 947 if (xenbus_read_driver_state(pdev->xdev->nodename) != pcifront_attach_devices() 951 err = xenbus_scanf(XBT_NIL, pdev->xdev->otherend, pcifront_attach_devices() 954 xenbus_dev_error(pdev->xdev, err, pcifront_attach_devices() 956 err = pcifront_rescan_root(pdev, 0, 0); pcifront_attach_devices() 958 xenbus_dev_fatal(pdev->xdev, err, pcifront_attach_devices() 966 xenbus_dev_fatal(pdev->xdev, err, pcifront_attach_devices() 978 err = xenbus_scanf(XBT_NIL, pdev->xdev->otherend, str, pcifront_attach_devices() 983 xenbus_dev_fatal(pdev->xdev, err, pcifront_attach_devices() 988 err = pcifront_rescan_root(pdev, domain, bus); pcifront_attach_devices() 990 xenbus_dev_fatal(pdev->xdev, err, pcifront_attach_devices() 997 xenbus_switch_state(pdev->xdev, XenbusStateConnected); pcifront_attach_devices() 1003 static int pcifront_detach_devices(struct pcifront_device *pdev) pcifront_detach_devices() argument 1011 if (xenbus_read_driver_state(pdev->xdev->nodename) != pcifront_detach_devices() 1015 err = xenbus_scanf(XBT_NIL, pdev->xdev->otherend, "num_devs", "%d", pcifront_detach_devices() 1020 xenbus_dev_fatal(pdev->xdev, err, pcifront_detach_devices() 1033 err = xenbus_scanf(XBT_NIL, pdev->xdev->otherend, str, "%d", pcifront_detach_devices() 1047 err = xenbus_scanf(XBT_NIL, pdev->xdev->otherend, str, pcifront_detach_devices() 1052 xenbus_dev_fatal(pdev->xdev, err, pcifront_detach_devices() 1060 dev_dbg(&pdev->xdev->dev, pcifront_detach_devices() 1070 dev_dbg(&pdev->xdev->dev, pcifront_detach_devices() 1075 err = xenbus_switch_state(pdev->xdev, XenbusStateReconfiguring); pcifront_detach_devices() 1084 struct pcifront_device *pdev = dev_get_drvdata(&xdev->dev); pcifront_backend_changed() local 1094 pcifront_try_connect(pdev); pcifront_backend_changed() 1103 pcifront_try_disconnect(pdev); pcifront_backend_changed() 1107 pcifront_detach_devices(pdev); pcifront_backend_changed() 1111 pcifront_attach_devices(pdev); pcifront_backend_changed() 1120 struct pcifront_device *pdev = alloc_pdev(xdev); pcifront_xenbus_probe() local 1122 if (pdev == NULL) { pcifront_xenbus_probe() 1129 err = pcifront_publish_info(pdev); pcifront_xenbus_probe() 1131 free_pdev(pdev); pcifront_xenbus_probe() 1139 struct pcifront_device *pdev = dev_get_drvdata(&xdev->dev); pcifront_xenbus_remove() local 1140 if (pdev) pcifront_xenbus_remove() 1141 free_pdev(pdev); pcifront_xenbus_remove() 65 pcifront_init_sd(struct pcifront_sd *sd, unsigned int domain, unsigned int bus, struct pcifront_device *pdev) pcifront_init_sd() argument 582 pcifront_common_process(int cmd, struct pcifront_device *pdev, pci_channel_state_t state) pcifront_common_process() argument
|
H A D | ats.c | 68 struct pci_dev *pdev = dev->is_physfn ? dev : dev->physfn; pci_enable_ats() local 70 mutex_lock(&pdev->sriov->lock); pci_enable_ats() 71 if (pdev->ats) pci_enable_ats() 72 rc = pdev->ats->stu == ps ? 0 : -EINVAL; pci_enable_ats() 74 rc = ats_alloc_one(pdev, ps); pci_enable_ats() 77 pdev->ats->ref_cnt++; pci_enable_ats() 78 mutex_unlock(&pdev->sriov->lock); pci_enable_ats() 117 struct pci_dev *pdev = dev->is_physfn ? dev : dev->physfn; pci_disable_ats() local 119 mutex_lock(&pdev->sriov->lock); pci_disable_ats() 120 pdev->ats->ref_cnt--; pci_disable_ats() 121 if (!pdev->ats->ref_cnt) pci_disable_ats() 122 ats_free_one(pdev); pci_disable_ats() 123 mutex_unlock(&pdev->sriov->lock); pci_disable_ats() 185 * @ pdev: PCI device structure 189 int pci_enable_pri(struct pci_dev *pdev, u32 reqs) pci_enable_pri() argument 195 pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI); pci_enable_pri() 199 pci_read_config_word(pdev, pos + PCI_PRI_CTRL, &control); pci_enable_pri() 200 pci_read_config_word(pdev, pos + PCI_PRI_STATUS, &status); pci_enable_pri() 205 pci_read_config_dword(pdev, pos + PCI_PRI_MAX_REQ, &max_requests); pci_enable_pri() 207 pci_write_config_dword(pdev, pos + PCI_PRI_ALLOC_REQ, reqs); pci_enable_pri() 210 pci_write_config_word(pdev, pos + PCI_PRI_CTRL, control); pci_enable_pri() 218 * @pdev: PCI device structure 222 void pci_disable_pri(struct pci_dev *pdev) pci_disable_pri() argument 227 pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI); pci_disable_pri() 231 pci_read_config_word(pdev, pos + PCI_PRI_CTRL, &control); pci_disable_pri() 233 pci_write_config_word(pdev, pos + PCI_PRI_CTRL, control); pci_disable_pri() 239 * @pdev: PCI device structure 244 int pci_reset_pri(struct pci_dev *pdev) pci_reset_pri() argument 249 pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI); pci_reset_pri() 253 pci_read_config_word(pdev, pos + PCI_PRI_CTRL, &control); pci_reset_pri() 259 pci_write_config_word(pdev, pos + PCI_PRI_CTRL, control); pci_reset_pri() 269 * @pdev: PCI device structure 276 int pci_enable_pasid(struct pci_dev *pdev, int features) pci_enable_pasid() argument 281 pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PASID); pci_enable_pasid() 285 pci_read_config_word(pdev, pos + PCI_PASID_CTRL, &control); pci_enable_pasid() 286 pci_read_config_word(pdev, pos + PCI_PASID_CAP, &supported); pci_enable_pasid() 299 pci_write_config_word(pdev, pos + PCI_PASID_CTRL, control); pci_enable_pasid() 307 * @pdev: PCI device structure 310 void pci_disable_pasid(struct pci_dev *pdev) pci_disable_pasid() argument 315 pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PASID); pci_disable_pasid() 319 pci_write_config_word(pdev, pos + PCI_PASID_CTRL, control); pci_disable_pasid() 325 * @pdev: PCI device structure 333 int pci_pasid_features(struct pci_dev *pdev) pci_pasid_features() argument 338 pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PASID); pci_pasid_features() 342 pci_read_config_word(pdev, pos + PCI_PASID_CAP, &supported); pci_pasid_features() 354 * @pdev: PCI device structure 359 int pci_max_pasids(struct pci_dev *pdev) pci_max_pasids() argument 364 pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PASID); pci_max_pasids() 368 pci_read_config_word(pdev, pos + PCI_PASID_CAP, &supported); pci_max_pasids()
|
H A D | rom.c | 18 * @pdev: PCI device to enable 25 int pci_enable_rom(struct pci_dev *pdev) pci_enable_rom() argument 27 struct resource *res = pdev->resource + PCI_ROM_RESOURCE; pci_enable_rom() 34 pcibios_resource_to_bus(pdev->bus, ®ion, res); pci_enable_rom() 35 pci_read_config_dword(pdev, pdev->rom_base_reg, &rom_addr); pci_enable_rom() 38 pci_write_config_dword(pdev, pdev->rom_base_reg, rom_addr); pci_enable_rom() 45 * @pdev: PCI device to disable 50 void pci_disable_rom(struct pci_dev *pdev) pci_disable_rom() argument 53 pci_read_config_dword(pdev, pdev->rom_base_reg, &rom_addr); pci_disable_rom() 55 pci_write_config_dword(pdev, pdev->rom_base_reg, rom_addr); pci_disable_rom() 61 * @pdev: target PCI device 70 size_t pci_get_rom_size(struct pci_dev *pdev, void __iomem *rom, size_t size) pci_get_rom_size() argument 81 dev_err(&pdev->dev, "Invalid ROM contents\n"); pci_get_rom_size() 108 * @pdev: pointer to pci device struct 117 void __iomem *pci_map_rom(struct pci_dev *pdev, size_t *size) pci_map_rom() argument 119 struct resource *res = &pdev->resource[PCI_ROM_RESOURCE]; pci_map_rom() 135 *size = pci_resource_len(pdev, PCI_ROM_RESOURCE); pci_map_rom() 137 pci_resource_start(pdev, PCI_ROM_RESOURCE); pci_map_rom() 141 pci_assign_resource(pdev, PCI_ROM_RESOURCE)) pci_map_rom() 143 start = pci_resource_start(pdev, PCI_ROM_RESOURCE); pci_map_rom() 144 *size = pci_resource_len(pdev, PCI_ROM_RESOURCE); pci_map_rom() 149 if (pci_enable_rom(pdev)) pci_map_rom() 160 pci_disable_rom(pdev); pci_map_rom() 169 *size = pci_get_rom_size(pdev, rom, *size); pci_map_rom() 176 * @pdev: pointer to pci device struct 181 void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom) pci_unmap_rom() argument 183 struct resource *res = &pdev->resource[PCI_ROM_RESOURCE]; pci_unmap_rom() 192 pci_disable_rom(pdev); pci_unmap_rom() 198 * @pdev: pointer to pci device struct 202 void pci_cleanup_rom(struct pci_dev *pdev) pci_cleanup_rom() argument 204 struct resource *res = &pdev->resource[PCI_ROM_RESOURCE]; pci_cleanup_rom() 218 * @pdev: pointer to pci device struct 221 void __iomem *pci_platform_rom(struct pci_dev *pdev, size_t *size) pci_platform_rom() argument 223 if (pdev->rom && pdev->romlen) { pci_platform_rom() 224 *size = pdev->romlen; pci_platform_rom() 225 return phys_to_virt((phys_addr_t)pdev->rom); pci_platform_rom()
|
H A D | pci-label.c | 41 static size_t find_smbios_instance_string(struct pci_dev *pdev, char *buf, find_smbios_instance_string() argument 49 bus = pdev->bus->number; find_smbios_instance_string() 50 devfn = pdev->devfn; find_smbios_instance_string() 78 struct pci_dev *pdev; smbios_instance_string_exist() local 81 pdev = to_pci_dev(dev); smbios_instance_string_exist() 83 return find_smbios_instance_string(pdev, NULL, SMBIOS_ATTR_NONE) ? smbios_instance_string_exist() 90 struct pci_dev *pdev; smbioslabel_show() local 91 pdev = to_pci_dev(dev); smbioslabel_show() 93 return find_smbios_instance_string(pdev, buf, smbioslabel_show() 100 struct pci_dev *pdev; smbiosinstance_show() local 101 pdev = to_pci_dev(dev); smbiosinstance_show() 103 return find_smbios_instance_string(pdev, buf, smbiosinstance_show() 128 static int pci_create_smbiosname_file(struct pci_dev *pdev) pci_create_smbiosname_file() argument 130 return sysfs_create_group(&pdev->dev.kobj, &smbios_attr_group); pci_create_smbiosname_file() 133 static void pci_remove_smbiosname_file(struct pci_dev *pdev) pci_remove_smbiosname_file() argument 135 sysfs_remove_group(&pdev->dev.kobj, &smbios_attr_group); pci_remove_smbiosname_file() 138 static inline int pci_create_smbiosname_file(struct pci_dev *pdev) pci_create_smbiosname_file() argument 143 static inline void pci_remove_smbiosname_file(struct pci_dev *pdev) pci_remove_smbiosname_file() argument 265 static int pci_create_acpi_index_label_files(struct pci_dev *pdev) pci_create_acpi_index_label_files() argument 267 return sysfs_create_group(&pdev->dev.kobj, &acpi_attr_group); pci_create_acpi_index_label_files() 270 static int pci_remove_acpi_index_label_files(struct pci_dev *pdev) pci_remove_acpi_index_label_files() argument 272 sysfs_remove_group(&pdev->dev.kobj, &acpi_attr_group); pci_remove_acpi_index_label_files() 276 static inline int pci_create_acpi_index_label_files(struct pci_dev *pdev) pci_create_acpi_index_label_files() argument 281 static inline int pci_remove_acpi_index_label_files(struct pci_dev *pdev) pci_remove_acpi_index_label_files() argument 292 void pci_create_firmware_label_files(struct pci_dev *pdev) pci_create_firmware_label_files() argument 294 if (device_has_dsm(&pdev->dev)) pci_create_firmware_label_files() 295 pci_create_acpi_index_label_files(pdev); pci_create_firmware_label_files() 297 pci_create_smbiosname_file(pdev); pci_create_firmware_label_files() 300 void pci_remove_firmware_label_files(struct pci_dev *pdev) pci_remove_firmware_label_files() argument 302 if (device_has_dsm(&pdev->dev)) pci_remove_firmware_label_files() 303 pci_remove_acpi_index_label_files(pdev); pci_remove_firmware_label_files() 305 pci_remove_smbiosname_file(pdev); pci_remove_firmware_label_files()
|
H A D | pci-sysfs.c | 42 struct pci_dev *pdev; \ 44 pdev = to_pci_dev(dev); \ 45 return sprintf(buf, format_string, pdev->field); \ 60 struct pci_dev *pdev = to_pci_dev(dev); broken_parity_status_show() local 61 return sprintf(buf, "%u\n", pdev->broken_parity_status); broken_parity_status_show() 68 struct pci_dev *pdev = to_pci_dev(dev); broken_parity_status_store() local 74 pdev->broken_parity_status = !!val; broken_parity_status_store() 172 struct pci_dev *pdev = to_pci_dev(dev); enable_store() local 184 if (pci_is_enabled(pdev)) enable_store() 185 pci_disable_device(pdev); enable_store() 189 result = pci_enable_device(pdev); enable_store() 197 struct pci_dev *pdev; enable_show() local 199 pdev = to_pci_dev(dev); enable_show() 200 return sprintf(buf, "%u\n", atomic_read(&pdev->enable_cnt)); enable_show() 209 struct pci_dev *pdev = to_pci_dev(dev); numa_node_store() local 223 dev_alert(&pdev->dev, FW_BUG "Overriding NUMA node to %d. Contact your vendor for updates.", numa_node_store() 241 struct pci_dev *pdev = to_pci_dev(dev); dma_mask_bits_show() local 243 return sprintf(buf, "%d\n", fls64(pdev->dma_mask)); dma_mask_bits_show() 258 struct pci_dev *pdev = to_pci_dev(dev); msi_bus_show() local 259 struct pci_bus *subordinate = pdev->subordinate; msi_bus_show() 263 : !pdev->no_msi); msi_bus_show() 269 struct pci_dev *pdev = to_pci_dev(dev); msi_bus_store() local 270 struct pci_bus *subordinate = pdev->subordinate; msi_bus_store() 285 pdev->no_msi = !val; msi_bus_store() 286 dev_info(&pdev->dev, "MSI/MSI-X %s for future drivers\n", msi_bus_store() 340 struct pci_dev *pdev = to_pci_dev(dev); dev_rescan_store() local 347 pci_rescan_bus(pdev->bus); dev_rescan_store() 399 struct pci_dev *pdev = to_pci_dev(dev); d3cold_allowed_store() local 405 pdev->d3cold_allowed = !!val; d3cold_allowed_store() 414 struct pci_dev *pdev = to_pci_dev(dev); d3cold_allowed_show() local 415 return sprintf(buf, "%u\n", pdev->d3cold_allowed); d3cold_allowed_show() 424 struct pci_dev *pdev = to_pci_dev(dev); devspec_show() local 425 struct device_node *np = pci_device_to_OF_node(pdev); devspec_show() 439 struct pci_dev *pdev = to_pci_dev(dev); sriov_totalvfs_show() local 441 return sprintf(buf, "%u\n", pci_sriov_get_totalvfs(pdev)); sriov_totalvfs_show() 449 struct pci_dev *pdev = to_pci_dev(dev); sriov_numvfs_show() local 451 return sprintf(buf, "%u\n", pdev->sriov->num_VFs); sriov_numvfs_show() 465 struct pci_dev *pdev = to_pci_dev(dev); sriov_numvfs_store() local 473 if (num_vfs > pci_sriov_get_totalvfs(pdev)) sriov_numvfs_store() 476 if (num_vfs == pdev->sriov->num_VFs) sriov_numvfs_store() 480 if (!pdev->driver || !pdev->driver->sriov_configure) { sriov_numvfs_store() 481 dev_info(&pdev->dev, "Driver doesn't support SRIOV configuration via sysfs\n"); sriov_numvfs_store() 487 ret = pdev->driver->sriov_configure(pdev, 0); sriov_numvfs_store() 494 if (pdev->sriov->num_VFs) { sriov_numvfs_store() 495 dev_warn(&pdev->dev, "%d VFs already enabled. Disable before enabling %d VFs\n", sriov_numvfs_store() 496 pdev->sriov->num_VFs, num_vfs); sriov_numvfs_store() 500 ret = pdev->driver->sriov_configure(pdev, num_vfs); sriov_numvfs_store() 505 dev_warn(&pdev->dev, "%d VFs requested; only %d enabled\n", sriov_numvfs_store() 521 struct pci_dev *pdev = to_pci_dev(dev); driver_override_store() local 522 char *driver_override, *old = pdev->driver_override, *cp; driver_override_store() 537 pdev->driver_override = driver_override; driver_override_store() 540 pdev->driver_override = NULL; driver_override_store() 551 struct pci_dev *pdev = to_pci_dev(dev); driver_override_show() local 553 return snprintf(buf, PAGE_SIZE, "%s\n", pdev->driver_override); driver_override_show() 614 struct pci_dev *pdev = to_pci_dev(dev); boot_vga_show() local 618 return sprintf(buf, "%u\n", (pdev == vga_dev)); boot_vga_show() 621 !!(pdev->resource[PCI_ROM_RESOURCE].flags & boot_vga_show() 970 int pci_mmap_fits(struct pci_dev *pdev, int resno, struct vm_area_struct *vma, pci_mmap_fits() argument 975 if (pci_resource_len(pdev, resno) == 0) pci_mmap_fits() 979 size = ((pci_resource_len(pdev, resno) - 1) >> PAGE_SHIFT) + 1; pci_mmap_fits() 981 pci_resource_start(pdev, resno) >> PAGE_SHIFT : 0; pci_mmap_fits() 1000 struct pci_dev *pdev = to_pci_dev(container_of(kobj, pci_mmap_resource() local 1008 if (res == &pdev->resource[i]) pci_mmap_resource() 1013 if (!pci_mmap_fits(pdev, i, vma, PCI_MMAP_SYSFS)) { pci_mmap_resource() 1016 pci_name(pdev), i, pci_mmap_resource() 1017 (u64)pci_resource_start(pdev, i), pci_mmap_resource() 1018 (u64)pci_resource_len(pdev, i)); pci_mmap_resource() 1026 pci_resource_to_user(pdev, i, res, &start, &end); pci_mmap_resource() 1033 return pci_mmap_page_range(pdev, vma, mmap_type, write_combine); pci_mmap_resource() 1054 struct pci_dev *pdev = to_pci_dev(container_of(kobj, pci_resource_io() local 1061 if (res == &pdev->resource[i]) pci_resource_io() 1066 port += pci_resource_start(pdev, i); pci_resource_io() 1068 if (port > pci_resource_end(pdev, i)) pci_resource_io() 1071 if (port + count - 1 > pci_resource_end(pdev, i)) pci_resource_io() 1113 * @pdev: dev to cleanup 1115 * If we created resource files for @pdev, remove them from sysfs and 1118 static void pci_remove_resource_files(struct pci_dev *pdev) pci_remove_resource_files() argument 1125 res_attr = pdev->res_attr[i]; pci_remove_resource_files() 1127 sysfs_remove_bin_file(&pdev->dev.kobj, res_attr); pci_remove_resource_files() 1131 res_attr = pdev->res_attr_wc[i]; pci_remove_resource_files() 1133 sysfs_remove_bin_file(&pdev->dev.kobj, res_attr); pci_remove_resource_files() 1139 static int pci_create_attr(struct pci_dev *pdev, int num, int write_combine) pci_create_attr() argument 1152 pdev->res_attr_wc[num] = res_attr; pci_create_attr() 1156 pdev->res_attr[num] = res_attr; pci_create_attr() 1160 if (pci_resource_flags(pdev, num) & IORESOURCE_IO) { pci_create_attr() 1166 res_attr->size = pci_resource_len(pdev, num); pci_create_attr() 1167 res_attr->private = &pdev->resource[num]; pci_create_attr() 1168 retval = sysfs_create_bin_file(&pdev->dev.kobj, res_attr); pci_create_attr() 1177 * @pdev: dev in question 1179 * Walk the resources in @pdev creating files for each resource available. 1181 static int pci_create_resource_files(struct pci_dev *pdev) pci_create_resource_files() argument 1190 if (!pci_resource_len(pdev, i)) pci_create_resource_files() 1193 retval = pci_create_attr(pdev, i, 0); pci_create_resource_files() 1195 if (!retval && pdev->resource[i].flags & IORESOURCE_PREFETCH) pci_create_resource_files() 1196 retval = pci_create_attr(pdev, i, 1); pci_create_resource_files() 1199 pci_remove_resource_files(pdev); pci_create_resource_files() 1225 struct pci_dev *pdev = to_pci_dev(container_of(kobj, struct device, kobj)); pci_write_rom() local 1228 pdev->rom_attr_enabled = 0; pci_write_rom() 1230 pdev->rom_attr_enabled = 1; pci_write_rom() 1251 struct pci_dev *pdev = to_pci_dev(container_of(kobj, struct device, kobj)); pci_read_rom() local 1255 if (!pdev->rom_attr_enabled) pci_read_rom() 1258 rom = pci_map_rom(pdev, &size); /* size starts out as PCI window size */ pci_read_rom() 1270 pci_unmap_rom(pdev, rom); pci_read_rom() 1298 struct pci_dev *pdev = to_pci_dev(dev); reset_store() local 1308 result = pci_reset_function(pdev); reset_store() 1363 int __must_check pci_create_sysfs_dev_files(struct pci_dev *pdev) pci_create_sysfs_dev_files() argument 1372 if (pdev->cfg_size < PCI_CFG_SPACE_EXP_SIZE) pci_create_sysfs_dev_files() 1373 retval = sysfs_create_bin_file(&pdev->dev.kobj, &pci_config_attr); pci_create_sysfs_dev_files() 1375 retval = sysfs_create_bin_file(&pdev->dev.kobj, &pcie_config_attr); pci_create_sysfs_dev_files() 1379 retval = pci_create_resource_files(pdev); pci_create_sysfs_dev_files() 1383 if (pci_resource_len(pdev, PCI_ROM_RESOURCE)) pci_create_sysfs_dev_files() 1384 rom_size = pci_resource_len(pdev, PCI_ROM_RESOURCE); pci_create_sysfs_dev_files() 1385 else if (pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW) pci_create_sysfs_dev_files() 1401 retval = sysfs_create_bin_file(&pdev->dev.kobj, attr); pci_create_sysfs_dev_files() 1406 pdev->rom_attr = attr; pci_create_sysfs_dev_files() 1410 retval = pci_create_capabilities_sysfs(pdev); pci_create_sysfs_dev_files() 1414 pci_create_firmware_label_files(pdev); pci_create_sysfs_dev_files() 1420 sysfs_remove_bin_file(&pdev->dev.kobj, pdev->rom_attr); pci_create_sysfs_dev_files() 1421 kfree(pdev->rom_attr); pci_create_sysfs_dev_files() 1422 pdev->rom_attr = NULL; pci_create_sysfs_dev_files() 1425 pci_remove_resource_files(pdev); pci_create_sysfs_dev_files() 1427 if (pdev->cfg_size < PCI_CFG_SPACE_EXP_SIZE) pci_create_sysfs_dev_files() 1428 sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr); pci_create_sysfs_dev_files() 1430 sysfs_remove_bin_file(&pdev->dev.kobj, &pcie_config_attr); pci_create_sysfs_dev_files() 1451 * @pdev: device whose entries we should free 1453 * Cleanup when @pdev is removed from sysfs. 1455 void pci_remove_sysfs_dev_files(struct pci_dev *pdev) pci_remove_sysfs_dev_files() argument 1462 pci_remove_capabilities_sysfs(pdev); pci_remove_sysfs_dev_files() 1464 if (pdev->cfg_size < PCI_CFG_SPACE_EXP_SIZE) pci_remove_sysfs_dev_files() 1465 sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr); pci_remove_sysfs_dev_files() 1467 sysfs_remove_bin_file(&pdev->dev.kobj, &pcie_config_attr); pci_remove_sysfs_dev_files() 1469 pci_remove_resource_files(pdev); pci_remove_sysfs_dev_files() 1471 if (pci_resource_len(pdev, PCI_ROM_RESOURCE)) pci_remove_sysfs_dev_files() 1472 rom_size = pci_resource_len(pdev, PCI_ROM_RESOURCE); pci_remove_sysfs_dev_files() 1473 else if (pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW) pci_remove_sysfs_dev_files() 1476 if (rom_size && pdev->rom_attr) { pci_remove_sysfs_dev_files() 1477 sysfs_remove_bin_file(&pdev->dev.kobj, pdev->rom_attr); pci_remove_sysfs_dev_files() 1478 kfree(pdev->rom_attr); pci_remove_sysfs_dev_files() 1481 pci_remove_firmware_label_files(pdev); pci_remove_sysfs_dev_files() 1487 struct pci_dev *pdev = NULL; pci_sysfs_init() local 1491 for_each_pci_dev(pdev) { for_each_pci_dev() 1492 retval = pci_create_sysfs_dev_files(pdev); for_each_pci_dev() 1494 pci_dev_put(pdev); for_each_pci_dev() 1512 struct pci_dev *pdev = to_pci_dev(dev); pci_dev_attrs_are_visible() local 1515 if ((pdev->class >> 8) != PCI_CLASS_DISPLAY_VGA) pci_dev_attrs_are_visible() 1531 struct pci_dev *pdev = to_pci_dev(dev); pci_dev_hp_attrs_are_visible() local 1533 if (pdev->is_virtfn) pci_dev_hp_attrs_are_visible()
|
/linux-4.1.27/include/media/ |
H A D | soc_camera_platform.h | 30 static inline void soc_camera_platform_release(struct platform_device **pdev) soc_camera_platform_release() argument 32 *pdev = NULL; soc_camera_platform_release() 36 struct platform_device **pdev, soc_camera_platform_add() 49 if (*pdev) soc_camera_platform_add() 52 *pdev = platform_device_alloc("soc_camera_platform", id); soc_camera_platform_add() 53 if (!*pdev) soc_camera_platform_add() 58 (*pdev)->dev.platform_data = info; soc_camera_platform_add() 59 (*pdev)->dev.release = release; soc_camera_platform_add() 61 ret = platform_device_add(*pdev); soc_camera_platform_add() 63 platform_device_put(*pdev); soc_camera_platform_add() 64 *pdev = NULL; soc_camera_platform_add() 72 struct platform_device *pdev, soc_camera_platform_del() 77 if (&icd->sdesc->subdev_desc != ssdd || !pdev) soc_camera_platform_del() 80 platform_device_unregister(pdev); soc_camera_platform_del() 35 soc_camera_platform_add(struct soc_camera_device *icd, struct platform_device **pdev, struct soc_camera_link *plink, void (*release)(struct device *dev), int id) soc_camera_platform_add() argument 71 soc_camera_platform_del(const struct soc_camera_device *icd, struct platform_device *pdev, const struct soc_camera_link *plink) soc_camera_platform_del() argument
|
/linux-4.1.27/drivers/staging/rtl8192e/rtl8192e/ |
H A D | rtl_pci.c | 28 static void rtl8192_parse_pci_configuration(struct pci_dev *pdev, rtl8192_parse_pci_configuration() argument 36 pcie_capability_read_word(priv->pdev, PCI_EXP_LNKCTL, &LinkCtrlReg); rtl8192_parse_pci_configuration() 42 pci_read_config_byte(pdev, 0x98, &tmp); rtl8192_parse_pci_configuration() 44 pci_write_config_byte(pdev, 0x98, tmp); rtl8192_parse_pci_configuration() 47 pci_write_config_byte(pdev, 0x70f, tmp); rtl8192_parse_pci_configuration() 50 bool rtl8192_pci_findadapter(struct pci_dev *pdev, struct net_device *dev) rtl8192_pci_findadapter() argument 58 VenderID = pdev->vendor; rtl8192_pci_findadapter() 59 DeviceID = pdev->device; rtl8192_pci_findadapter() 60 RevisionID = pdev->revision; rtl8192_pci_findadapter() 61 pci_read_config_word(pdev, 0x3C, &IrqLine); rtl8192_pci_findadapter() 68 dev_info(&pdev->dev, rtl8192_pci_findadapter() 74 dev_info(&pdev->dev, rtl8192_pci_findadapter() 80 dev_info(&pdev->dev, rtl8192_pci_findadapter() 82 pdev->vendor, pdev->device); rtl8192_pci_findadapter() 89 dev_info(&pdev->dev, rtl8192_pci_findadapter() 92 dev_info(&pdev->dev, rtl8192_pci_findadapter() 97 rtl8192_parse_pci_configuration(pdev, dev); rtl8192_pci_findadapter()
|
H A D | rtl_pm.c | 26 int rtl8192E_suspend(struct pci_dev *pdev, pm_message_t state) rtl8192E_suspend() argument 28 struct net_device *dev = pci_get_drvdata(pdev); rtl8192E_suspend() 64 pci_save_state(pdev); rtl8192E_suspend() 65 pci_disable_device(pdev); rtl8192E_suspend() 66 pci_enable_wake(pdev, pci_choose_state(pdev, state), rtl8192E_suspend() 68 pci_set_power_state(pdev, pci_choose_state(pdev, state)); rtl8192E_suspend() 75 int rtl8192E_resume(struct pci_dev *pdev) rtl8192E_resume() argument 77 struct net_device *dev = pci_get_drvdata(pdev); rtl8192E_resume() 84 pci_set_power_state(pdev, PCI_D0); rtl8192E_resume() 86 err = pci_enable_device(pdev); rtl8192E_resume() 91 pci_restore_state(pdev); rtl8192E_resume() 93 pci_read_config_dword(pdev, 0x40, &val); rtl8192E_resume() 95 pci_write_config_dword(pdev, 0x40, val & 0xffff00ff); rtl8192E_resume() 97 pci_enable_wake(pdev, PCI_D0, 0); rtl8192E_resume()
|
/linux-4.1.27/drivers/dma/hsu/ |
H A D | pci.c | 43 static int hsu_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) hsu_pci_probe() argument 48 ret = pcim_enable_device(pdev); hsu_pci_probe() 52 ret = pcim_iomap_regions(pdev, BIT(0), pci_name(pdev)); hsu_pci_probe() 54 dev_err(&pdev->dev, "I/O memory remapping failed\n"); hsu_pci_probe() 58 pci_set_master(pdev); hsu_pci_probe() 59 pci_try_set_mwi(pdev); hsu_pci_probe() 61 ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); hsu_pci_probe() 65 ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); hsu_pci_probe() 69 chip = devm_kzalloc(&pdev->dev, sizeof(*chip), GFP_KERNEL); hsu_pci_probe() 73 chip->dev = &pdev->dev; hsu_pci_probe() 74 chip->regs = pcim_iomap_table(pdev)[0]; hsu_pci_probe() 75 chip->length = pci_resource_len(pdev, 0); hsu_pci_probe() 77 chip->irq = pdev->irq; hsu_pci_probe() 79 pci_enable_msi(pdev); hsu_pci_probe() 89 pci_set_drvdata(pdev, chip); hsu_pci_probe() 98 static void hsu_pci_remove(struct pci_dev *pdev) hsu_pci_remove() argument 100 struct hsu_dma_chip *chip = pci_get_drvdata(pdev); hsu_pci_remove()
|
/linux-4.1.27/arch/mips/lantiq/xway/ |
H A D | xrx200_phy_fw.c | 19 static dma_addr_t xway_gphy_load(struct platform_device *pdev) xway_gphy_load() argument 27 if (of_get_property(pdev->dev.of_node, "firmware1", NULL) || xway_gphy_load() 28 of_get_property(pdev->dev.of_node, "firmware2", NULL)) { xway_gphy_load() 31 if (of_property_read_string(pdev->dev.of_node, xway_gphy_load() 33 dev_err(&pdev->dev, xway_gphy_load() 39 if (of_property_read_string(pdev->dev.of_node, xway_gphy_load() 41 dev_err(&pdev->dev, xway_gphy_load() 47 } else if (of_property_read_string(pdev->dev.of_node, xway_gphy_load() 49 dev_err(&pdev->dev, "failed to load firmware filename\n"); xway_gphy_load() 53 dev_info(&pdev->dev, "requesting %s\n", fw_name); xway_gphy_load() 54 if (request_firmware(&fw, fw_name, &pdev->dev)) { xway_gphy_load() 55 dev_err(&pdev->dev, "failed to load firmware: %s\n", fw_name); xway_gphy_load() 65 fw_addr = dma_alloc_coherent(&pdev->dev, size, &dev_addr, GFP_KERNEL); xway_gphy_load() 71 dev_err(&pdev->dev, "failed to alloc firmware memory\n"); xway_gphy_load() 78 static int xway_phy_fw_probe(struct platform_device *pdev) xway_phy_fw_probe() argument 85 fw_addr = xway_gphy_load(pdev); xway_phy_fw_probe() 88 pp = of_find_property(pdev->dev.of_node, "phys", NULL); xway_phy_fw_probe() 93 ret = xrx200_gphy_boot(&pdev->dev, phyids[i], fw_addr); xway_phy_fw_probe()
|
H A D | vmmc.c | 27 static int vmmc_probe(struct platform_device *pdev) vmmc_probe() argument 37 gpio_count = of_gpio_count(pdev->dev.of_node); vmmc_probe() 40 int gpio = of_get_gpio_flags(pdev->dev.of_node, vmmc_probe() 44 dev_info(&pdev->dev, "requested GPIO %d\n", gpio); vmmc_probe() 49 dev_info(&pdev->dev, "reserved %dMB at 0x%p", CP1_SIZE >> 20, cp1_base); vmmc_probe()
|
/linux-4.1.27/arch/mips/mti-sead3/ |
H A D | sead3-lcd.c | 19 struct platform_device *pdev; sead3_lcd_add() local 23 pdev = platform_device_alloc("cobalt-lcd", -1); sead3_lcd_add() 24 if (!pdev) sead3_lcd_add() 27 retval = platform_device_add_resources(pdev, &sead3_lcd_resource, 1); sead3_lcd_add() 31 retval = platform_device_add(pdev); sead3_lcd_add() 38 platform_device_put(pdev); sead3_lcd_add()
|
/linux-4.1.27/drivers/dma/dw/ |
H A D | pci.c | 24 static int dw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *pid) dw_pci_probe() argument 30 ret = pcim_enable_device(pdev); dw_pci_probe() 34 ret = pcim_iomap_regions(pdev, 1 << 0, pci_name(pdev)); dw_pci_probe() 36 dev_err(&pdev->dev, "I/O memory remapping failed\n"); dw_pci_probe() 40 pci_set_master(pdev); dw_pci_probe() 41 pci_try_set_mwi(pdev); dw_pci_probe() 43 ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); dw_pci_probe() 47 ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); dw_pci_probe() 51 chip = devm_kzalloc(&pdev->dev, sizeof(*chip), GFP_KERNEL); dw_pci_probe() 55 chip->dev = &pdev->dev; dw_pci_probe() 56 chip->regs = pcim_iomap_table(pdev)[0]; dw_pci_probe() 57 chip->irq = pdev->irq; dw_pci_probe() 63 pci_set_drvdata(pdev, chip); dw_pci_probe() 68 static void dw_pci_remove(struct pci_dev *pdev) dw_pci_remove() argument 70 struct dw_dma_chip *chip = pci_get_drvdata(pdev); dw_pci_remove() 75 dev_warn(&pdev->dev, "can't remove device properly: %d\n", ret); dw_pci_remove()
|
H A D | platform.c | 101 dw_dma_parse_dt(struct platform_device *pdev) dw_dma_parse_dt() argument 103 struct device_node *np = pdev->dev.of_node; dw_dma_parse_dt() 108 dev_err(&pdev->dev, "Missing DT data\n"); dw_dma_parse_dt() 112 pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); dw_dma_parse_dt() 147 dw_dma_parse_dt(struct platform_device *pdev) dw_dma_parse_dt() argument 153 static int dw_probe(struct platform_device *pdev) dw_probe() argument 156 struct device *dev = &pdev->dev; dw_probe() 165 chip->irq = platform_get_irq(pdev, 0); dw_probe() 169 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); dw_probe() 174 err = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); dw_probe() 180 pdata = dw_dma_parse_dt(pdev); dw_probe() 191 pm_runtime_enable(&pdev->dev); dw_probe() 197 platform_set_drvdata(pdev, chip); dw_probe() 199 if (pdev->dev.of_node) { dw_probe() 200 err = of_dma_controller_register(pdev->dev.of_node, dw_probe() 203 dev_err(&pdev->dev, dw_probe() 207 if (ACPI_HANDLE(&pdev->dev)) dw_probe() 213 pm_runtime_disable(&pdev->dev); dw_probe() 218 static int dw_remove(struct platform_device *pdev) dw_remove() argument 220 struct dw_dma_chip *chip = platform_get_drvdata(pdev); dw_remove() 222 if (pdev->dev.of_node) dw_remove() 223 of_dma_controller_free(pdev->dev.of_node); dw_remove() 226 pm_runtime_disable(&pdev->dev); dw_remove() 232 static void dw_shutdown(struct platform_device *pdev) dw_shutdown() argument 234 struct dw_dma_chip *chip = platform_get_drvdata(pdev); dw_shutdown() 260 struct platform_device *pdev = to_platform_device(dev); dw_suspend_late() local 261 struct dw_dma_chip *chip = platform_get_drvdata(pdev); dw_suspend_late() 271 struct platform_device *pdev = to_platform_device(dev); dw_resume_early() local 272 struct dw_dma_chip *chip = platform_get_drvdata(pdev); dw_resume_early()
|
/linux-4.1.27/drivers/net/wireless/ath/wil6210/ |
H A D | pcie_bus.c | 57 int irq = wil->pdev->irq; wil_disable_irq() 68 int irq = wil->pdev->irq; wil_enable_irq() 80 struct pci_dev *pdev = wil->pdev; wil_if_pcie_enable() local 82 /* on platforms with buggy ACPI, pdev->msi_enabled may be set to wil_if_pcie_enable() 86 int msi_only = pdev->msi_enabled; wil_if_pcie_enable() 90 pdev->msi_enabled = 0; wil_if_pcie_enable() 92 pci_set_master(pdev); wil_if_pcie_enable() 110 if (use_msi == 3 && pci_enable_msi_range(pdev, 3, 3) < 0) { wil_if_pcie_enable() 115 if (use_msi == 1 && pci_enable_msi(pdev)) { wil_if_pcie_enable() 128 rc = wil6210_init_irq(wil, pdev->irq); wil_if_pcie_enable() 144 wil6210_fini_irq(wil, pdev->irq); wil_if_pcie_enable() 146 pci_disable_msi(pdev); wil_if_pcie_enable() 148 pci_clear_master(pdev); wil_if_pcie_enable() 154 struct pci_dev *pdev = wil->pdev; wil_if_pcie_disable() local 158 pci_clear_master(pdev); wil_if_pcie_disable() 160 wil6210_fini_irq(wil, pdev->irq); wil_if_pcie_disable() 162 pci_disable_msi(pdev); wil_if_pcie_disable() 168 static int wil_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id) wil_pcie_probe() argument 171 struct device *dev = &pdev->dev; wil_pcie_probe() 176 dev_info(&pdev->dev, WIL_NAME wil_pcie_probe() 178 (int)pdev->vendor, (int)pdev->device, (int)pdev->revision); wil_pcie_probe() 180 if (pci_resource_len(pdev, 0) != WIL6210_MEM_SIZE) { wil_pcie_probe() 181 dev_err(&pdev->dev, "Not " WIL_NAME "? " wil_pcie_probe() 183 (ulong)pci_resource_len(pdev, 0), WIL6210_MEM_SIZE); wil_pcie_probe() 187 rc = pci_enable_device(pdev); wil_pcie_probe() 189 dev_err(&pdev->dev, wil_pcie_probe() 194 pdev->msi_enabled = 1; wil_pcie_probe() 195 rc = pci_enable_device(pdev); wil_pcie_probe() 201 rc = pci_request_region(pdev, 0, WIL_NAME); wil_pcie_probe() 203 dev_err(&pdev->dev, "pci_request_region failed\n"); wil_pcie_probe() 208 csr = pci_ioremap_bar(pdev, 0); wil_pcie_probe() 210 dev_err(&pdev->dev, "pci_ioremap_bar failed\n"); wil_pcie_probe() 215 dev_info(&pdev->dev, "CSR at %pR -> 0x%p\n", &pdev->resource[0], csr); wil_pcie_probe() 225 pci_set_drvdata(pdev, wil); wil_pcie_probe() 226 wil->pdev = pdev; wil_pcie_probe() 231 wil_platform_init(&pdev->dev, &wil->platform_ops); wil_pcie_probe() 259 pci_iounmap(pdev, csr); wil_pcie_probe() 261 pci_release_region(pdev, 0); wil_pcie_probe() 263 pci_disable_device(pdev); wil_pcie_probe() 268 static void wil_pcie_remove(struct pci_dev *pdev) wil_pcie_remove() argument 270 struct wil6210_priv *wil = pci_get_drvdata(pdev); wil_pcie_remove() 281 pci_iounmap(pdev, csr); wil_pcie_remove() 282 pci_release_region(pdev, 0); wil_pcie_remove() 283 pci_disable_device(pdev); wil_pcie_remove()
|
/linux-4.1.27/drivers/bus/ |
H A D | simple-pm-bus.c | 17 static int simple_pm_bus_probe(struct platform_device *pdev) simple_pm_bus_probe() argument 19 struct device_node *np = pdev->dev.of_node; simple_pm_bus_probe() 21 dev_dbg(&pdev->dev, "%s\n", __func__); simple_pm_bus_probe() 23 pm_runtime_enable(&pdev->dev); simple_pm_bus_probe() 26 of_platform_populate(np, NULL, NULL, &pdev->dev); simple_pm_bus_probe() 31 static int simple_pm_bus_remove(struct platform_device *pdev) simple_pm_bus_remove() argument 33 dev_dbg(&pdev->dev, "%s\n", __func__); simple_pm_bus_remove() 35 pm_runtime_disable(&pdev->dev); simple_pm_bus_remove()
|
H A D | omap-ocp2scp.c | 32 struct platform_device *pdev = to_platform_device(dev); ocp2scp_remove_devices() local 34 platform_device_unregister(pdev); ocp2scp_remove_devices() 39 static int omap_ocp2scp_probe(struct platform_device *pdev) omap_ocp2scp_probe() argument 45 struct device_node *np = pdev->dev.of_node; omap_ocp2scp_probe() 48 ret = of_platform_populate(np, NULL, NULL, &pdev->dev); omap_ocp2scp_probe() 50 dev_err(&pdev->dev, omap_ocp2scp_probe() 56 pm_runtime_enable(&pdev->dev); omap_ocp2scp_probe() 71 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); omap_ocp2scp_probe() 72 regs = devm_ioremap_resource(&pdev->dev, res); omap_ocp2scp_probe() 76 pm_runtime_get_sync(&pdev->dev); omap_ocp2scp_probe() 81 pm_runtime_put_sync(&pdev->dev); omap_ocp2scp_probe() 87 device_for_each_child(&pdev->dev, NULL, ocp2scp_remove_devices); omap_ocp2scp_probe() 92 static int omap_ocp2scp_remove(struct platform_device *pdev) omap_ocp2scp_remove() argument 94 pm_runtime_disable(&pdev->dev); omap_ocp2scp_remove() 95 device_for_each_child(&pdev->dev, NULL, ocp2scp_remove_devices); omap_ocp2scp_remove()
|
H A D | imx-weim.c | 62 static int __init imx_weim_gpr_setup(struct platform_device *pdev) imx_weim_gpr_setup() argument 64 struct device_node *np = pdev->dev.of_node; imx_weim_gpr_setup() 81 dev_dbg(&pdev->dev, "failed to find weim-cs-gpr\n"); imx_weim_gpr_setup() 107 dev_err(&pdev->dev, "Invalid 'ranges' configuration\n"); imx_weim_gpr_setup() 138 static int __init weim_parse_dt(struct platform_device *pdev, weim_parse_dt() argument 142 &pdev->dev); weim_parse_dt() 148 ret = imx_weim_gpr_setup(pdev); weim_parse_dt() 153 for_each_available_child_of_node(pdev->dev.of_node, child) { weim_parse_dt() 159 dev_warn(&pdev->dev, "%s set timing failed.\n", weim_parse_dt() 166 ret = of_platform_populate(pdev->dev.of_node, weim_parse_dt() 168 NULL, &pdev->dev); weim_parse_dt() 170 dev_err(&pdev->dev, "%s fail to create devices.\n", weim_parse_dt() 171 pdev->dev.of_node->full_name); weim_parse_dt() 175 static int __init weim_probe(struct platform_device *pdev) weim_probe() argument 183 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); weim_probe() 184 base = devm_ioremap_resource(&pdev->dev, res); weim_probe() 189 clk = devm_clk_get(&pdev->dev, NULL); weim_probe() 198 ret = weim_parse_dt(pdev, base); weim_probe() 202 dev_info(&pdev->dev, "Driver registered.\n"); weim_probe()
|
/linux-4.1.27/drivers/spi/ |
H A D | spi-dw-pci.c | 27 struct pci_dev *pdev; member in struct:dw_spi_pci 49 static int spi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) spi_pci_probe() argument 57 ret = pcim_enable_device(pdev); spi_pci_probe() 61 dwpci = devm_kzalloc(&pdev->dev, sizeof(struct dw_spi_pci), spi_pci_probe() 66 dwpci->pdev = pdev; spi_pci_probe() 70 dws->paddr = pci_resource_start(pdev, pci_bar); spi_pci_probe() 72 ret = pcim_iomap_regions(pdev, 1 << pci_bar, pci_name(pdev)); spi_pci_probe() 76 dws->regs = pcim_iomap_table(pdev)[pci_bar]; spi_pci_probe() 78 dws->irq = pdev->irq; spi_pci_probe() 97 ret = dw_spi_add_host(&pdev->dev, dws); spi_pci_probe() 102 pci_set_drvdata(pdev, dwpci); spi_pci_probe() 104 dev_info(&pdev->dev, "found PCI SPI controller(ID: %04x:%04x)\n", spi_pci_probe() 105 pdev->vendor, pdev->device); spi_pci_probe() 110 static void spi_pci_remove(struct pci_dev *pdev) spi_pci_remove() argument 112 struct dw_spi_pci *dwpci = pci_get_drvdata(pdev); spi_pci_remove() 120 struct pci_dev *pdev = to_pci_dev(dev); spi_suspend() local 121 struct dw_spi_pci *dwpci = pci_get_drvdata(pdev); spi_suspend() 128 struct pci_dev *pdev = to_pci_dev(dev); spi_resume() local 129 struct dw_spi_pci *dwpci = pci_get_drvdata(pdev); spi_resume()
|
H A D | spi-dw-mmio.c | 32 static int dw_spi_mmio_probe(struct platform_device *pdev) dw_spi_mmio_probe() argument 40 dwsmmio = devm_kzalloc(&pdev->dev, sizeof(struct dw_spi_mmio), dw_spi_mmio_probe() 48 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); dw_spi_mmio_probe() 50 dev_err(&pdev->dev, "no mem resource?\n"); dw_spi_mmio_probe() 54 dws->regs = devm_ioremap_resource(&pdev->dev, mem); dw_spi_mmio_probe() 56 dev_err(&pdev->dev, "SPI region map failed\n"); dw_spi_mmio_probe() 60 dws->irq = platform_get_irq(pdev, 0); dw_spi_mmio_probe() 62 dev_err(&pdev->dev, "no irq resource?\n"); dw_spi_mmio_probe() 66 dwsmmio->clk = devm_clk_get(&pdev->dev, NULL); dw_spi_mmio_probe() 73 dws->bus_num = pdev->id; dw_spi_mmio_probe() 77 of_property_read_u32(pdev->dev.of_node, "reg-io-width", dw_spi_mmio_probe() 82 if (pdev->dev.of_node) dw_spi_mmio_probe() 83 of_property_read_u32(pdev->dev.of_node, "num-cs", &num_cs); dw_spi_mmio_probe() 87 if (pdev->dev.of_node) { dw_spi_mmio_probe() 91 int cs_gpio = of_get_named_gpio(pdev->dev.of_node, dw_spi_mmio_probe() 100 ret = devm_gpio_request(&pdev->dev, cs_gpio, dw_spi_mmio_probe() 101 dev_name(&pdev->dev)); dw_spi_mmio_probe() 108 ret = dw_spi_add_host(&pdev->dev, dws); dw_spi_mmio_probe() 112 platform_set_drvdata(pdev, dwsmmio); dw_spi_mmio_probe() 120 static int dw_spi_mmio_remove(struct platform_device *pdev) dw_spi_mmio_remove() argument 122 struct dw_spi_mmio *dwsmmio = platform_get_drvdata(pdev); dw_spi_mmio_remove()
|
H A D | spi-clps711x.c | 104 static int spi_clps711x_probe(struct platform_device *pdev) spi_clps711x_probe() argument 107 struct spi_clps711x_pdata *pdata = dev_get_platdata(&pdev->dev); spi_clps711x_probe() 113 dev_err(&pdev->dev, "No platform data supplied\n"); spi_clps711x_probe() 118 dev_err(&pdev->dev, "At least one CS must be defined\n"); spi_clps711x_probe() 122 irq = platform_get_irq(pdev, 0); spi_clps711x_probe() 126 master = spi_alloc_master(&pdev->dev, sizeof(*hw)); spi_clps711x_probe() 130 master->cs_gpios = devm_kzalloc(&pdev->dev, sizeof(int) * spi_clps711x_probe() 137 master->bus_num = pdev->id; spi_clps711x_probe() 149 ret = devm_gpio_request(&pdev->dev, master->cs_gpios[i], spi_clps711x_probe() 152 dev_err(&pdev->dev, "Can't get CS GPIO %i\n", i); spi_clps711x_probe() 157 hw->spi_clk = devm_clk_get(&pdev->dev, NULL); spi_clps711x_probe() 169 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); spi_clps711x_probe() 170 hw->syncio = devm_ioremap_resource(&pdev->dev, res); spi_clps711x_probe() 182 ret = devm_request_irq(&pdev->dev, irq, spi_clps711x_isr, 0, spi_clps711x_probe() 183 dev_name(&pdev->dev), master); spi_clps711x_probe() 187 ret = devm_spi_register_master(&pdev->dev, master); spi_clps711x_probe() 189 dev_info(&pdev->dev, spi_clps711x_probe() 195 dev_err(&pdev->dev, "Failed to register master\n"); spi_clps711x_probe()
|
/linux-4.1.27/drivers/misc/cb710/ |
H A D | core.c | 21 void cb710_pci_update_config_reg(struct pci_dev *pdev, cb710_pci_update_config_reg() argument 26 pci_read_config_dword(pdev, reg, &rval); cb710_pci_update_config_reg() 28 pci_write_config_dword(pdev, reg, rval); cb710_pci_update_config_reg() 33 static int cb710_pci_configure(struct pci_dev *pdev) cb710_pci_configure() argument 35 unsigned int devfn = PCI_DEVFN(PCI_SLOT(pdev->devfn), 0); cb710_pci_configure() 39 cb710_pci_update_config_reg(pdev, 0x48, cb710_pci_configure() 42 pci_read_config_dword(pdev, 0x48, &val); cb710_pci_configure() 46 pdev0 = pci_get_slot(pdev->bus, devfn); cb710_pci_configure() 116 slot->pdev.name = name; cb710_register_slot() 117 slot->pdev.id = chip->platform_id; cb710_register_slot() 118 slot->pdev.dev.parent = &chip->pdev->dev; cb710_register_slot() 119 slot->pdev.dev.release = cb710_release_slot; cb710_register_slot() 121 err = platform_device_register(&slot->pdev); cb710_register_slot() 130 platform_device_put(&slot->pdev); cb710_register_slot() 150 platform_device_unregister(&chip->slot[nr].pdev); cb710_unregister_slot() 175 static int cb710_suspend(struct pci_dev *pdev, pm_message_t state) cb710_suspend() argument 177 struct cb710_chip *chip = pci_get_drvdata(pdev); cb710_suspend() 179 devm_free_irq(&pdev->dev, pdev->irq, chip); cb710_suspend() 180 pci_save_state(pdev); cb710_suspend() 181 pci_disable_device(pdev); cb710_suspend() 183 pci_set_power_state(pdev, PCI_D3hot); cb710_suspend() 187 static int cb710_resume(struct pci_dev *pdev) cb710_resume() argument 189 struct cb710_chip *chip = pci_get_drvdata(pdev); cb710_resume() 192 pci_set_power_state(pdev, PCI_D0); cb710_resume() 193 pci_restore_state(pdev); cb710_resume() 194 err = pcim_enable_device(pdev); cb710_resume() 198 return devm_request_irq(&pdev->dev, pdev->irq, cb710_resume() 204 static int cb710_probe(struct pci_dev *pdev, cb710_probe() argument 213 err = cb710_pci_configure(pdev); cb710_probe() 218 pci_read_config_dword(pdev, 0x48, &val); cb710_probe() 220 pci_write_config_dword(pdev, 0x48, val|0x71000000); cb710_probe() 221 pci_read_config_dword(pdev, 0x48, &val); cb710_probe() 224 dev_dbg(&pdev->dev, "PCI config[0x48] = 0x%08X\n", val); cb710_probe() 235 chip = devm_kzalloc(&pdev->dev, cb710_probe() 240 err = pcim_enable_device(pdev); cb710_probe() 244 err = pcim_iomap_regions(pdev, 0x0001, KBUILD_MODNAME); cb710_probe() 249 chip->pdev = pdev; cb710_probe() 250 chip->iobase = pcim_iomap_table(pdev)[0]; cb710_probe() 252 pci_set_drvdata(pdev, chip); cb710_probe() 254 err = devm_request_irq(&pdev->dev, pdev->irq, cb710_probe() 272 dev_info(&pdev->dev, "id %d, IO 0x%p, IRQ %d\n", cb710_probe() 273 chip->platform_id, chip->iobase, pdev->irq); cb710_probe() 308 static void cb710_remove_one(struct pci_dev *pdev) cb710_remove_one() argument 310 struct cb710_chip *chip = pci_get_drvdata(pdev); cb710_remove_one()
|
/linux-4.1.27/drivers/staging/xgifb/ |
H A D | vb_init.h | 3 extern unsigned char XGIInitNew(struct pci_dev *pdev);
|
/linux-4.1.27/drivers/mfd/ |
H A D | davinci_voicecodec.c | 41 static int __init davinci_vc_probe(struct platform_device *pdev) davinci_vc_probe() argument 48 davinci_vc = devm_kzalloc(&pdev->dev, davinci_vc_probe() 51 dev_dbg(&pdev->dev, davinci_vc_probe() 56 davinci_vc->clk = devm_clk_get(&pdev->dev, NULL); davinci_vc_probe() 58 dev_dbg(&pdev->dev, davinci_vc_probe() 64 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); davinci_vc_probe() 66 davinci_vc->base = devm_ioremap_resource(&pdev->dev, res); davinci_vc_probe() 72 davinci_vc->regmap = devm_regmap_init_mmio(&pdev->dev, davinci_vc_probe() 80 res = platform_get_resource(pdev, IORESOURCE_DMA, 0); davinci_vc_probe() 82 dev_err(&pdev->dev, "no DMA resource\n"); davinci_vc_probe() 91 res = platform_get_resource(pdev, IORESOURCE_DMA, 1); davinci_vc_probe() 93 dev_err(&pdev->dev, "no DMA resource\n"); davinci_vc_probe() 102 davinci_vc->dev = &pdev->dev; davinci_vc_probe() 103 davinci_vc->pdev = pdev; davinci_vc_probe() 117 ret = mfd_add_devices(&pdev->dev, pdev->id, davinci_vc->cells, davinci_vc_probe() 120 dev_err(&pdev->dev, "fail to register client devices\n"); davinci_vc_probe() 132 static int davinci_vc_remove(struct platform_device *pdev) davinci_vc_remove() argument 134 struct davinci_vc *davinci_vc = platform_get_drvdata(pdev); davinci_vc_remove() 136 mfd_remove_devices(&pdev->dev); davinci_vc_remove()
|
H A D | mfd-core.c | 29 int mfd_cell_enable(struct platform_device *pdev) mfd_cell_enable() argument 31 const struct mfd_cell *cell = mfd_get_cell(pdev); mfd_cell_enable() 36 err = cell->enable(pdev); mfd_cell_enable() 46 int mfd_cell_disable(struct platform_device *pdev) mfd_cell_disable() argument 48 const struct mfd_cell *cell = mfd_get_cell(pdev); mfd_cell_disable() 53 err = cell->disable(pdev); mfd_cell_disable() 66 static int mfd_platform_add_cell(struct platform_device *pdev, mfd_platform_add_cell() argument 73 pdev->mfd_cell = kmemdup(cell, sizeof(*cell), GFP_KERNEL); mfd_platform_add_cell() 74 if (!pdev->mfd_cell) mfd_platform_add_cell() 77 pdev->mfd_cell->usage_count = usage_count; mfd_platform_add_cell() 83 struct platform_device *pdev) mfd_acpi_add_device() 88 parent_adev = ACPI_COMPANION(pdev->dev.parent); mfd_acpi_add_device() 110 ACPI_COMPANION_SET(&pdev->dev, adev); mfd_acpi_add_device() 114 struct platform_device *pdev) mfd_acpi_add_device() 125 struct platform_device *pdev; mfd_add_device() local 136 pdev = platform_device_alloc(cell->name, platform_id); mfd_add_device() 137 if (!pdev) mfd_add_device() 144 pdev->dev.parent = parent; mfd_add_device() 145 pdev->dev.type = &mfd_dev_type; mfd_add_device() 146 pdev->dev.dma_mask = parent->dma_mask; mfd_add_device() 147 pdev->dev.dma_parms = parent->dma_parms; mfd_add_device() 148 pdev->dev.coherent_dma_mask = parent->coherent_dma_mask; mfd_add_device() 151 &pdev->dev, cell->parent_supplies, mfd_add_device() 160 pdev->dev.of_node = np; mfd_add_device() 166 mfd_acpi_add_device(cell, pdev); mfd_add_device() 169 ret = platform_device_add_data(pdev, mfd_add_device() 175 ret = mfd_platform_add_cell(pdev, cell, usage_count); mfd_add_device() 216 ret = platform_device_add_resources(pdev, res, cell->num_resources); mfd_add_device() 220 ret = platform_device_add(pdev); mfd_add_device() 225 pm_runtime_no_callbacks(&pdev->dev); mfd_add_device() 232 regulator_bulk_unregister_supply_alias(&pdev->dev, mfd_add_device() 238 platform_device_put(pdev); mfd_add_device() 278 struct platform_device *pdev; mfd_remove_devices_fn() local 285 pdev = to_platform_device(dev); mfd_remove_devices_fn() 286 cell = mfd_get_cell(pdev); mfd_remove_devices_fn() 295 platform_device_unregister(pdev); mfd_remove_devices_fn() 312 struct platform_device *pdev; mfd_clone_cell() local 321 pdev = to_platform_device(dev); mfd_clone_cell() 322 memcpy(&cell_entry, mfd_get_cell(pdev), sizeof(cell_entry)); mfd_clone_cell() 329 if (mfd_add_device(pdev->dev.parent, -1, &cell_entry, mfd_clone_cell() 82 mfd_acpi_add_device(const struct mfd_cell *cell, struct platform_device *pdev) mfd_acpi_add_device() argument 113 mfd_acpi_add_device(const struct mfd_cell *cell, struct platform_device *pdev) mfd_acpi_add_device() argument
|
H A D | hi6421-pmic-core.c | 45 static int hi6421_pmic_probe(struct platform_device *pdev) hi6421_pmic_probe() argument 52 pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL); hi6421_pmic_probe() 56 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); hi6421_pmic_probe() 57 base = devm_ioremap_resource(&pdev->dev, res); hi6421_pmic_probe() 61 pmic->regmap = devm_regmap_init_mmio_clk(&pdev->dev, NULL, base, hi6421_pmic_probe() 64 dev_err(&pdev->dev, hi6421_pmic_probe() 77 platform_set_drvdata(pdev, pmic); hi6421_pmic_probe() 79 ret = mfd_add_devices(&pdev->dev, 0, hi6421_devs, hi6421_pmic_probe() 82 dev_err(&pdev->dev, "add mfd devices failed: %d\n", ret); hi6421_pmic_probe() 89 static int hi6421_pmic_remove(struct platform_device *pdev) hi6421_pmic_remove() argument 91 mfd_remove_devices(&pdev->dev); hi6421_pmic_remove()
|
H A D | ti_am335x_tscadc.c | 136 static int ti_tscadc_probe(struct platform_device *pdev) ti_tscadc_probe() argument 141 struct device_node *node = pdev->dev.of_node; ti_tscadc_probe() 151 if (!pdev->dev.of_node) { ti_tscadc_probe() 152 dev_err(&pdev->dev, "Could not find valid DT data.\n"); ti_tscadc_probe() 156 node = of_get_child_by_name(pdev->dev.of_node, "tsc"); ti_tscadc_probe() 160 node = of_get_child_by_name(pdev->dev.of_node, "adc"); ti_tscadc_probe() 164 dev_err(&pdev->dev, " PIN numbers are 0..7 (not %d)\n", ti_tscadc_probe() 171 dev_err(&pdev->dev, "Number of i/p channels more than 8\n"); ti_tscadc_probe() 175 dev_err(&pdev->dev, "Need atleast one channel.\n"); ti_tscadc_probe() 180 dev_err(&pdev->dev, "Too many step configurations requested\n"); ti_tscadc_probe() 185 tscadc = devm_kzalloc(&pdev->dev, ti_tscadc_probe() 188 dev_err(&pdev->dev, "failed to allocate memory.\n"); ti_tscadc_probe() 191 tscadc->dev = &pdev->dev; ti_tscadc_probe() 193 err = platform_get_irq(pdev, 0); ti_tscadc_probe() 195 dev_err(&pdev->dev, "no irq ID is specified.\n"); ti_tscadc_probe() 200 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ti_tscadc_probe() 201 tscadc->tscadc_base = devm_ioremap_resource(&pdev->dev, res); ti_tscadc_probe() 205 tscadc->regmap_tscadc = devm_regmap_init_mmio(&pdev->dev, ti_tscadc_probe() 208 dev_err(&pdev->dev, "regmap init failed\n"); ti_tscadc_probe() 216 pm_runtime_enable(&pdev->dev); ti_tscadc_probe() 217 pm_runtime_get_sync(&pdev->dev); ti_tscadc_probe() 227 clk = clk_get(&pdev->dev, "adc_tsc_fck"); ti_tscadc_probe() 229 dev_err(&pdev->dev, "failed to get TSC fck\n"); ti_tscadc_probe() 283 err = mfd_add_devices(&pdev->dev, pdev->id, tscadc->cells, ti_tscadc_probe() 288 device_init_wakeup(&pdev->dev, true); ti_tscadc_probe() 289 platform_set_drvdata(pdev, tscadc); ti_tscadc_probe() 293 pm_runtime_put_sync(&pdev->dev); ti_tscadc_probe() 294 pm_runtime_disable(&pdev->dev); ti_tscadc_probe() 299 static int ti_tscadc_remove(struct platform_device *pdev) ti_tscadc_remove() argument 301 struct ti_tscadc_dev *tscadc = platform_get_drvdata(pdev); ti_tscadc_remove() 305 pm_runtime_put_sync(&pdev->dev); ti_tscadc_remove() 306 pm_runtime_disable(&pdev->dev); ti_tscadc_remove()
|
H A D | intel_quark_i2c_gpio.c | 54 struct pci_dev *pdev; member in struct:intel_quark_mfd 116 struct pci_dev *pdev = quark_mfd->pdev; intel_quark_register_i2c_clk() local 121 i2c_clk_lookup = devm_kcalloc(&pdev->dev, INTEL_QUARK_I2C_NCLK, intel_quark_register_i2c_clk() 128 i2c_clk = clk_register_fixed_rate(&pdev->dev, intel_quark_register_i2c_clk() 138 dev_err(&pdev->dev, "Fixed clk register failed: %d\n", ret); intel_quark_register_i2c_clk() 143 static void intel_quark_unregister_i2c_clk(struct pci_dev *pdev) intel_quark_unregister_i2c_clk() argument 145 struct intel_quark_mfd *quark_mfd = dev_get_drvdata(&pdev->dev); intel_quark_unregister_i2c_clk() 154 static int intel_quark_i2c_setup(struct pci_dev *pdev, struct mfd_cell *cell) intel_quark_i2c_setup() argument 160 struct device *dev = &pdev->dev; intel_quark_i2c_setup() 163 pci_resource_start(pdev, MFD_I2C_BAR); intel_quark_i2c_setup() 165 pci_resource_end(pdev, MFD_I2C_BAR); intel_quark_i2c_setup() 167 res[INTEL_QUARK_IORES_IRQ].start = pdev->irq; intel_quark_i2c_setup() 168 res[INTEL_QUARK_IORES_IRQ].end = pdev->irq; intel_quark_i2c_setup() 192 static int intel_quark_gpio_setup(struct pci_dev *pdev, struct mfd_cell *cell) intel_quark_gpio_setup() argument 196 struct device *dev = &pdev->dev; intel_quark_gpio_setup() 199 pci_resource_start(pdev, MFD_GPIO_BAR); intel_quark_gpio_setup() 201 pci_resource_end(pdev, MFD_GPIO_BAR); intel_quark_gpio_setup() 221 pdata->properties->irq = pdev->irq; intel_quark_gpio_setup() 230 static int intel_quark_mfd_probe(struct pci_dev *pdev, intel_quark_mfd_probe() argument 236 ret = pcim_enable_device(pdev); intel_quark_mfd_probe() 240 quark_mfd = devm_kzalloc(&pdev->dev, sizeof(*quark_mfd), GFP_KERNEL); intel_quark_mfd_probe() 243 quark_mfd->pdev = pdev; intel_quark_mfd_probe() 249 dev_set_drvdata(&pdev->dev, quark_mfd); intel_quark_mfd_probe() 251 ret = intel_quark_i2c_setup(pdev, &intel_quark_mfd_cells[1]); intel_quark_mfd_probe() 255 ret = intel_quark_gpio_setup(pdev, &intel_quark_mfd_cells[0]); intel_quark_mfd_probe() 259 return mfd_add_devices(&pdev->dev, 0, intel_quark_mfd_cells, intel_quark_mfd_probe() 264 static void intel_quark_mfd_remove(struct pci_dev *pdev) intel_quark_mfd_remove() argument 266 intel_quark_unregister_i2c_clk(pdev); intel_quark_mfd_remove() 267 mfd_remove_devices(&pdev->dev); intel_quark_mfd_remove()
|
H A D | cs5535-mfd.c | 42 static int cs5535_mfd_res_enable(struct platform_device *pdev) cs5535_mfd_res_enable() argument 46 res = platform_get_resource(pdev, IORESOURCE_IO, 0); cs5535_mfd_res_enable() 48 dev_err(&pdev->dev, "can't fetch device resource info\n"); cs5535_mfd_res_enable() 53 dev_err(&pdev->dev, "can't request region\n"); cs5535_mfd_res_enable() 60 static int cs5535_mfd_res_disable(struct platform_device *pdev) cs5535_mfd_res_disable() argument 63 res = platform_get_resource(pdev, IORESOURCE_IO, 0); cs5535_mfd_res_disable() 65 dev_err(&pdev->dev, "can't fetch device resource info\n"); cs5535_mfd_res_disable() 128 static int cs5535_mfd_probe(struct pci_dev *pdev, cs5535_mfd_probe() argument 133 err = pci_enable_device(pdev); cs5535_mfd_probe() 143 r->start = pci_resource_start(pdev, bar); cs5535_mfd_probe() 144 r->end = pci_resource_end(pdev, bar); cs5535_mfd_probe() 150 err = mfd_add_devices(&pdev->dev, -1, cs5535_mfd_cells, cs5535_mfd_probe() 153 dev_err(&pdev->dev, "MFD add devices failed: %d\n", err); cs5535_mfd_probe() 158 dev_info(&pdev->dev, "%zu devices registered.\n", cs5535_mfd_probe() 164 pci_disable_device(pdev); cs5535_mfd_probe() 168 static void cs5535_mfd_remove(struct pci_dev *pdev) cs5535_mfd_remove() argument 170 mfd_remove_devices(&pdev->dev); cs5535_mfd_remove() 171 pci_disable_device(pdev); cs5535_mfd_remove()
|
H A D | htc-pasic3.c | 76 static int ds1wm_enable(struct platform_device *pdev) ds1wm_enable() argument 78 struct device *dev = pdev->dev.parent; ds1wm_enable() 88 static int ds1wm_disable(struct platform_device *pdev) ds1wm_disable() argument 90 struct device *dev = pdev->dev.parent; ds1wm_disable() 127 static int __init pasic3_probe(struct platform_device *pdev) pasic3_probe() argument 129 struct pasic3_platform_data *pdata = dev_get_platdata(&pdev->dev); pasic3_probe() 130 struct device *dev = &pdev->dev; pasic3_probe() 136 r = platform_get_resource(pdev, IORESOURCE_IRQ, 0); pasic3_probe() 143 r = platform_get_resource(pdev, IORESOURCE_MEM, 0); pasic3_probe() 154 platform_set_drvdata(pdev, asic); pasic3_probe() 169 ret = mfd_add_devices(&pdev->dev, pdev->id, pasic3_probe() 178 ret = mfd_add_devices(&pdev->dev, pdev->id, &led_cell, 1, r, pasic3_probe() 187 static int pasic3_remove(struct platform_device *pdev) pasic3_remove() argument 189 struct pasic3_data *asic = platform_get_drvdata(pdev); pasic3_remove() 192 mfd_remove_devices(&pdev->dev); pasic3_remove() 195 r = platform_get_resource(pdev, IORESOURCE_MEM, 0); pasic3_remove()
|
/linux-4.1.27/drivers/w1/masters/ |
H A D | ds2482.c | 114 struct ds2482_data *pdev; member in struct:ds2482_w1_chan 147 * @param pdev The ds2482 client pointer 151 static inline int ds2482_select_register(struct ds2482_data *pdev, u8 read_ptr) ds2482_select_register() argument 153 if (pdev->read_prt != read_ptr) { ds2482_select_register() 154 if (i2c_smbus_write_byte_data(pdev->client, ds2482_select_register() 159 pdev->read_prt = read_ptr; ds2482_select_register() 166 * @param pdev The ds2482 client pointer 172 static inline int ds2482_send_cmd(struct ds2482_data *pdev, u8 cmd) ds2482_send_cmd() argument 174 if (i2c_smbus_write_byte(pdev->client, cmd) < 0) ds2482_send_cmd() 177 pdev->read_prt = DS2482_PTR_CODE_STATUS; ds2482_send_cmd() 183 * @param pdev The ds2482 client pointer 191 static inline int ds2482_send_cmd_data(struct ds2482_data *pdev, ds2482_send_cmd_data() argument 194 if (i2c_smbus_write_byte_data(pdev->client, cmd, byte) < 0) ds2482_send_cmd_data() 198 pdev->read_prt = (cmd != DS2482_CMD_WRITE_CONFIG) ? ds2482_send_cmd_data() 213 * @param pdev Pointer to the device structure 216 static int ds2482_wait_1wire_idle(struct ds2482_data *pdev) ds2482_wait_1wire_idle() argument 221 if (!ds2482_select_register(pdev, DS2482_PTR_CODE_STATUS)) { ds2482_wait_1wire_idle() 223 temp = i2c_smbus_read_byte(pdev->client); ds2482_wait_1wire_idle() 230 __func__, pdev->channel); ds2482_wait_1wire_idle() 239 * @param pdev The ds2482 client pointer 243 static int ds2482_set_channel(struct ds2482_data *pdev, u8 channel) ds2482_set_channel() argument 245 if (i2c_smbus_write_byte_data(pdev->client, DS2482_CMD_CHANNEL_SELECT, ds2482_set_channel() 249 pdev->read_prt = DS2482_PTR_CODE_CHANNEL; ds2482_set_channel() 250 pdev->channel = -1; ds2482_set_channel() 251 if (i2c_smbus_read_byte(pdev->client) == ds2482_chan_rd[channel]) { ds2482_set_channel() 252 pdev->channel = channel; ds2482_set_channel() 269 struct ds2482_data *pdev = pchan->pdev; ds2482_w1_touch_bit() local 272 mutex_lock(&pdev->access_lock); ds2482_w1_touch_bit() 275 ds2482_wait_1wire_idle(pdev); ds2482_w1_touch_bit() 276 if (pdev->w1_count > 1) ds2482_w1_touch_bit() 277 ds2482_set_channel(pdev, pchan->channel); ds2482_w1_touch_bit() 280 if (!ds2482_send_cmd_data(pdev, DS2482_CMD_1WIRE_SINGLE_BIT, ds2482_w1_touch_bit() 282 status = ds2482_wait_1wire_idle(pdev); ds2482_w1_touch_bit() 284 mutex_unlock(&pdev->access_lock); ds2482_w1_touch_bit() 301 struct ds2482_data *pdev = pchan->pdev; ds2482_w1_triplet() local 304 mutex_lock(&pdev->access_lock); ds2482_w1_triplet() 307 ds2482_wait_1wire_idle(pdev); ds2482_w1_triplet() 308 if (pdev->w1_count > 1) ds2482_w1_triplet() 309 ds2482_set_channel(pdev, pchan->channel); ds2482_w1_triplet() 312 if (!ds2482_send_cmd_data(pdev, DS2482_CMD_1WIRE_TRIPLET, ds2482_w1_triplet() 314 status = ds2482_wait_1wire_idle(pdev); ds2482_w1_triplet() 316 mutex_unlock(&pdev->access_lock); ds2482_w1_triplet() 331 struct ds2482_data *pdev = pchan->pdev; ds2482_w1_write_byte() local 333 mutex_lock(&pdev->access_lock); ds2482_w1_write_byte() 336 ds2482_wait_1wire_idle(pdev); ds2482_w1_write_byte() 337 if (pdev->w1_count > 1) ds2482_w1_write_byte() 338 ds2482_set_channel(pdev, pchan->channel); ds2482_w1_write_byte() 341 ds2482_send_cmd_data(pdev, DS2482_CMD_1WIRE_WRITE_BYTE, byte); ds2482_w1_write_byte() 343 mutex_unlock(&pdev->access_lock); ds2482_w1_write_byte() 355 struct ds2482_data *pdev = pchan->pdev; ds2482_w1_read_byte() local 358 mutex_lock(&pdev->access_lock); ds2482_w1_read_byte() 361 ds2482_wait_1wire_idle(pdev); ds2482_w1_read_byte() 362 if (pdev->w1_count > 1) ds2482_w1_read_byte() 363 ds2482_set_channel(pdev, pchan->channel); ds2482_w1_read_byte() 366 ds2482_send_cmd(pdev, DS2482_CMD_1WIRE_READ_BYTE); ds2482_w1_read_byte() 369 ds2482_wait_1wire_idle(pdev); ds2482_w1_read_byte() 372 ds2482_select_register(pdev, DS2482_PTR_CODE_DATA); ds2482_w1_read_byte() 375 result = i2c_smbus_read_byte(pdev->client); ds2482_w1_read_byte() 377 mutex_unlock(&pdev->access_lock); ds2482_w1_read_byte() 392 struct ds2482_data *pdev = pchan->pdev; ds2482_w1_reset_bus() local 396 mutex_lock(&pdev->access_lock); ds2482_w1_reset_bus() 399 ds2482_wait_1wire_idle(pdev); ds2482_w1_reset_bus() 400 if (pdev->w1_count > 1) ds2482_w1_reset_bus() 401 ds2482_set_channel(pdev, pchan->channel); ds2482_w1_reset_bus() 404 err = ds2482_send_cmd(pdev, DS2482_CMD_1WIRE_RESET); ds2482_w1_reset_bus() 407 err = ds2482_wait_1wire_idle(pdev); ds2482_w1_reset_bus() 412 ds2482_send_cmd_data(pdev, DS2482_CMD_WRITE_CONFIG, ds2482_w1_reset_bus() 416 mutex_unlock(&pdev->access_lock); ds2482_w1_reset_bus() 424 struct ds2482_data *pdev = pchan->pdev; ds2482_w1_set_pullup() local 436 ds2482_wait_1wire_idle(pdev); ds2482_w1_set_pullup() 438 retval = ds2482_send_cmd_data(pdev, DS2482_CMD_WRITE_CONFIG, ds2482_w1_set_pullup() 441 ds2482_wait_1wire_idle(pdev); ds2482_w1_set_pullup() 499 data->w1_ch[idx].pdev = data; ds2482_probe() 513 data->w1_ch[idx].pdev = NULL; ds2482_probe() 522 if (data->w1_ch[idx].pdev != NULL) ds2482_probe() 538 if (data->w1_ch[idx].pdev != NULL) ds2482_remove()
|
H A D | w1-gpio.c | 78 static int w1_gpio_probe_dt(struct platform_device *pdev) w1_gpio_probe_dt() argument 80 struct w1_gpio_platform_data *pdata = dev_get_platdata(&pdev->dev); w1_gpio_probe_dt() 81 struct device_node *np = pdev->dev.of_node; w1_gpio_probe_dt() 84 pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); w1_gpio_probe_dt() 94 dev_err(&pdev->dev, w1_gpio_probe_dt() 108 pdev->dev.platform_data = pdata; w1_gpio_probe_dt() 113 static int w1_gpio_probe(struct platform_device *pdev) w1_gpio_probe() argument 120 err = w1_gpio_probe_dt(pdev); w1_gpio_probe() 125 pdata = dev_get_platdata(&pdev->dev); w1_gpio_probe() 128 dev_err(&pdev->dev, "No configuration data\n"); w1_gpio_probe() 132 master = devm_kzalloc(&pdev->dev, sizeof(struct w1_bus_master), w1_gpio_probe() 135 dev_err(&pdev->dev, "Out of memory\n"); w1_gpio_probe() 139 err = devm_gpio_request(&pdev->dev, pdata->pin, "w1"); w1_gpio_probe() 141 dev_err(&pdev->dev, "gpio_request (pin) failed\n"); w1_gpio_probe() 146 err = devm_gpio_request_one(&pdev->dev, w1_gpio_probe() 150 dev_err(&pdev->dev, "gpio_request_one " w1_gpio_probe() 170 dev_err(&pdev->dev, "w1_add_master device failed\n"); w1_gpio_probe() 180 platform_set_drvdata(pdev, master); w1_gpio_probe() 185 static int w1_gpio_remove(struct platform_device *pdev) w1_gpio_remove() argument 187 struct w1_bus_master *master = platform_get_drvdata(pdev); w1_gpio_remove() 188 struct w1_gpio_platform_data *pdata = dev_get_platdata(&pdev->dev); w1_gpio_remove() 203 static int w1_gpio_suspend(struct platform_device *pdev, pm_message_t state) w1_gpio_suspend() argument 205 struct w1_gpio_platform_data *pdata = dev_get_platdata(&pdev->dev); w1_gpio_suspend() 213 static int w1_gpio_resume(struct platform_device *pdev) w1_gpio_resume() argument 215 struct w1_gpio_platform_data *pdata = dev_get_platdata(&pdev->dev); w1_gpio_resume()
|
/linux-4.1.27/drivers/staging/iio/adc/ |
H A D | ad7606_par.c | 21 struct platform_device *pdev = to_platform_device(dev); ad7606_par16_read_block() local 22 struct iio_dev *indio_dev = platform_get_drvdata(pdev); ad7606_par16_read_block() 37 struct platform_device *pdev = to_platform_device(dev); ad7606_par8_read_block() local 38 struct iio_dev *indio_dev = platform_get_drvdata(pdev); ad7606_par8_read_block() 50 static int ad7606_par_probe(struct platform_device *pdev) ad7606_par_probe() argument 58 irq = platform_get_irq(pdev, 0); ad7606_par_probe() 60 dev_err(&pdev->dev, "no irq\n"); ad7606_par_probe() 64 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ad7606_par_probe() 65 addr = devm_ioremap_resource(&pdev->dev, res); ad7606_par_probe() 71 indio_dev = ad7606_probe(&pdev->dev, irq, addr, ad7606_par_probe() 72 platform_get_device_id(pdev)->driver_data, ad7606_par_probe() 79 platform_set_drvdata(pdev, indio_dev); ad7606_par_probe() 84 static int ad7606_par_remove(struct platform_device *pdev) ad7606_par_remove() argument 86 struct iio_dev *indio_dev = platform_get_drvdata(pdev); ad7606_par_remove() 88 ad7606_remove(indio_dev, platform_get_irq(pdev, 0)); ad7606_par_remove()
|
/linux-4.1.27/drivers/input/keyboard/ |
H A D | opencores-kbd.c | 39 static int opencores_kbd_probe(struct platform_device *pdev) opencores_kbd_probe() argument 46 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); opencores_kbd_probe() 48 dev_err(&pdev->dev, "missing board memory resource\n"); opencores_kbd_probe() 52 irq = platform_get_irq(pdev, 0); opencores_kbd_probe() 54 dev_err(&pdev->dev, "missing board IRQ resource\n"); opencores_kbd_probe() 58 opencores_kbd = devm_kzalloc(&pdev->dev, sizeof(*opencores_kbd), opencores_kbd_probe() 63 input = devm_input_allocate_device(&pdev->dev); opencores_kbd_probe() 65 dev_err(&pdev->dev, "failed to allocate input device\n"); opencores_kbd_probe() 71 opencores_kbd->addr = devm_ioremap_resource(&pdev->dev, res); opencores_kbd_probe() 75 input->name = pdev->name; opencores_kbd_probe() 101 error = devm_request_irq(&pdev->dev, irq, &opencores_kbd_isr, opencores_kbd_probe() 103 pdev->name, opencores_kbd); opencores_kbd_probe() 105 dev_err(&pdev->dev, "unable to claim irq %d\n", irq); opencores_kbd_probe() 111 dev_err(&pdev->dev, "unable to register input device\n"); opencores_kbd_probe() 115 platform_set_drvdata(pdev, opencores_kbd); opencores_kbd_probe()
|
H A D | sh_keysc.c | 86 struct platform_device *pdev = dev_id; sh_keysc_isr() local 87 struct sh_keysc_priv *priv = platform_get_drvdata(pdev); sh_keysc_isr() 97 dev_dbg(&pdev->dev, "isr!\n"); sh_keysc_isr() 132 sh_keysc_map_dbg(&pdev->dev, keys, "keys"); sh_keysc_isr() 136 sh_keysc_map_dbg(&pdev->dev, priv->last_keys, "last_keys"); sh_keysc_isr() 137 sh_keysc_map_dbg(&pdev->dev, keys0, "keys0"); sh_keysc_isr() 138 sh_keysc_map_dbg(&pdev->dev, keys1, "keys1"); sh_keysc_isr() 164 static int sh_keysc_probe(struct platform_device *pdev) sh_keysc_probe() argument 173 if (!dev_get_platdata(&pdev->dev)) { sh_keysc_probe() 174 dev_err(&pdev->dev, "no platform data defined\n"); sh_keysc_probe() 180 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); sh_keysc_probe() 182 dev_err(&pdev->dev, "failed to get I/O memory\n"); sh_keysc_probe() 186 irq = platform_get_irq(pdev, 0); sh_keysc_probe() 188 dev_err(&pdev->dev, "failed to get irq\n"); sh_keysc_probe() 194 dev_err(&pdev->dev, "failed to allocate driver data\n"); sh_keysc_probe() 199 platform_set_drvdata(pdev, priv); sh_keysc_probe() 200 memcpy(&priv->pdata, dev_get_platdata(&pdev->dev), sizeof(priv->pdata)); sh_keysc_probe() 205 dev_err(&pdev->dev, "failed to remap I/O memory\n"); sh_keysc_probe() 212 dev_err(&pdev->dev, "failed to allocate input device\n"); sh_keysc_probe() 220 input->name = pdev->name; sh_keysc_probe() 222 input->dev.parent = &pdev->dev; sh_keysc_probe() 234 dev_name(&pdev->dev), pdev); sh_keysc_probe() 236 dev_err(&pdev->dev, "failed to request IRQ\n"); sh_keysc_probe() 246 dev_err(&pdev->dev, "failed to register input device\n"); sh_keysc_probe() 250 pm_runtime_enable(&pdev->dev); sh_keysc_probe() 251 pm_runtime_get_sync(&pdev->dev); sh_keysc_probe() 257 device_init_wakeup(&pdev->dev, 1); sh_keysc_probe() 262 free_irq(irq, pdev); sh_keysc_probe() 273 static int sh_keysc_remove(struct platform_device *pdev) sh_keysc_remove() argument 275 struct sh_keysc_priv *priv = platform_get_drvdata(pdev); sh_keysc_remove() 280 free_irq(platform_get_irq(pdev, 0), pdev); sh_keysc_remove() 283 pm_runtime_put_sync(&pdev->dev); sh_keysc_remove() 284 pm_runtime_disable(&pdev->dev); sh_keysc_remove() 294 struct platform_device *pdev = to_platform_device(dev); sh_keysc_suspend() local 295 struct sh_keysc_priv *priv = platform_get_drvdata(pdev); sh_keysc_suspend() 296 int irq = platform_get_irq(pdev, 0); sh_keysc_suspend() 314 struct platform_device *pdev = to_platform_device(dev); sh_keysc_resume() local 315 int irq = platform_get_irq(pdev, 0); sh_keysc_resume()
|
H A D | spear-keyboard.c | 148 static int spear_kbd_parse_dt(struct platform_device *pdev, spear_kbd_parse_dt() argument 151 struct device_node *np = pdev->dev.of_node; spear_kbd_parse_dt() 156 dev_err(&pdev->dev, "Missing DT data\n"); spear_kbd_parse_dt() 168 dev_err(&pdev->dev, "DT: Invalid or missing mode\n"); spear_kbd_parse_dt() 176 static inline int spear_kbd_parse_dt(struct platform_device *pdev, spear_kbd_parse_dt() argument 183 static int spear_kbd_probe(struct platform_device *pdev) spear_kbd_probe() argument 185 struct kbd_platform_data *pdata = dev_get_platdata(&pdev->dev); spear_kbd_probe() 193 irq = platform_get_irq(pdev, 0); spear_kbd_probe() 195 dev_err(&pdev->dev, "not able to get irq for the device\n"); spear_kbd_probe() 199 kbd = devm_kzalloc(&pdev->dev, sizeof(*kbd), GFP_KERNEL); spear_kbd_probe() 201 dev_err(&pdev->dev, "not enough memory for driver data\n"); spear_kbd_probe() 205 input_dev = devm_input_allocate_device(&pdev->dev); spear_kbd_probe() 207 dev_err(&pdev->dev, "unable to allocate input device\n"); spear_kbd_probe() 215 error = spear_kbd_parse_dt(pdev, kbd); spear_kbd_probe() 224 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); spear_kbd_probe() 225 kbd->io_base = devm_ioremap_resource(&pdev->dev, res); spear_kbd_probe() 229 kbd->clk = devm_clk_get(&pdev->dev, NULL); spear_kbd_probe() 245 dev_err(&pdev->dev, "Failed to build keymap\n"); spear_kbd_probe() 255 error = devm_request_irq(&pdev->dev, irq, spear_kbd_interrupt, 0, spear_kbd_probe() 258 dev_err(&pdev->dev, "request_irq failed\n"); spear_kbd_probe() 268 dev_err(&pdev->dev, "Unable to register keyboard device\n"); spear_kbd_probe() 273 device_init_wakeup(&pdev->dev, 1); spear_kbd_probe() 274 platform_set_drvdata(pdev, kbd); spear_kbd_probe() 279 static int spear_kbd_remove(struct platform_device *pdev) spear_kbd_remove() argument 281 struct spear_kbd *kbd = platform_get_drvdata(pdev); spear_kbd_remove() 286 device_init_wakeup(&pdev->dev, 0); spear_kbd_remove() 294 struct platform_device *pdev = to_platform_device(dev); spear_kbd_suspend() local 295 struct spear_kbd *kbd = platform_get_drvdata(pdev); spear_kbd_suspend() 306 if (device_may_wakeup(&pdev->dev)) { spear_kbd_suspend() 347 struct platform_device *pdev = to_platform_device(dev); spear_kbd_resume() local 348 struct spear_kbd *kbd = platform_get_drvdata(pdev); spear_kbd_resume() 353 if (device_may_wakeup(&pdev->dev)) { spear_kbd_resume()
|
H A D | bf54x-keys.c | 132 struct platform_device *pdev = (struct platform_device *) data; bfin_kpad_timer() local 133 struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev); bfin_kpad_timer() 153 struct platform_device *pdev = dev_id; bfin_kpad_isr() local 154 struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev); bfin_kpad_isr() 179 static int bfin_kpad_probe(struct platform_device *pdev) bfin_kpad_probe() argument 182 struct bfin_kpad_platform_data *pdata = dev_get_platdata(&pdev->dev); bfin_kpad_probe() 187 dev_err(&pdev->dev, "no rows, cols or keymap from pdata\n"); bfin_kpad_probe() 193 dev_err(&pdev->dev, "invalid keymapsize\n"); bfin_kpad_probe() 201 platform_set_drvdata(pdev, bf54x_kpad); bfin_kpad_probe() 213 dev_warn(&pdev->dev, bfin_kpad_probe() 233 dev_err(&pdev->dev, "requesting peripherals failed\n"); bfin_kpad_probe() 240 dev_err(&pdev->dev, "requesting peripherals failed\n"); bfin_kpad_probe() 245 bf54x_kpad->irq = platform_get_irq(pdev, 0); bfin_kpad_probe() 252 0, DRV_NAME, pdev); bfin_kpad_probe() 254 dev_err(&pdev->dev, "unable to claim irq %d\n", bfin_kpad_probe() 267 input->name = pdev->name; bfin_kpad_probe() 269 input->dev.parent = &pdev->dev; bfin_kpad_probe() 297 dev_err(&pdev->dev, "unable to register input device\n"); bfin_kpad_probe() 303 setup_timer(&bf54x_kpad->timer, bfin_kpad_timer, (unsigned long) pdev); bfin_kpad_probe() 313 device_init_wakeup(&pdev->dev, 1); bfin_kpad_probe() 320 free_irq(bf54x_kpad->irq, pdev); bfin_kpad_probe() 333 static int bfin_kpad_remove(struct platform_device *pdev) bfin_kpad_remove() argument 335 struct bfin_kpad_platform_data *pdata = dev_get_platdata(&pdev->dev); bfin_kpad_remove() 336 struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev); bfin_kpad_remove() 339 free_irq(bf54x_kpad->irq, pdev); bfin_kpad_remove() 353 static int bfin_kpad_suspend(struct platform_device *pdev, pm_message_t state) bfin_kpad_suspend() argument 355 struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev); bfin_kpad_suspend() 361 if (device_may_wakeup(&pdev->dev)) bfin_kpad_suspend() 367 static int bfin_kpad_resume(struct platform_device *pdev) bfin_kpad_resume() argument 369 struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev); bfin_kpad_resume() 375 if (device_may_wakeup(&pdev->dev)) bfin_kpad_resume()
|
H A D | samsung-keypad.c | 68 struct platform_device *pdev; member in struct:samsung_keypad 156 pm_runtime_get_sync(&keypad->pdev->dev); samsung_keypad_irq() 172 pm_runtime_put(&keypad->pdev->dev); samsung_keypad_irq() 181 pm_runtime_get_sync(&keypad->pdev->dev); samsung_keypad_start() 196 pm_runtime_put(&keypad->pdev->dev); samsung_keypad_start() 203 pm_runtime_get_sync(&keypad->pdev->dev); samsung_keypad_stop() 226 pm_runtime_put(&keypad->pdev->dev); samsung_keypad_stop() 317 static int samsung_keypad_probe(struct platform_device *pdev) samsung_keypad_probe() argument 328 pdata = dev_get_platdata(&pdev->dev); samsung_keypad_probe() 330 pdata = samsung_keypad_parse_dt(&pdev->dev); samsung_keypad_probe() 337 dev_err(&pdev->dev, "no keymap data defined\n"); samsung_keypad_probe() 354 keypad = devm_kzalloc(&pdev->dev, sizeof(*keypad) + keymap_size, samsung_keypad_probe() 356 input_dev = devm_input_allocate_device(&pdev->dev); samsung_keypad_probe() 360 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); samsung_keypad_probe() 364 keypad->base = devm_ioremap(&pdev->dev, res->start, resource_size(res)); samsung_keypad_probe() 368 keypad->clk = devm_clk_get(&pdev->dev, "keypad"); samsung_keypad_probe() 370 dev_err(&pdev->dev, "failed to get keypad clk\n"); samsung_keypad_probe() 376 dev_err(&pdev->dev, "keypad clock prepare failed\n"); samsung_keypad_probe() 381 keypad->pdev = pdev; samsung_keypad_probe() 388 if (pdev->dev.of_node) samsung_keypad_probe() 389 keypad->type = of_device_is_compatible(pdev->dev.of_node, samsung_keypad_probe() 392 keypad->type = platform_get_device_id(pdev)->driver_data; samsung_keypad_probe() 394 input_dev->name = pdev->name; samsung_keypad_probe() 396 input_dev->dev.parent = &pdev->dev; samsung_keypad_probe() 405 dev_err(&pdev->dev, "failed to build keymap\n"); samsung_keypad_probe() 415 keypad->irq = platform_get_irq(pdev, 0); samsung_keypad_probe() 421 error = devm_request_threaded_irq(&pdev->dev, keypad->irq, NULL, samsung_keypad_probe() 423 dev_name(&pdev->dev), keypad); samsung_keypad_probe() 425 dev_err(&pdev->dev, "failed to register keypad interrupt\n"); samsung_keypad_probe() 429 device_init_wakeup(&pdev->dev, pdata->wakeup); samsung_keypad_probe() 430 platform_set_drvdata(pdev, keypad); samsung_keypad_probe() 431 pm_runtime_enable(&pdev->dev); samsung_keypad_probe() 437 if (pdev->dev.of_node) { samsung_keypad_probe() 438 devm_kfree(&pdev->dev, (void *)pdata->keymap_data->keymap); samsung_keypad_probe() 439 devm_kfree(&pdev->dev, (void *)pdata->keymap_data); samsung_keypad_probe() 440 devm_kfree(&pdev->dev, (void *)pdata); samsung_keypad_probe() 445 pm_runtime_disable(&pdev->dev); samsung_keypad_probe() 446 device_init_wakeup(&pdev->dev, 0); samsung_keypad_probe() 452 static int samsung_keypad_remove(struct platform_device *pdev) samsung_keypad_remove() argument 454 struct samsung_keypad *keypad = platform_get_drvdata(pdev); samsung_keypad_remove() 456 pm_runtime_disable(&pdev->dev); samsung_keypad_remove() 457 device_init_wakeup(&pdev->dev, 0); samsung_keypad_remove() 469 struct platform_device *pdev = to_platform_device(dev); samsung_keypad_runtime_suspend() local 470 struct samsung_keypad *keypad = platform_get_drvdata(pdev); samsung_keypad_runtime_suspend() 493 struct platform_device *pdev = to_platform_device(dev); samsung_keypad_runtime_resume() local 494 struct samsung_keypad *keypad = platform_get_drvdata(pdev); samsung_keypad_runtime_resume() 524 if (device_may_wakeup(&keypad->pdev->dev)) samsung_keypad_toggle_wakeup() 528 if (device_may_wakeup(&keypad->pdev->dev)) samsung_keypad_toggle_wakeup() 538 struct platform_device *pdev = to_platform_device(dev); samsung_keypad_suspend() local 539 struct samsung_keypad *keypad = platform_get_drvdata(pdev); samsung_keypad_suspend() 556 struct platform_device *pdev = to_platform_device(dev); samsung_keypad_resume() local 557 struct samsung_keypad *keypad = platform_get_drvdata(pdev); samsung_keypad_resume()
|
H A D | omap4-keypad.c | 237 static int omap4_keypad_probe(struct platform_device *pdev) omap4_keypad_probe() argument 247 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); omap4_keypad_probe() 249 dev_err(&pdev->dev, "no base address specified\n"); omap4_keypad_probe() 253 irq = platform_get_irq(pdev, 0); omap4_keypad_probe() 255 dev_err(&pdev->dev, "no keyboard irq assigned\n"); omap4_keypad_probe() 261 dev_err(&pdev->dev, "keypad_data memory allocation failed\n"); omap4_keypad_probe() 267 error = omap4_keypad_parse_dt(&pdev->dev, keypad_data); omap4_keypad_probe() 271 res = request_mem_region(res->start, resource_size(res), pdev->name); omap4_keypad_probe() 273 dev_err(&pdev->dev, "can't request mem region\n"); omap4_keypad_probe() 280 dev_err(&pdev->dev, "can't ioremap mem resource\n"); omap4_keypad_probe() 290 pm_runtime_enable(&pdev->dev); omap4_keypad_probe() 291 error = pm_runtime_get_sync(&pdev->dev); omap4_keypad_probe() 293 dev_err(&pdev->dev, "pm_runtime_get_sync() failed\n"); omap4_keypad_probe() 309 dev_err(&pdev->dev, omap4_keypad_probe() 322 input_dev->name = pdev->name; omap4_keypad_probe() 323 input_dev->dev.parent = &pdev->dev; omap4_keypad_probe() 343 dev_err(&pdev->dev, "Not enough memory for keymap\n"); omap4_keypad_probe() 352 dev_err(&pdev->dev, "failed to build keymap\n"); omap4_keypad_probe() 360 dev_err(&pdev->dev, "failed to register interrupt\n"); omap4_keypad_probe() 364 device_init_wakeup(&pdev->dev, true); omap4_keypad_probe() 365 pm_runtime_put_sync(&pdev->dev); omap4_keypad_probe() 369 dev_err(&pdev->dev, "failed to register input device\n"); omap4_keypad_probe() 373 platform_set_drvdata(pdev, keypad_data); omap4_keypad_probe() 377 pm_runtime_disable(&pdev->dev); omap4_keypad_probe() 378 device_init_wakeup(&pdev->dev, false); omap4_keypad_probe() 385 pm_runtime_put_sync(&pdev->dev); omap4_keypad_probe() 395 static int omap4_keypad_remove(struct platform_device *pdev) omap4_keypad_remove() argument 397 struct omap4_keypad *keypad_data = platform_get_drvdata(pdev); omap4_keypad_remove() 402 pm_runtime_disable(&pdev->dev); omap4_keypad_remove() 404 device_init_wakeup(&pdev->dev, false); omap4_keypad_remove() 410 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); omap4_keypad_remove() 428 struct platform_device *pdev = to_platform_device(dev); omap4_keypad_suspend() local 429 struct omap4_keypad *keypad_data = platform_get_drvdata(pdev); omap4_keypad_suspend() 432 if (device_may_wakeup(&pdev->dev)) { omap4_keypad_suspend() 443 struct platform_device *pdev = to_platform_device(dev); omap4_keypad_resume() local 444 struct omap4_keypad *keypad_data = platform_get_drvdata(pdev); omap4_keypad_resume() 446 if (device_may_wakeup(&pdev->dev) && keypad_data->irq_wake_enabled) { omap4_keypad_resume()
|
/linux-4.1.27/drivers/mcb/ |
H A D | mcb-pci.c | 28 struct pci_dev *pdev = to_pci_dev(dev); mcb_pci_get_irq() local 30 return pdev->irq; mcb_pci_get_irq() 33 static int mcb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) mcb_pci_probe() argument 41 priv = devm_kzalloc(&pdev->dev, sizeof(struct priv), GFP_KERNEL); mcb_pci_probe() 45 ret = pci_enable_device(pdev); mcb_pci_probe() 47 dev_err(&pdev->dev, "Failed to enable PCI device\n"); mcb_pci_probe() 51 priv->mapbase = pci_resource_start(pdev, 0); mcb_pci_probe() 53 dev_err(&pdev->dev, "No PCI resource\n"); mcb_pci_probe() 60 dev_err(&pdev->dev, "Failed to request PCI memory\n"); mcb_pci_probe() 67 dev_err(&pdev->dev, "Cannot ioremap\n"); mcb_pci_probe() 72 flags = pci_resource_flags(pdev, 0); mcb_pci_probe() 75 dev_err(&pdev->dev, mcb_pci_probe() 80 pci_set_drvdata(pdev, priv); mcb_pci_probe() 82 priv->bus = mcb_alloc_bus(&pdev->dev); mcb_pci_probe() 95 dev_dbg(&pdev->dev, "Found %d cells\n", num_cells); mcb_pci_probe() 104 pci_release_region(pdev, 0); mcb_pci_probe() 106 pci_disable_device(pdev); mcb_pci_probe() 110 static void mcb_pci_remove(struct pci_dev *pdev) mcb_pci_remove() argument 112 struct priv *priv = pci_get_drvdata(pdev); mcb_pci_remove() 118 pci_disable_device(pdev); mcb_pci_remove()
|
/linux-4.1.27/drivers/input/misc/ |
H A D | e3x0-button.c | 48 struct platform_device *pdev = to_platform_device(dev); e3x0_button_suspend() local 51 enable_irq_wake(platform_get_irq_byname(pdev, "press")); e3x0_button_suspend() 58 struct platform_device *pdev = to_platform_device(dev); e3x0_button_resume() local 61 disable_irq_wake(platform_get_irq_byname(pdev, "press")); e3x0_button_resume() 69 static int e3x0_button_probe(struct platform_device *pdev) e3x0_button_probe() argument 75 irq_press = platform_get_irq_byname(pdev, "press"); e3x0_button_probe() 77 dev_err(&pdev->dev, "No IRQ for 'press', error=%d\n", e3x0_button_probe() 82 irq_release = platform_get_irq_byname(pdev, "release"); e3x0_button_probe() 84 dev_err(&pdev->dev, "No IRQ for 'release', error=%d\n", e3x0_button_probe() 89 input = devm_input_allocate_device(&pdev->dev); e3x0_button_probe() 95 input->dev.parent = &pdev->dev; e3x0_button_probe() 99 error = devm_request_irq(&pdev->dev, irq_press, e3x0_button_probe() 103 dev_err(&pdev->dev, "Failed to request 'press' IRQ#%d: %d\n", e3x0_button_probe() 108 error = devm_request_irq(&pdev->dev, irq_release, e3x0_button_probe() 112 dev_err(&pdev->dev, "Failed to request 'release' IRQ#%d: %d\n", e3x0_button_probe() 119 dev_err(&pdev->dev, "Can't register input device: %d\n", error); e3x0_button_probe() 123 platform_set_drvdata(pdev, input); e3x0_button_probe() 124 device_init_wakeup(&pdev->dev, 1); e3x0_button_probe() 128 static int e3x0_button_remove(struct platform_device *pdev) e3x0_button_remove() argument 130 device_init_wakeup(&pdev->dev, 0); e3x0_button_remove()
|
H A D | pmic8xxx-pwrkey.c | 79 static int pmic8xxx_pwrkey_probe(struct platform_device *pdev) pmic8xxx_pwrkey_probe() argument 82 int key_release_irq = platform_get_irq(pdev, 0); pmic8xxx_pwrkey_probe() 83 int key_press_irq = platform_get_irq(pdev, 1); pmic8xxx_pwrkey_probe() 92 if (of_property_read_u32(pdev->dev.of_node, "debounce", &kpd_delay)) pmic8xxx_pwrkey_probe() 96 dev_err(&pdev->dev, "invalid power key trigger delay\n"); pmic8xxx_pwrkey_probe() 100 pull_up = of_property_read_bool(pdev->dev.of_node, "pull-up"); pmic8xxx_pwrkey_probe() 102 regmap = dev_get_regmap(pdev->dev.parent, NULL); pmic8xxx_pwrkey_probe() 104 dev_err(&pdev->dev, "failed to locate regmap for the device\n"); pmic8xxx_pwrkey_probe() 108 pwrkey = devm_kzalloc(&pdev->dev, sizeof(*pwrkey), GFP_KERNEL); pmic8xxx_pwrkey_probe() 114 pwr = devm_input_allocate_device(&pdev->dev); pmic8xxx_pwrkey_probe() 116 dev_dbg(&pdev->dev, "Can't allocate power button\n"); pmic8xxx_pwrkey_probe() 130 dev_err(&pdev->dev, "failed reading PON_CNTL_1 err=%d\n", err); pmic8xxx_pwrkey_probe() 143 dev_err(&pdev->dev, "failed writing PON_CNTL_1 err=%d\n", err); pmic8xxx_pwrkey_probe() 147 err = devm_request_irq(&pdev->dev, key_press_irq, pwrkey_press_irq, pmic8xxx_pwrkey_probe() 151 dev_err(&pdev->dev, "Can't get %d IRQ for pwrkey: %d\n", pmic8xxx_pwrkey_probe() 156 err = devm_request_irq(&pdev->dev, key_release_irq, pwrkey_release_irq, pmic8xxx_pwrkey_probe() 160 dev_err(&pdev->dev, "Can't get %d IRQ for pwrkey: %d\n", pmic8xxx_pwrkey_probe() 167 dev_err(&pdev->dev, "Can't register power key: %d\n", err); pmic8xxx_pwrkey_probe() 171 platform_set_drvdata(pdev, pwrkey); pmic8xxx_pwrkey_probe() 172 device_init_wakeup(&pdev->dev, 1); pmic8xxx_pwrkey_probe() 177 static int pmic8xxx_pwrkey_remove(struct platform_device *pdev) pmic8xxx_pwrkey_remove() argument 179 device_init_wakeup(&pdev->dev, 0); pmic8xxx_pwrkey_remove()
|
H A D | da9055_onkey.c | 75 static int da9055_onkey_probe(struct platform_device *pdev) da9055_onkey_probe() argument 77 struct da9055 *da9055 = dev_get_drvdata(pdev->dev.parent); da9055_onkey_probe() 82 irq = platform_get_irq_byname(pdev, "ONKEY"); da9055_onkey_probe() 84 dev_err(&pdev->dev, da9055_onkey_probe() 89 onkey = devm_kzalloc(&pdev->dev, sizeof(*onkey), GFP_KERNEL); da9055_onkey_probe() 91 dev_err(&pdev->dev, "Failed to allocate memory\n"); da9055_onkey_probe() 97 dev_err(&pdev->dev, "Failed to allocate memory\n"); da9055_onkey_probe() 105 input_dev->dev.parent = &pdev->dev; da9055_onkey_probe() 116 dev_err(&pdev->dev, da9055_onkey_probe() 124 dev_err(&pdev->dev, "Unable to register input device, %d\n", da9055_onkey_probe() 129 platform_set_drvdata(pdev, onkey); da9055_onkey_probe() 142 static int da9055_onkey_remove(struct platform_device *pdev) da9055_onkey_remove() argument 144 struct da9055_onkey *onkey = platform_get_drvdata(pdev); da9055_onkey_remove() 145 int irq = platform_get_irq_byname(pdev, "ONKEY"); da9055_onkey_remove()
|
H A D | wm831x-on.c | 71 static int wm831x_on_probe(struct platform_device *pdev) wm831x_on_probe() argument 73 struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent); wm831x_on_probe() 75 int irq = wm831x_irq(wm831x, platform_get_irq(pdev, 0)); wm831x_on_probe() 78 wm831x_on = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_on), wm831x_on_probe() 81 dev_err(&pdev->dev, "Can't allocate data\n"); wm831x_on_probe() 88 wm831x_on->dev = devm_input_allocate_device(&pdev->dev); wm831x_on_probe() 90 dev_err(&pdev->dev, "Can't allocate input dev\n"); wm831x_on_probe() 99 wm831x_on->dev->dev.parent = &pdev->dev; wm831x_on_probe() 105 dev_err(&pdev->dev, "Unable to request IRQ: %d\n", ret); wm831x_on_probe() 110 dev_dbg(&pdev->dev, "Can't register input device: %d\n", ret); wm831x_on_probe() 114 platform_set_drvdata(pdev, wm831x_on); wm831x_on_probe() 125 static int wm831x_on_remove(struct platform_device *pdev) wm831x_on_remove() argument 127 struct wm831x_on *wm831x_on = platform_get_drvdata(pdev); wm831x_on_remove() 128 int irq = platform_get_irq(pdev, 0); wm831x_on_remove()
|
H A D | max8925_onkey.c | 66 static int max8925_onkey_probe(struct platform_device *pdev) max8925_onkey_probe() argument 68 struct max8925_chip *chip = dev_get_drvdata(pdev->dev.parent); max8925_onkey_probe() 73 irq[0] = platform_get_irq(pdev, 0); max8925_onkey_probe() 75 dev_err(&pdev->dev, "No IRQ resource!\n"); max8925_onkey_probe() 79 irq[1] = platform_get_irq(pdev, 1); max8925_onkey_probe() 81 dev_err(&pdev->dev, "No IRQ resource!\n"); max8925_onkey_probe() 85 info = devm_kzalloc(&pdev->dev, sizeof(struct max8925_onkey_info), max8925_onkey_probe() 90 input = devm_input_allocate_device(&pdev->dev); max8925_onkey_probe() 96 info->dev = &pdev->dev; max8925_onkey_probe() 103 input->dev.parent = &pdev->dev; max8925_onkey_probe() 106 error = devm_request_threaded_irq(&pdev->dev, irq[0], NULL, max8925_onkey_probe() 115 error = devm_request_threaded_irq(&pdev->dev, irq[1], NULL, max8925_onkey_probe() 130 platform_set_drvdata(pdev, info); max8925_onkey_probe() 131 device_init_wakeup(&pdev->dev, 1); max8925_onkey_probe() 138 struct platform_device *pdev = to_platform_device(dev); max8925_onkey_suspend() local 139 struct max8925_onkey_info *info = platform_get_drvdata(pdev); max8925_onkey_suspend() 140 struct max8925_chip *chip = dev_get_drvdata(pdev->dev.parent); max8925_onkey_suspend() 152 struct platform_device *pdev = to_platform_device(dev); max8925_onkey_resume() local 153 struct max8925_onkey_info *info = platform_get_drvdata(pdev); max8925_onkey_resume() 154 struct max8925_chip *chip = dev_get_drvdata(pdev->dev.parent); max8925_onkey_resume()
|
/linux-4.1.27/drivers/tty/serial/jsm/ |
H A D | jsm_driver.c | 46 static pci_ers_result_t jsm_io_error_detected(struct pci_dev *pdev, 48 static pci_ers_result_t jsm_io_slot_reset(struct pci_dev *pdev); 49 static void jsm_io_resume(struct pci_dev *pdev); 61 static int jsm_probe_one(struct pci_dev *pdev, const struct pci_device_id *ent) jsm_probe_one() argument 67 rc = pci_enable_device(pdev); jsm_probe_one() 69 dev_err(&pdev->dev, "Device enable FAILED\n"); jsm_probe_one() 73 rc = pci_request_regions(pdev, "jsm"); jsm_probe_one() 75 dev_err(&pdev->dev, "pci_request_region FAILED\n"); jsm_probe_one() 87 brd->pci_dev = pdev; jsm_probe_one() 89 switch (pdev->device) { jsm_probe_one() 123 brd->rev = pdev->revision; jsm_probe_one() 125 brd->irq = pdev->irq; jsm_probe_one() 127 switch (pdev->device) { jsm_probe_one() 147 brd->membase = pci_resource_start(pdev, 4); jsm_probe_one() 148 brd->membase_end = pci_resource_end(pdev, 4); jsm_probe_one() 155 brd->iobase = pci_resource_start(pdev, 1); jsm_probe_one() 156 brd->iobase_end = pci_resource_end(pdev, 1); jsm_probe_one() 166 pci_resource_len(pdev, 4)); jsm_probe_one() 168 dev_err(&pdev->dev, jsm_probe_one() 199 brd->membase = pci_resource_start(pdev, 0); jsm_probe_one() 200 brd->membase_end = pci_resource_end(pdev, 0); jsm_probe_one() 214 pci_resource_len(pdev, 0)); jsm_probe_one() 216 dev_err(&pdev->dev, jsm_probe_one() 229 dev_warn(&pdev->dev, "Failed to hook IRQ %d\n", brd->irq); jsm_probe_one() 235 dev_err(&pdev->dev, "Can't init tty devices (%d)\n", rc); jsm_probe_one() 243 dev_err(&pdev->dev, "Can't init uart port (%d)\n", rc); jsm_probe_one() 249 dev_info(&pdev->dev, "board %d: Digi Classic/Neo (rev %d), irq %d\n", jsm_probe_one() 252 pci_set_drvdata(pdev, brd); jsm_probe_one() 253 pci_save_state(pdev); jsm_probe_one() 264 pci_release_regions(pdev); jsm_probe_one() 266 pci_disable_device(pdev); jsm_probe_one() 271 static void jsm_remove_one(struct pci_dev *pdev) jsm_remove_one() argument 273 struct jsm_board *brd = pci_get_drvdata(pdev); jsm_remove_one() 276 switch (pdev->device) { jsm_remove_one() 302 pci_release_regions(pdev); jsm_remove_one() 303 pci_disable_device(pdev); jsm_remove_one() 338 static pci_ers_result_t jsm_io_error_detected(struct pci_dev *pdev, jsm_io_error_detected() argument 341 struct jsm_board *brd = pci_get_drvdata(pdev); jsm_io_error_detected() 348 static pci_ers_result_t jsm_io_slot_reset(struct pci_dev *pdev) jsm_io_slot_reset() argument 352 rc = pci_enable_device(pdev); jsm_io_slot_reset() 357 pci_set_master(pdev); jsm_io_slot_reset() 362 static void jsm_io_resume(struct pci_dev *pdev) jsm_io_resume() argument 364 struct jsm_board *brd = pci_get_drvdata(pdev); jsm_io_resume() 366 pci_restore_state(pdev); jsm_io_resume() 367 pci_save_state(pdev); jsm_io_resume()
|
/linux-4.1.27/drivers/usb/host/ |
H A D | ehci-sh.c | 78 static int ehci_hcd_sh_probe(struct platform_device *pdev) ehci_hcd_sh_probe() argument 89 irq = platform_get_irq(pdev, 0); ehci_hcd_sh_probe() 91 dev_err(&pdev->dev, ehci_hcd_sh_probe() 93 dev_name(&pdev->dev)); ehci_hcd_sh_probe() 98 pdata = dev_get_platdata(&pdev->dev); ehci_hcd_sh_probe() 101 hcd = usb_create_hcd(&ehci_sh_hc_driver, &pdev->dev, ehci_hcd_sh_probe() 102 dev_name(&pdev->dev)); ehci_hcd_sh_probe() 108 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ehci_hcd_sh_probe() 109 hcd->regs = devm_ioremap_resource(&pdev->dev, res); ehci_hcd_sh_probe() 117 priv = devm_kzalloc(&pdev->dev, sizeof(struct ehci_sh_priv), ehci_hcd_sh_probe() 125 priv->fclk = devm_clk_get(&pdev->dev, "usb_fck"); ehci_hcd_sh_probe() 129 priv->iclk = devm_clk_get(&pdev->dev, "usb_ick"); ehci_hcd_sh_probe() 141 dev_err(&pdev->dev, "Failed to add hcd"); ehci_hcd_sh_probe() 147 platform_set_drvdata(pdev, priv); ehci_hcd_sh_probe() 158 dev_err(&pdev->dev, "init %s fail, %d\n", dev_name(&pdev->dev), ret); ehci_hcd_sh_probe() 163 static int ehci_hcd_sh_remove(struct platform_device *pdev) ehci_hcd_sh_remove() argument 165 struct ehci_sh_priv *priv = platform_get_drvdata(pdev); ehci_hcd_sh_remove() 177 static void ehci_hcd_sh_shutdown(struct platform_device *pdev) ehci_hcd_sh_shutdown() argument 179 struct ehci_sh_priv *priv = platform_get_drvdata(pdev); ehci_hcd_sh_shutdown()
|
H A D | ehci-atmel.c | 69 static void atmel_start_ehci(struct platform_device *pdev) atmel_start_ehci() argument 71 struct usb_hcd *hcd = platform_get_drvdata(pdev); atmel_start_ehci() 74 dev_dbg(&pdev->dev, "start\n"); atmel_start_ehci() 78 static void atmel_stop_ehci(struct platform_device *pdev) atmel_stop_ehci() argument 80 struct usb_hcd *hcd = platform_get_drvdata(pdev); atmel_stop_ehci() 83 dev_dbg(&pdev->dev, "stop\n"); atmel_stop_ehci() 89 static int ehci_atmel_drv_probe(struct platform_device *pdev) ehci_atmel_drv_probe() argument 104 irq = platform_get_irq(pdev, 0); ehci_atmel_drv_probe() 106 dev_err(&pdev->dev, ehci_atmel_drv_probe() 108 dev_name(&pdev->dev)); ehci_atmel_drv_probe() 117 retval = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); ehci_atmel_drv_probe() 121 hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev)); ehci_atmel_drv_probe() 128 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ehci_atmel_drv_probe() 129 hcd->regs = devm_ioremap_resource(&pdev->dev, res); ehci_atmel_drv_probe() 138 atmel_ehci->iclk = devm_clk_get(&pdev->dev, "ehci_clk"); ehci_atmel_drv_probe() 140 dev_err(&pdev->dev, "Error getting interface clock\n"); ehci_atmel_drv_probe() 145 atmel_ehci->uclk = devm_clk_get(&pdev->dev, "usb_clk"); ehci_atmel_drv_probe() 147 dev_err(&pdev->dev, "failed to get uclk\n"); ehci_atmel_drv_probe() 156 atmel_start_ehci(pdev); ehci_atmel_drv_probe() 166 atmel_stop_ehci(pdev); ehci_atmel_drv_probe() 170 dev_err(&pdev->dev, "init %s fail, %d\n", ehci_atmel_drv_probe() 171 dev_name(&pdev->dev), retval); ehci_atmel_drv_probe() 176 static int ehci_atmel_drv_remove(struct platform_device *pdev) ehci_atmel_drv_remove() argument 178 struct usb_hcd *hcd = platform_get_drvdata(pdev); ehci_atmel_drv_remove() 183 atmel_stop_ehci(pdev); ehci_atmel_drv_remove()
|
H A D | ehci-msm.c | 68 static int ehci_msm_probe(struct platform_device *pdev) ehci_msm_probe() argument 75 dev_dbg(&pdev->dev, "ehci_msm proble\n"); ehci_msm_probe() 77 hcd = usb_create_hcd(&msm_hc_driver, &pdev->dev, dev_name(&pdev->dev)); ehci_msm_probe() 79 dev_err(&pdev->dev, "Unable to create HCD\n"); ehci_msm_probe() 83 hcd->irq = platform_get_irq(pdev, 0); ehci_msm_probe() 85 dev_err(&pdev->dev, "Unable to get IRQ resource\n"); ehci_msm_probe() 90 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ehci_msm_probe() 92 dev_err(&pdev->dev, "Unable to get memory resource\n"); ehci_msm_probe() 99 hcd->regs = devm_ioremap(&pdev->dev, hcd->rsrc_start, hcd->rsrc_len); ehci_msm_probe() 101 dev_err(&pdev->dev, "ioremap failed\n"); ehci_msm_probe() 111 if (pdev->dev.of_node) ehci_msm_probe() 112 phy = devm_usb_get_phy_by_phandle(&pdev->dev, "usb-phy", 0); ehci_msm_probe() 114 phy = devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2); ehci_msm_probe() 117 dev_err(&pdev->dev, "unable to find transceiver\n"); ehci_msm_probe() 124 dev_err(&pdev->dev, "unable to register with transceiver\n"); ehci_msm_probe() 129 device_init_wakeup(&pdev->dev, 1); ehci_msm_probe() 134 pm_runtime_no_callbacks(&pdev->dev); ehci_msm_probe() 135 pm_runtime_enable(&pdev->dev); ehci_msm_probe() 147 static int ehci_msm_remove(struct platform_device *pdev) ehci_msm_remove() argument 149 struct usb_hcd *hcd = platform_get_drvdata(pdev); ehci_msm_remove() 151 device_init_wakeup(&pdev->dev, 0); ehci_msm_remove() 152 pm_runtime_disable(&pdev->dev); ehci_msm_remove() 153 pm_runtime_set_suspended(&pdev->dev); ehci_msm_remove()
|
H A D | xhci-mvebu.h | 14 int xhci_mvebu_mbus_init_quirk(struct platform_device *pdev); 16 static inline int xhci_mvebu_mbus_init_quirk(struct platform_device *pdev) xhci_mvebu_mbus_init_quirk() argument
|
/linux-4.1.27/drivers/usb/musb/ |
H A D | musb_am335x.c | 6 static int am335x_child_probe(struct platform_device *pdev) am335x_child_probe() argument 10 pm_runtime_enable(&pdev->dev); am335x_child_probe() 12 ret = of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev); am335x_child_probe() 18 pm_runtime_disable(&pdev->dev); am335x_child_probe()
|
/linux-4.1.27/arch/sh/drivers/ |
H A D | push-switch.c | 39 struct platform_device *pdev = psw->pdev; switch_work_handler() local 43 kobject_uevent(&pdev->dev.kobj, KOBJ_CHANGE); switch_work_handler() 46 static int switch_drv_probe(struct platform_device *pdev) switch_drv_probe() argument 56 irq = platform_get_irq(pdev, 0); switch_drv_probe() 62 psw_info = pdev->dev.platform_data; switch_drv_probe() 67 psw_info->name ? psw_info->name : DRV_NAME, pdev); switch_drv_probe() 72 ret = device_create_file(&pdev->dev, &dev_attr_switch); switch_drv_probe() 74 dev_err(&pdev->dev, "Failed creating device attrs\n"); switch_drv_probe() 87 psw->pdev = pdev; switch_drv_probe() 89 platform_set_drvdata(pdev, psw); switch_drv_probe() 94 free_irq(irq, pdev); switch_drv_probe() 100 static int switch_drv_remove(struct platform_device *pdev) switch_drv_remove() argument 102 struct push_switch *psw = platform_get_drvdata(pdev); switch_drv_remove() 103 struct push_switch_platform_info *psw_info = pdev->dev.platform_data; switch_drv_remove() 104 int irq = platform_get_irq(pdev, 0); switch_drv_remove() 107 device_remove_file(&pdev->dev, &dev_attr_switch); switch_drv_remove() 109 platform_set_drvdata(pdev, NULL); switch_drv_remove() 112 free_irq(irq, pdev); switch_drv_remove()
|
/linux-4.1.27/drivers/ata/ |
H A D | pata_sil680.c | 86 struct pci_dev *pdev = to_pci_dev(ap->host->dev); sil680_cable_detect() local 89 pci_read_config_byte(pdev, addr, &ata66); sil680_cable_detect() 118 struct pci_dev *pdev = to_pci_dev(ap->host->dev); sil680_set_piomode() local 130 pci_write_config_word(pdev, addr, speed_p[pio]); sil680_set_piomode() 131 pci_write_config_word(pdev, tfaddr, speed_t[lowest_pio]); sil680_set_piomode() 133 pci_read_config_word(pdev, tfaddr-2, ®); sil680_set_piomode() 134 pci_read_config_byte(pdev, addr_mask, &mode); sil680_set_piomode() 143 pci_write_config_word(pdev, tfaddr-2, reg); sil680_set_piomode() 144 pci_write_config_byte(pdev, addr_mask, mode); sil680_set_piomode() 166 struct pci_dev *pdev = to_pci_dev(ap->host->dev); sil680_set_dmamode() local 174 pci_read_config_byte(pdev, 0x8A, &scsc); sil680_set_dmamode() 175 pci_read_config_byte(pdev, addr_mask, &mode); sil680_set_dmamode() 176 pci_read_config_word(pdev, ma, &multi); sil680_set_dmamode() 177 pci_read_config_word(pdev, ua, &ultra); sil680_set_dmamode() 194 pci_write_config_byte(pdev, addr_mask, mode); sil680_set_dmamode() 195 pci_write_config_word(pdev, ma, multi); sil680_set_dmamode() 196 pci_write_config_word(pdev, ua, ultra); sil680_set_dmamode() 221 struct pci_dev *pdev = to_pci_dev(ap->host->dev); sil680_sff_irq_check() local 225 pci_read_config_byte(pdev, addr, &val); sil680_sff_irq_check() 246 * @pdev: PCI device 253 static u8 sil680_init_chip(struct pci_dev *pdev, int *try_mmio) sil680_init_chip() argument 258 pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, sil680_init_chip() 259 pdev->revision ? 1 : 255); sil680_init_chip() 261 pci_write_config_byte(pdev, 0x80, 0x00); sil680_init_chip() 262 pci_write_config_byte(pdev, 0x84, 0x00); sil680_init_chip() 264 pci_read_config_byte(pdev, 0x8A, &tmpbyte); sil680_init_chip() 266 dev_dbg(&pdev->dev, "sil680: BA5_EN = %d clock = %02X\n", sil680_init_chip() 272 *try_mmio = (tmpbyte & 1) || pci_resource_start(pdev, 5); sil680_init_chip() 278 pci_write_config_byte(pdev, 0x8A, tmpbyte|0x10); sil680_init_chip() 283 pci_write_config_byte(pdev, 0x8A, tmpbyte & ~0x20); sil680_init_chip() 293 pci_read_config_byte(pdev, 0x8A, &tmpbyte); sil680_init_chip() 294 dev_dbg(&pdev->dev, "sil680: BA5_EN = %d clock = %02X\n", sil680_init_chip() 297 pci_write_config_byte(pdev, 0xA1, 0x72); sil680_init_chip() 298 pci_write_config_word(pdev, 0xA2, 0x328A); sil680_init_chip() 299 pci_write_config_dword(pdev, 0xA4, 0x62DD62DD); sil680_init_chip() 300 pci_write_config_dword(pdev, 0xA8, 0x43924392); sil680_init_chip() 301 pci_write_config_dword(pdev, 0xAC, 0x40094009); sil680_init_chip() 302 pci_write_config_byte(pdev, 0xB1, 0x72); sil680_init_chip() 303 pci_write_config_word(pdev, 0xB2, 0x328A); sil680_init_chip() 304 pci_write_config_dword(pdev, 0xB4, 0x62DD62DD); sil680_init_chip() 305 pci_write_config_dword(pdev, 0xB8, 0x43924392); sil680_init_chip() 306 pci_write_config_dword(pdev, 0xBC, 0x40094009); sil680_init_chip() 325 static int sil680_init_one(struct pci_dev *pdev, const struct pci_device_id *id) sil680_init_one() argument 346 ata_print_version_once(&pdev->dev, DRV_VERSION); sil680_init_one() 348 rc = pcim_enable_device(pdev); sil680_init_one() 352 switch (sil680_init_chip(pdev, &try_mmio)) { sil680_init_one() 366 rc = pcim_iomap_regions(pdev, 1 << SIL680_MMIO_BAR, DRV_NAME); sil680_init_one() 371 host = ata_host_alloc_pinfo(&pdev->dev, ppi, 2); sil680_init_one() 374 host->iomap = pcim_iomap_table(pdev); sil680_init_one() 377 rc = dma_set_mask(&pdev->dev, ATA_DMA_MASK); sil680_init_one() 380 rc = dma_set_coherent_mask(&pdev->dev, ATA_DMA_MASK); sil680_init_one() 383 pci_set_master(pdev); sil680_init_one() 399 return ata_host_activate(host, pdev->irq, ata_bmdma_interrupt, sil680_init_one() 403 return ata_pci_bmdma_init_one(pdev, ppi, &sil680_sht, NULL, 0); sil680_init_one() 407 static int sil680_reinit_one(struct pci_dev *pdev) sil680_reinit_one() argument 409 struct ata_host *host = pci_get_drvdata(pdev); sil680_reinit_one() 412 rc = ata_pci_device_do_resume(pdev); sil680_reinit_one() 415 sil680_init_chip(pdev, &try_mmio); sil680_reinit_one()
|
H A D | pata_serverworks.c | 69 struct pci_dev *pdev = to_pci_dev(ap->host->dev); oem_cable() local 71 if (pdev->subsystem_device & (1 << (ap->port_no + 14))) oem_cable() 104 struct pci_dev *pdev = to_pci_dev(ap->host->dev); serverworks_cable_detect() local 108 if (cb->device == pdev->device && serverworks_cable_detect() 109 (cb->subvendor == pdev->subsystem_vendor || serverworks_cable_detect() 122 * @pdev: PCI device to check 128 static u8 serverworks_is_csb(struct pci_dev *pdev) serverworks_is_csb() argument 130 switch (pdev->device) { serverworks_is_csb() 202 struct pci_dev *pdev = to_pci_dev(ap->host->dev); serverworks_set_piomode() local 205 pci_write_config_byte(pdev, 0x40 + offset, pio_mode[pio]); serverworks_set_piomode() 209 if (serverworks_is_csb(pdev)) { serverworks_set_piomode() 210 pci_read_config_word(pdev, 0x4A, &csb5_pio); serverworks_set_piomode() 212 pci_write_config_word(pdev, 0x4A, csb5_pio | (pio << devbits)); serverworks_set_piomode() 233 struct pci_dev *pdev = to_pci_dev(ap->host->dev); serverworks_set_dmamode() local 235 pci_read_config_byte(pdev, 0x54, &ultra_cfg); serverworks_set_dmamode() 236 pci_read_config_byte(pdev, 0x56 + ap->port_no, &ultra); serverworks_set_dmamode() 240 pci_write_config_byte(pdev, 0x44 + offset, 0x20); serverworks_set_dmamode() 246 pci_write_config_byte(pdev, 0x44 + offset, serverworks_set_dmamode() 250 pci_write_config_byte(pdev, 0x56 + ap->port_no, ultra); serverworks_set_dmamode() 251 pci_write_config_byte(pdev, 0x54, ultra_cfg); serverworks_set_dmamode() 278 static int serverworks_fixup_osb4(struct pci_dev *pdev) serverworks_fixup_osb4() argument 297 static int serverworks_fixup_csb(struct pci_dev *pdev) serverworks_fixup_csb() argument 302 if (!(PCI_FUNC(pdev->devfn) & 1)) { serverworks_fixup_csb() 337 pci_read_config_byte(pdev, 0x5A, &btr); serverworks_fixup_csb() 339 if (!(PCI_FUNC(pdev->devfn) & 1)) serverworks_fixup_csb() 342 btr |= (pdev->revision >= SVWKS_CSB5_REVISION_NEW) ? 0x3 : 0x2; serverworks_fixup_csb() 343 pci_write_config_byte(pdev, 0x5A, btr); serverworks_fixup_csb() 348 static void serverworks_fixup_ht1000(struct pci_dev *pdev) serverworks_fixup_ht1000() argument 352 pci_read_config_byte(pdev, 0x5A, &btr); serverworks_fixup_ht1000() 355 pci_write_config_byte(pdev, 0x5A, btr); serverworks_fixup_ht1000() 358 static int serverworks_fixup(struct pci_dev *pdev) serverworks_fixup() argument 363 pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0x40); serverworks_fixup() 365 switch (pdev->device) { serverworks_fixup() 367 rc = serverworks_fixup_osb4(pdev); serverworks_fixup() 370 ata_pci_bmdma_clear_simplex(pdev); serverworks_fixup() 374 rc = serverworks_fixup_csb(pdev); serverworks_fixup() 377 serverworks_fixup_ht1000(pdev); serverworks_fixup() 384 static int serverworks_init_one(struct pci_dev *pdev, const struct pci_device_id *id) serverworks_init_one() argument 417 rc = pcim_enable_device(pdev); serverworks_init_one() 421 rc = serverworks_fixup(pdev); serverworks_init_one() 424 if (pdev->device == PCI_DEVICE_ID_SERVERWORKS_OSB4IDE) { serverworks_init_one() 431 else if ((pdev->device == PCI_DEVICE_ID_SERVERWORKS_CSB5IDE) || serverworks_init_one() 432 (pdev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE) || serverworks_init_one() 433 (pdev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2)) { serverworks_init_one() 441 if (pdev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2) serverworks_init_one() 445 return ata_pci_bmdma_init_one(pdev, ppi, sht, NULL, 0); serverworks_init_one() 449 static int serverworks_reinit_one(struct pci_dev *pdev) serverworks_reinit_one() argument 451 struct ata_host *host = pci_get_drvdata(pdev); serverworks_reinit_one() 454 rc = ata_pci_device_do_resume(pdev); serverworks_reinit_one() 458 (void)serverworks_fixup(pdev); serverworks_reinit_one()
|
H A D | pata_cypress.c | 53 struct pci_dev *pdev = to_pci_dev(ap->host->dev); cy82c693_set_piomode() local 70 pci_read_config_dword(pdev, CY82_IDE_ADDRSETUP, &addr); cy82c693_set_piomode() 75 pci_write_config_dword(pdev, CY82_IDE_ADDRSETUP, addr); cy82c693_set_piomode() 76 pci_write_config_byte(pdev, CY82_IDE_MASTER_IOR, time_16); cy82c693_set_piomode() 77 pci_write_config_byte(pdev, CY82_IDE_MASTER_IOW, time_16); cy82c693_set_piomode() 78 pci_write_config_byte(pdev, CY82_IDE_MASTER_8BIT, time_8); cy82c693_set_piomode() 80 pci_read_config_dword(pdev, CY82_IDE_ADDRSETUP, &addr); cy82c693_set_piomode() 85 pci_write_config_dword(pdev, CY82_IDE_ADDRSETUP, addr); cy82c693_set_piomode() 86 pci_write_config_byte(pdev, CY82_IDE_SLAVE_IOR, time_16); cy82c693_set_piomode() 87 pci_write_config_byte(pdev, CY82_IDE_SLAVE_IOW, time_16); cy82c693_set_piomode() 88 pci_write_config_byte(pdev, CY82_IDE_SLAVE_8BIT, time_8); cy82c693_set_piomode() 124 static int cy82c693_init_one(struct pci_dev *pdev, const struct pci_device_id *id) cy82c693_init_one() argument 137 if (PCI_FUNC(pdev->devfn) != 1) cy82c693_init_one() 140 return ata_pci_bmdma_init_one(pdev, ppi, &cy82c693_sht, NULL, 0); cy82c693_init_one()
|
H A D | pata_cmd64x.c | 74 struct pci_dev *pdev = to_pci_dev(ap->host->dev); cmd648_cable_detect() local 78 pci_read_config_byte(pdev, BMIDECSR, &r); cmd648_cable_detect() 95 struct pci_dev *pdev = to_pci_dev(ap->host->dev); cmd64x_set_timing() local 159 pci_read_config_byte(pdev, arttim, ®); cmd64x_set_timing() 162 pci_write_config_byte(pdev, arttim, reg); cmd64x_set_timing() 165 pci_write_config_byte(pdev, drwtim, (t.active << 4) | t.recover); cmd64x_set_timing() 196 struct pci_dev *pdev = to_pci_dev(ap->host->dev); cmd64x_set_dmamode() local 203 pci_read_config_byte(pdev, pciD, ®D); cmd64x_set_dmamode() 204 pci_read_config_byte(pdev, pciU, ®U); cmd64x_set_dmamode() 227 pci_write_config_byte(pdev, pciU, regU); cmd64x_set_dmamode() 228 pci_write_config_byte(pdev, pciD, regD); cmd64x_set_dmamode() 240 struct pci_dev *pdev = to_pci_dev(ap->host->dev); cmd64x_sff_irq_check() local 246 pci_read_config_byte(pdev, irq_reg, &irq_stat); cmd64x_sff_irq_check() 260 struct pci_dev *pdev = to_pci_dev(ap->host->dev); cmd64x_sff_irq_clear() local 267 pci_read_config_byte(pdev, irq_reg, &irq_stat); cmd64x_sff_irq_clear() 279 struct pci_dev *pdev = to_pci_dev(ap->host->dev); cmd648_sff_irq_check() local 280 unsigned long base = pci_resource_start(pdev, 4); cmd648_sff_irq_check() 296 struct pci_dev *pdev = to_pci_dev(ap->host->dev); cmd648_sff_irq_clear() local 297 unsigned long base = pci_resource_start(pdev, 4); cmd648_sff_irq_clear() 360 static void cmd64x_fixup(struct pci_dev *pdev) cmd64x_fixup() argument 364 pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 64); cmd64x_fixup() 365 pci_read_config_byte(pdev, MRDMODE, &mrdmode); cmd64x_fixup() 368 pci_write_config_byte(pdev, MRDMODE, mrdmode); cmd64x_fixup() 372 pci_write_config_byte(pdev, UDIDETCR0, 0xF0); cmd64x_fixup() 376 static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id) cmd64x_init_one() argument 432 struct pci_dev *bridge = pdev->bus->self; cmd64x_init_one() 439 rc = pcim_enable_device(pdev); cmd64x_init_one() 444 ata_pci_bmdma_clear_simplex(pdev); cmd64x_init_one() 446 if (pdev->device == PCI_DEVICE_ID_CMD_646) cmd64x_init_one() 447 switch (pdev->revision) { cmd64x_init_one() 471 cmd64x_fixup(pdev); cmd64x_init_one() 474 pci_read_config_byte(pdev, CNTRL, ®); cmd64x_init_one() 476 dev_notice(&pdev->dev, "Mobility Bridge detected, ignoring CNTRL port enable/disable\n"); cmd64x_init_one() 478 dev_notice(&pdev->dev, "Primary port is disabled\n"); cmd64x_init_one() 483 dev_notice(&pdev->dev, "Secondary port is disabled\n"); cmd64x_init_one() 487 return ata_pci_bmdma_init_one(pdev, ppi, &cmd64x_sht, NULL, 0); cmd64x_init_one() 491 static int cmd64x_reinit_one(struct pci_dev *pdev) cmd64x_reinit_one() argument 493 struct ata_host *host = pci_get_drvdata(pdev); cmd64x_reinit_one() 496 rc = ata_pci_device_do_resume(pdev); cmd64x_reinit_one() 500 cmd64x_fixup(pdev); cmd64x_reinit_one()
|
H A D | pata_cs5520.c | 71 struct pci_dev *pdev = to_pci_dev(ap->host->dev); cs5520_set_timings() local 77 pci_write_config_byte(pdev, 0x62 + ap->port_no, cs5520_set_timings() 82 pci_write_config_byte(pdev, 0x64 + 4*ap->port_no + slave, cs5520_set_timings() 86 pci_write_config_byte(pdev, 0x66 + 4*ap->port_no + slave, cs5520_set_timings() 117 static int cs5520_init_one(struct pci_dev *pdev, const struct pci_device_id *id) cs5520_init_one() argument 133 rc = pcim_enable_device(pdev); cs5520_init_one() 138 pci_read_config_byte(pdev, 0x60, &pcicfg); cs5520_init_one() 151 dev_warn(&pdev->dev, "DMA mode disabled. Enabling.\n"); cs5520_init_one() 152 pci_write_config_byte(pdev, 0x60, pcicfg | 0x40); cs5520_init_one() 157 host = ata_host_alloc_pinfo(&pdev->dev, ppi, 2); cs5520_init_one() 162 if (pci_enable_device_io(pdev)) { cs5520_init_one() 167 if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) { cs5520_init_one() 171 if (dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32))) { cs5520_init_one() 177 iomap[0] = devm_ioport_map(&pdev->dev, cmd_port[0], 8); cs5520_init_one() 178 iomap[1] = devm_ioport_map(&pdev->dev, ctl_port[0], 1); cs5520_init_one() 179 iomap[2] = devm_ioport_map(&pdev->dev, cmd_port[1], 8); cs5520_init_one() 180 iomap[3] = devm_ioport_map(&pdev->dev, ctl_port[1], 1); cs5520_init_one() 181 iomap[4] = pcim_iomap(pdev, 2, 0); cs5520_init_one() 209 pci_set_master(pdev); cs5520_init_one() 221 rc = devm_request_irq(&pdev->dev, irq[ap->port_no], cs5520_init_one() 235 * @pdev: PCI device 241 static int cs5520_reinit_one(struct pci_dev *pdev) cs5520_reinit_one() argument 243 struct ata_host *host = pci_get_drvdata(pdev); cs5520_reinit_one() 247 rc = ata_pci_device_do_resume(pdev); cs5520_reinit_one() 251 pci_read_config_byte(pdev, 0x60, &pcicfg); cs5520_reinit_one() 253 pci_write_config_byte(pdev, 0x60, pcicfg | 0x40); cs5520_reinit_one() 261 * @pdev: PCI device 269 static int cs5520_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) cs5520_pci_device_suspend() argument 271 struct ata_host *host = pci_get_drvdata(pdev); cs5520_pci_device_suspend() 278 pci_save_state(pdev); cs5520_pci_device_suspend()
|
H A D | pata_rz1000.c | 62 static int rz1000_fifo_disable(struct pci_dev *pdev) rz1000_fifo_disable() argument 66 if (pci_read_config_word(pdev, 0x40, ®) != 0) rz1000_fifo_disable() 69 if (pci_write_config_word(pdev, 0x40, reg) != 0) rz1000_fifo_disable() 77 * @pdev: PCI device to register 78 * @ent: Entry in rz1000_pci_tbl matching with @pdev 85 static int rz1000_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) rz1000_init_one() argument 94 ata_print_version_once(&pdev->dev, DRV_VERSION); rz1000_init_one() 96 if (rz1000_fifo_disable(pdev) == 0) rz1000_init_one() 97 return ata_pci_sff_init_one(pdev, ppi, &rz1000_sht, NULL, 0); rz1000_init_one() 105 static int rz1000_reinit_one(struct pci_dev *pdev) rz1000_reinit_one() argument 107 struct ata_host *host = pci_get_drvdata(pdev); rz1000_reinit_one() 110 rc = ata_pci_device_do_resume(pdev); rz1000_reinit_one() 116 if (rz1000_fifo_disable(pdev)) rz1000_reinit_one()
|
/linux-4.1.27/drivers/video/fbdev/msm/ |
H A D | mddi_client_dummy.c | 27 struct platform_device pdev; member in struct:panel_info 51 static int mddi_dummy_probe(struct platform_device *pdev) mddi_dummy_probe() argument 53 struct msm_mddi_client_data *client_data = pdev->dev.platform_data; mddi_dummy_probe() 55 devm_kzalloc(&pdev->dev, sizeof(struct panel_info), GFP_KERNEL); mddi_dummy_probe() 58 platform_set_drvdata(pdev, panel); mddi_dummy_probe() 64 panel->pdev.name = "msm_panel"; mddi_dummy_probe() 65 panel->pdev.id = pdev->id; mddi_dummy_probe() 66 platform_device_add_resources(&panel->pdev, mddi_dummy_probe() 69 panel->pdev.dev.platform_data = &panel->panel_data; mddi_dummy_probe() 70 return platform_device_register(&panel->pdev); mddi_dummy_probe()
|
/linux-4.1.27/drivers/platform/goldfish/ |
H A D | pdev_bus.c | 43 struct platform_device pdev; member in struct:pdev_bus_dev 66 platform_device_unregister(&pos->pdev); goldfish_pdev_worker() 71 ret = platform_device_register(&pos->pdev); goldfish_pdev_worker() 74 pos->pdev.name); goldfish_pdev_worker() 122 name_len + 1 + sizeof(*dev->pdev.dev.dma_mask), GFP_ATOMIC); goldfish_new_pdev() 126 dev->pdev.num_resources = resource_count; goldfish_new_pdev() 127 dev->pdev.resource = (struct resource *)(dev + 1); goldfish_new_pdev() 128 dev->pdev.name = name = (char *)(dev->pdev.resource + resource_count); goldfish_new_pdev() 129 dev->pdev.dev.coherent_dma_mask = ~0; goldfish_new_pdev() 130 dev->pdev.dev.dma_mask = (void *)(dev->pdev.name + name_len + 1); goldfish_new_pdev() 131 *dev->pdev.dev.dma_mask = ~0; goldfish_new_pdev() 138 dev->pdev.id = readl(pdev_bus_base + PDEV_BUS_ID); goldfish_new_pdev() 139 dev->pdev.resource[0].start = base; goldfish_new_pdev() 140 dev->pdev.resource[0].end = base + goldfish_new_pdev() 142 dev->pdev.resource[0].flags = IORESOURCE_MEM; goldfish_new_pdev() 145 dev->pdev.resource[1].start = irq; goldfish_new_pdev() 146 dev->pdev.resource[1].end = irq + irq_count - 1; goldfish_new_pdev() 147 dev->pdev.resource[1].flags = IORESOURCE_IRQ; goldfish_new_pdev() 179 static int goldfish_pdev_bus_probe(struct platform_device *pdev) goldfish_pdev_bus_probe() argument 184 r = platform_get_resource(pdev, IORESOURCE_MEM, 0); goldfish_pdev_bus_probe() 194 dev_err(&pdev->dev, "unable to map Goldfish MMIO.\n"); goldfish_pdev_bus_probe() 198 r = platform_get_resource(pdev, IORESOURCE_IRQ, 0); goldfish_pdev_bus_probe() 207 IRQF_SHARED, "goldfish_pdev_bus", pdev); goldfish_pdev_bus_probe() 209 dev_err(&pdev->dev, "unable to request Goldfish IRQ\n"); goldfish_pdev_bus_probe() 223 static int goldfish_pdev_bus_remove(struct platform_device *pdev) goldfish_pdev_bus_remove() argument 226 free_irq(pdev_bus_irq, pdev); goldfish_pdev_bus_remove()
|
/linux-4.1.27/include/linux/ssb/ |
H A D | ssb_driver_gige.h | 54 extern bool pdev_is_ssb_gige_core(struct pci_dev *pdev); 57 static inline struct ssb_gige * pdev_to_ssb_gige(struct pci_dev *pdev) pdev_to_ssb_gige() argument 59 if (!pdev_is_ssb_gige_core(pdev)) pdev_to_ssb_gige() 61 return container_of(pdev->bus->ops, struct ssb_gige, pci_ops); pdev_to_ssb_gige() 65 static inline bool ssb_gige_is_rgmii(struct pci_dev *pdev) ssb_gige_is_rgmii() argument 67 struct ssb_gige *dev = pdev_to_ssb_gige(pdev); ssb_gige_is_rgmii() 72 static inline bool ssb_gige_have_roboswitch(struct pci_dev *pdev) ssb_gige_have_roboswitch() argument 74 struct ssb_gige *dev = pdev_to_ssb_gige(pdev); ssb_gige_have_roboswitch() 82 static inline bool ssb_gige_one_dma_at_once(struct pci_dev *pdev) ssb_gige_one_dma_at_once() argument 84 struct ssb_gige *dev = pdev_to_ssb_gige(pdev); ssb_gige_one_dma_at_once() 92 static inline bool ssb_gige_must_flush_posted_writes(struct pci_dev *pdev) ssb_gige_must_flush_posted_writes() argument 94 struct ssb_gige *dev = pdev_to_ssb_gige(pdev); ssb_gige_must_flush_posted_writes() 101 static inline int ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr) ssb_gige_get_macaddr() argument 103 struct ssb_gige *dev = pdev_to_ssb_gige(pdev); ssb_gige_get_macaddr() 112 static inline int ssb_gige_get_phyaddr(struct pci_dev *pdev) ssb_gige_get_phyaddr() argument 114 struct ssb_gige *dev = pdev_to_ssb_gige(pdev); ssb_gige_get_phyaddr() 122 struct pci_dev *pdev); 124 const struct pci_dev *pdev); 142 struct pci_dev *pdev) ssb_gige_pcibios_plat_dev_init() 147 const struct pci_dev *pdev) ssb_gige_map_irq() 159 static inline bool pdev_is_ssb_gige_core(struct pci_dev *pdev) pdev_is_ssb_gige_core() argument 163 static inline struct ssb_gige * pdev_to_ssb_gige(struct pci_dev *pdev) pdev_to_ssb_gige() argument 167 static inline bool ssb_gige_is_rgmii(struct pci_dev *pdev) ssb_gige_is_rgmii() argument 171 static inline bool ssb_gige_have_roboswitch(struct pci_dev *pdev) ssb_gige_have_roboswitch() argument 175 static inline bool ssb_gige_one_dma_at_once(struct pci_dev *pdev) ssb_gige_one_dma_at_once() argument 179 static inline bool ssb_gige_must_flush_posted_writes(struct pci_dev *pdev) ssb_gige_must_flush_posted_writes() argument 183 static inline int ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr) ssb_gige_get_macaddr() argument 187 static inline int ssb_gige_get_phyaddr(struct pci_dev *pdev) ssb_gige_get_phyaddr() argument 141 ssb_gige_pcibios_plat_dev_init(struct ssb_device *sdev, struct pci_dev *pdev) ssb_gige_pcibios_plat_dev_init() argument 146 ssb_gige_map_irq(struct ssb_device *sdev, const struct pci_dev *pdev) ssb_gige_map_irq() argument
|
/linux-4.1.27/drivers/usb/gadget/udc/ |
H A D | fsl_mxc_udc.c | 32 int fsl_udc_clk_init(struct platform_device *pdev) fsl_udc_clk_init() argument 38 pdata = dev_get_platdata(&pdev->dev); fsl_udc_clk_init() 40 mxc_ipg_clk = devm_clk_get(&pdev->dev, "ipg"); fsl_udc_clk_init() 42 dev_err(&pdev->dev, "clk_get(\"ipg\") failed\n"); fsl_udc_clk_init() 46 mxc_ahb_clk = devm_clk_get(&pdev->dev, "ahb"); fsl_udc_clk_init() 48 dev_err(&pdev->dev, "clk_get(\"ahb\") failed\n"); fsl_udc_clk_init() 52 mxc_per_clk = devm_clk_get(&pdev->dev, "per"); fsl_udc_clk_init() 54 dev_err(&pdev->dev, "clk_get(\"per\") failed\n"); fsl_udc_clk_init() 63 if (!strcmp(pdev->id_entry->name, "imx-udc-mx27")) { fsl_udc_clk_init() 67 dev_err(&pdev->dev, "USB_CLK=%lu, should be 60MHz\n", freq); fsl_udc_clk_init() 83 int fsl_udc_clk_finalize(struct platform_device *pdev) fsl_udc_clk_finalize() argument 85 struct fsl_usb2_platform_data *pdata = dev_get_platdata(&pdev->dev); fsl_udc_clk_finalize() 92 (pdev, IORESOURCE_MEM, 0); fsl_udc_clk_finalize() 96 dev_err(&pdev->dev, "ioremap for phy address fails\n"); fsl_udc_clk_finalize()
|
/linux-4.1.27/arch/arm/mach-imx/devices/ |
H A D | platform-ipu-core.c | 73 struct platform_device *pdev; imx_alloc_mx3_camera() local 78 pdev = platform_device_alloc("mx3-camera", 0); imx_alloc_mx3_camera() 79 if (!pdev) imx_alloc_mx3_camera() 82 pdev->dev.dma_mask = kmalloc(sizeof(*pdev->dev.dma_mask), GFP_KERNEL); imx_alloc_mx3_camera() 83 if (!pdev->dev.dma_mask) imx_alloc_mx3_camera() 86 *pdev->dev.dma_mask = DMA_BIT_MASK(32); imx_alloc_mx3_camera() 87 pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); imx_alloc_mx3_camera() 89 ret = platform_device_add_resources(pdev, res, ARRAY_SIZE(res)); imx_alloc_mx3_camera() 96 ret = platform_device_add_data(pdev, pdata, sizeof(*pdata)); imx_alloc_mx3_camera() 99 kfree(pdev->dev.dma_mask); imx_alloc_mx3_camera() 100 platform_device_put(pdev); imx_alloc_mx3_camera() 103 copied_pdata = dev_get_platdata(&pdev->dev); imx_alloc_mx3_camera() 107 return pdev; imx_alloc_mx3_camera()
|
/linux-4.1.27/drivers/misc/ |
H A D | atmel-ssc.c | 34 if (ssc->pdev->dev.of_node) { ssc_request() 35 if (of_alias_get_id(ssc->pdev->dev.of_node, "ssc") ssc_request() 40 } else if (ssc->pdev->id == ssc_num) { ssc_request() 54 dev_dbg(&ssc->pdev->dev, "module busy\n"); ssc_request() 75 dev_dbg(&ssc->pdev->dev, "device already free\n"); ssc_free() 133 atmel_ssc_get_driver_data(struct platform_device *pdev) atmel_ssc_get_driver_data() argument 135 if (pdev->dev.of_node) { atmel_ssc_get_driver_data() 137 match = of_match_node(atmel_ssc_dt_ids, pdev->dev.of_node); atmel_ssc_get_driver_data() 144 platform_get_device_id(pdev)->driver_data; atmel_ssc_get_driver_data() 147 static int ssc_probe(struct platform_device *pdev) ssc_probe() argument 153 ssc = devm_kzalloc(&pdev->dev, sizeof(struct ssc_device), GFP_KERNEL); ssc_probe() 155 dev_dbg(&pdev->dev, "out of memory\n"); ssc_probe() 159 ssc->pdev = pdev; ssc_probe() 161 plat_dat = atmel_ssc_get_driver_data(pdev); ssc_probe() 166 if (pdev->dev.of_node) { ssc_probe() 167 struct device_node *np = pdev->dev.of_node; ssc_probe() 172 regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); ssc_probe() 173 ssc->regs = devm_ioremap_resource(&pdev->dev, regs); ssc_probe() 179 ssc->clk = devm_clk_get(&pdev->dev, "pclk"); ssc_probe() 181 dev_dbg(&pdev->dev, "no pclk clock defined\n"); ssc_probe() 191 ssc->irq = platform_get_irq(pdev, 0); ssc_probe() 193 dev_dbg(&pdev->dev, "could not get irq\n"); ssc_probe() 201 platform_set_drvdata(pdev, ssc); ssc_probe() 203 dev_info(&pdev->dev, "Atmel SSC device at 0x%p (irq %d)\n", ssc_probe() 209 static int ssc_remove(struct platform_device *pdev) ssc_remove() argument 211 struct ssc_device *ssc = platform_get_drvdata(pdev); ssc_remove()
|
H A D | atmel_tclib.c | 46 struct platform_device *pdev = NULL; atmel_tc_alloc() local 53 if ((tc->pdev->dev.of_node && tc->id == block) || atmel_tc_alloc() 54 (tc->pdev->id == block)) { atmel_tc_alloc() 55 pdev = tc->pdev; atmel_tc_alloc() 62 return pdev ? tc : NULL; atmel_tc_alloc() 106 static int __init tc_probe(struct platform_device *pdev) tc_probe() argument 114 irq = platform_get_irq(pdev, 0); tc_probe() 118 tc = devm_kzalloc(&pdev->dev, sizeof(struct atmel_tc), GFP_KERNEL); tc_probe() 122 tc->pdev = pdev; tc_probe() 124 clk = devm_clk_get(&pdev->dev, "t0_clk"); tc_probe() 128 r = platform_get_resource(pdev, IORESOURCE_MEM, 0); tc_probe() 129 tc->regs = devm_ioremap_resource(&pdev->dev, r); tc_probe() 134 if (pdev->dev.of_node) { tc_probe() 136 match = of_match_node(atmel_tcb_dt_ids, pdev->dev.of_node); tc_probe() 140 tc->id = of_alias_get_id(tc->pdev->dev.of_node, "tcb"); tc_probe() 142 tc->id = pdev->id; tc_probe() 146 tc->clk[1] = devm_clk_get(&pdev->dev, "t1_clk"); tc_probe() 149 tc->clk[2] = devm_clk_get(&pdev->dev, "t2_clk"); tc_probe() 154 tc->irq[1] = platform_get_irq(pdev, 1); tc_probe() 157 tc->irq[2] = platform_get_irq(pdev, 2); tc_probe() 168 platform_set_drvdata(pdev, tc); tc_probe() 173 static void tc_shutdown(struct platform_device *pdev) tc_shutdown() argument 176 struct atmel_tc *tc = platform_get_drvdata(pdev); tc_shutdown()
|
/linux-4.1.27/drivers/hwmon/ |
H A D | k8temp.c | 57 struct pci_dev *pdev = to_pci_dev(dev); k8temp_update_device() local 64 pci_read_config_byte(pdev, REG_TEMP, &tmp); k8temp_update_device() 66 pci_write_config_byte(pdev, REG_TEMP, tmp); k8temp_update_device() 67 pci_read_config_dword(pdev, REG_TEMP, &data->temp[0][0]); k8temp_update_device() 71 pci_write_config_byte(pdev, REG_TEMP, tmp); k8temp_update_device() 72 pci_read_config_dword(pdev, REG_TEMP, k8temp_update_device() 79 pci_write_config_byte(pdev, REG_TEMP, tmp); k8temp_update_device() 80 pci_read_config_dword(pdev, REG_TEMP, k8temp_update_device() 85 pci_write_config_byte(pdev, REG_TEMP, tmp); k8temp_update_device() 86 pci_read_config_dword(pdev, REG_TEMP, k8temp_update_device() 176 static int k8temp_probe(struct pci_dev *pdev, k8temp_probe() argument 185 data = devm_kzalloc(&pdev->dev, sizeof(struct k8temp_data), GFP_KERNEL); k8temp_probe() 203 dev_warn(&pdev->dev, k8temp_probe() 215 pci_read_config_byte(pdev, REG_TEMP, &scfg); k8temp_probe() 217 pci_write_config_byte(pdev, REG_TEMP, scfg); k8temp_probe() 218 pci_read_config_byte(pdev, REG_TEMP, &scfg); k8temp_probe() 221 dev_err(&pdev->dev, "Configuration bit(s) stuck at 1!\n"); k8temp_probe() 226 pci_write_config_byte(pdev, REG_TEMP, scfg); k8temp_probe() 229 pci_read_config_byte(pdev, REG_TEMP, &data->sensorsp); k8temp_probe() 233 pci_write_config_byte(pdev, REG_TEMP, scfg); k8temp_probe() 234 pci_read_config_dword(pdev, REG_TEMP, &temp); k8temp_probe() 242 pci_write_config_byte(pdev, REG_TEMP, scfg); k8temp_probe() 243 pci_read_config_dword(pdev, REG_TEMP, &temp); k8temp_probe() 250 pci_set_drvdata(pdev, data); k8temp_probe() 253 err = device_create_file(&pdev->dev, k8temp_probe() 260 err = device_create_file(&pdev->dev, k8temp_probe() 268 err = device_create_file(&pdev->dev, k8temp_probe() 273 err = device_create_file(&pdev->dev, k8temp_probe() 281 err = device_create_file(&pdev->dev, &dev_attr_name); k8temp_probe() 285 data->hwmon_dev = hwmon_device_register(&pdev->dev); k8temp_probe() 295 device_remove_file(&pdev->dev, k8temp_probe() 297 device_remove_file(&pdev->dev, k8temp_probe() 299 device_remove_file(&pdev->dev, k8temp_probe() 301 device_remove_file(&pdev->dev, k8temp_probe() 303 device_remove_file(&pdev->dev, &dev_attr_name); k8temp_probe() 307 static void k8temp_remove(struct pci_dev *pdev) k8temp_remove() argument 309 struct k8temp_data *data = pci_get_drvdata(pdev); k8temp_remove() 312 device_remove_file(&pdev->dev, k8temp_remove() 314 device_remove_file(&pdev->dev, k8temp_remove() 316 device_remove_file(&pdev->dev, k8temp_remove() 318 device_remove_file(&pdev->dev, k8temp_remove() 320 device_remove_file(&pdev->dev, &dev_attr_name); k8temp_remove()
|
H A D | i5500_temp.c | 49 struct pci_dev *pdev = to_pci_dev(dev->parent); show_temp() local 54 pci_read_config_word(pdev, REG_TSTHRHI, &tsthrhi); show_temp() 55 pci_read_config_byte(pdev, REG_TSFSC, &tsfsc); show_temp() 64 struct pci_dev *pdev = to_pci_dev(dev->parent); show_thresh() local 69 pci_read_config_word(pdev, reg, &tsthr); show_thresh() 78 struct pci_dev *pdev = to_pci_dev(dev->parent); show_alarm() local 82 pci_read_config_byte(pdev, REG_CTSTS, &ctsts); show_alarm() 112 static int i5500_temp_probe(struct pci_dev *pdev, i5500_temp_probe() argument 120 err = pci_enable_device(pdev); i5500_temp_probe() 122 dev_err(&pdev->dev, "Failed to enable device\n"); i5500_temp_probe() 126 pci_read_config_byte(pdev, REG_TSFSC, &tsfsc); i5500_temp_probe() 127 pci_read_config_dword(pdev, REG_TSTIMER, &tstimer); i5500_temp_probe() 129 dev_notice(&pdev->dev, "Sensor seems to be disabled\n"); i5500_temp_probe() 133 hwmon_dev = devm_hwmon_device_register_with_groups(&pdev->dev, i5500_temp_probe()
|
H A D | jz4740-hwmon.c | 104 static int jz4740_hwmon_probe(struct platform_device *pdev) jz4740_hwmon_probe() argument 110 hwmon = devm_kzalloc(&pdev->dev, sizeof(*hwmon), GFP_KERNEL); jz4740_hwmon_probe() 114 hwmon->cell = mfd_get_cell(pdev); jz4740_hwmon_probe() 116 hwmon->irq = platform_get_irq(pdev, 0); jz4740_hwmon_probe() 118 dev_err(&pdev->dev, "Failed to get platform irq: %d\n", jz4740_hwmon_probe() 123 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); jz4740_hwmon_probe() 124 hwmon->base = devm_ioremap_resource(&pdev->dev, mem); jz4740_hwmon_probe() 131 platform_set_drvdata(pdev, hwmon); jz4740_hwmon_probe() 133 ret = devm_request_irq(&pdev->dev, hwmon->irq, jz4740_hwmon_irq, 0, jz4740_hwmon_probe() 134 pdev->name, hwmon); jz4740_hwmon_probe() 136 dev_err(&pdev->dev, "Failed to request irq: %d\n", ret); jz4740_hwmon_probe() 141 ret = sysfs_create_group(&pdev->dev.kobj, &jz4740_hwmon_attr_group); jz4740_hwmon_probe() 143 dev_err(&pdev->dev, "Failed to create sysfs group: %d\n", ret); jz4740_hwmon_probe() 147 hwmon->hwmon = hwmon_device_register(&pdev->dev); jz4740_hwmon_probe() 156 sysfs_remove_group(&pdev->dev.kobj, &jz4740_hwmon_attr_group); jz4740_hwmon_probe() 160 static int jz4740_hwmon_remove(struct platform_device *pdev) jz4740_hwmon_remove() argument 162 struct jz4740_hwmon *hwmon = platform_get_drvdata(pdev); jz4740_hwmon_remove() 165 sysfs_remove_group(&pdev->dev.kobj, &jz4740_hwmon_attr_group); jz4740_hwmon_remove()
|
/linux-4.1.27/drivers/staging/i2o/ |
H A D | pci.c | 59 dev = &c->pdev->dev; i2o_pci_free() 74 pci_release_regions(c->pdev); i2o_pci_free() 89 struct pci_dev *pdev = c->pdev; i2o_pci_alloc() local 90 struct device *dev = &pdev->dev; i2o_pci_alloc() 93 if (pci_request_regions(pdev, OSM_DESCRIPTION)) { i2o_pci_alloc() 100 if (!(pci_resource_flags(pdev, i) & IORESOURCE_IO)) { i2o_pci_alloc() 102 c->base.phys = pci_resource_start(pdev, i); i2o_pci_alloc() 103 c->base.len = pci_resource_len(pdev, i); i2o_pci_alloc() 109 if (pdev->device == 0xa501) { i2o_pci_alloc() 110 if (pdev->subsystem_device >= 0xc032 && i2o_pci_alloc() 111 pdev->subsystem_device <= 0xc03b) { i2o_pci_alloc() 122 c->in_queue.phys = pci_resource_start(pdev, i); i2o_pci_alloc() 123 c->in_queue.len = pci_resource_len(pdev, i); i2o_pci_alloc() 174 if (pdev->vendor == PCI_VENDOR_ID_MOTOROLA && pdev->device == 0x18c0) { i2o_pci_alloc() 218 pci_set_drvdata(pdev, c); i2o_pci_alloc() 271 struct pci_dev *pdev = c->pdev; i2o_pci_irq_enable() local 276 if (pdev->irq) { i2o_pci_irq_enable() 277 rc = request_irq(pdev->irq, i2o_pci_interrupt, IRQF_SHARED, i2o_pci_irq_enable() 281 "\n", c->name, pdev->irq); i2o_pci_irq_enable() 288 printk(KERN_INFO "%s: Installed at IRQ %d\n", c->name, pdev->irq); i2o_pci_irq_enable() 303 if (c->pdev->irq > 0) i2o_pci_irq_disable() 304 free_irq(c->pdev->irq, c); i2o_pci_irq_disable() 309 * @pdev: PCI device to test 318 static int i2o_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) i2o_pci_probe() argument 326 if ((pdev->class & 0xff) > 1) { i2o_pci_probe() 328 "(skipping).\n", pci_name(pdev)); i2o_pci_probe() 332 rc = pci_enable_device(pdev); i2o_pci_probe() 335 pci_name(pdev)); i2o_pci_probe() 339 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) { i2o_pci_probe() 341 pci_name(pdev)); i2o_pci_probe() 346 pci_set_master(pdev); i2o_pci_probe() 351 pci_name(pdev)); i2o_pci_probe() 356 pci_name(pdev)); i2o_pci_probe() 358 c->pdev = pdev; i2o_pci_probe() 359 c->device.parent = &pdev->dev; i2o_pci_probe() 362 if (pdev->vendor == PCI_VENDOR_ID_NCR && pdev->device == 0x0630) { i2o_pci_probe() 368 if (pdev->subsystem_vendor == PCI_VENDOR_ID_PROMISE) { i2o_pci_probe() 373 i960 = pci_get_slot(c->pdev->bus, i2o_pci_probe() 374 PCI_DEVFN(PCI_SLOT(c->pdev->devfn), 0)); i2o_pci_probe() 385 if (pdev->subsystem_vendor == PCI_VENDOR_ID_DPT) i2o_pci_probe() 389 if (pdev->vendor == PCI_VENDOR_ID_DPT) { i2o_pci_probe() 391 if (pdev->device == 0xa511) i2o_pci_probe() 394 if (pdev->subsystem_device == 0xc05a) { i2o_pci_probe() 402 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) i2o_pci_probe() 446 pci_disable_device(pdev); i2o_pci_probe() 453 * @pdev: I2O controller which should be removed 458 static void i2o_pci_remove(struct pci_dev *pdev) i2o_pci_remove() argument 461 c = pci_get_drvdata(pdev); i2o_pci_remove() 467 pci_disable_device(pdev); i2o_pci_remove()
|
/linux-4.1.27/drivers/xen/ |
H A D | platform-pci.c | 59 static uint64_t get_callback_via(struct pci_dev *pdev) get_callback_via() argument 64 irq = pdev->irq; get_callback_via() 68 pin = pdev->pin; get_callback_via() 72 ((uint64_t)pci_domain_nr(pdev->bus) << 32) | get_callback_via() 73 ((uint64_t)pdev->bus->number << 16) | get_callback_via() 74 ((uint64_t)(pdev->devfn & 0xff) << 8) | get_callback_via() 84 static int xen_allocate_irq(struct pci_dev *pdev) xen_allocate_irq() argument 86 return request_irq(pdev->irq, do_hvm_evtchn_intr, xen_allocate_irq() 88 "xen-platform-pci", pdev); xen_allocate_irq() 91 static int platform_pci_resume(struct pci_dev *pdev) platform_pci_resume() argument 98 dev_err(&pdev->dev, "platform_pci_resume failure!\n"); platform_pci_resume() 104 static int platform_pci_init(struct pci_dev *pdev, platform_pci_init() argument 116 i = pci_enable_device(pdev); platform_pci_init() 120 ioaddr = pci_resource_start(pdev, 0); platform_pci_init() 122 mmio_addr = pci_resource_start(pdev, 1); platform_pci_init() 123 mmio_len = pci_resource_len(pdev, 1); platform_pci_init() 126 dev_err(&pdev->dev, "no resources found\n"); platform_pci_init() 131 ret = pci_request_region(pdev, 1, DRV_NAME); platform_pci_init() 135 ret = pci_request_region(pdev, 0, DRV_NAME); platform_pci_init() 143 ret = xen_allocate_irq(pdev); platform_pci_init() 145 dev_warn(&pdev->dev, "request_irq failed err=%d\n", ret); platform_pci_init() 148 callback_via = get_callback_via(pdev); platform_pci_init() 151 dev_warn(&pdev->dev, "Unable to set the evtchn callback " platform_pci_init() 170 pci_release_region(pdev, 0); platform_pci_init() 172 pci_release_region(pdev, 1); platform_pci_init() 174 pci_disable_device(pdev); platform_pci_init()
|
/linux-4.1.27/drivers/uio/ |
H A D | uio_pci_generic.c | 34 struct pci_dev *pdev; member in struct:uio_pci_generic_dev 49 if (!pci_check_and_mask_intx(gdev->pdev)) irqhandler() 56 static int probe(struct pci_dev *pdev, probe() argument 62 err = pci_enable_device(pdev); probe() 64 dev_err(&pdev->dev, "%s: pci_enable_device failed: %d\n", probe() 69 if (!pdev->irq) { probe() 70 dev_warn(&pdev->dev, "No IRQ assigned to device: " probe() 72 pci_disable_device(pdev); probe() 76 if (!pci_intx_mask_supported(pdev)) { probe() 89 gdev->info.irq = pdev->irq; probe() 92 gdev->pdev = pdev; probe() 94 err = uio_register_device(&pdev->dev, &gdev->info); probe() 97 pci_set_drvdata(pdev, gdev); probe() 104 pci_disable_device(pdev); probe() 108 static void remove(struct pci_dev *pdev) remove() argument 110 struct uio_pci_generic_dev *gdev = pci_get_drvdata(pdev); remove() 113 pci_disable_device(pdev); remove()
|
H A D | uio_dmem_genirq.c | 38 struct platform_device *pdev; member in struct:uio_dmem_genirq_platdata 61 addr = dma_alloc_coherent(&priv->pdev->dev, uiomem->size, uio_dmem_genirq_open() 73 pm_runtime_get_sync(&priv->pdev->dev); uio_dmem_genirq_open() 84 pm_runtime_put_sync(&priv->pdev->dev); uio_dmem_genirq_release() 95 dma_free_coherent(&priv->pdev->dev, uiomem->size, uio_dmem_genirq_release() 147 static int uio_dmem_genirq_probe(struct platform_device *pdev) uio_dmem_genirq_probe() argument 149 struct uio_dmem_genirq_pdata *pdata = dev_get_platdata(&pdev->dev); uio_dmem_genirq_probe() 156 if (pdev->dev.of_node) { uio_dmem_genirq_probe() 163 dev_err(&pdev->dev, "unable to kmalloc\n"); uio_dmem_genirq_probe() 166 uioinfo->name = pdev->dev.of_node->name; uio_dmem_genirq_probe() 170 irq = platform_get_irq(pdev, 0); uio_dmem_genirq_probe() 178 dev_err(&pdev->dev, "missing platform_data\n"); uio_dmem_genirq_probe() 184 dev_err(&pdev->dev, "interrupt configuration error\n"); uio_dmem_genirq_probe() 191 dev_err(&pdev->dev, "unable to kmalloc\n"); uio_dmem_genirq_probe() 195 dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32)); uio_dmem_genirq_probe() 200 priv->pdev = pdev; uio_dmem_genirq_probe() 204 ret = platform_get_irq(pdev, 0); uio_dmem_genirq_probe() 206 dev_err(&pdev->dev, "failed to get IRQ\n"); uio_dmem_genirq_probe() 213 for (i = 0; i < pdev->num_resources; ++i) { uio_dmem_genirq_probe() 214 struct resource *r = &pdev->resource[i]; uio_dmem_genirq_probe() 220 dev_warn(&pdev->dev, "device has more than " uio_dmem_genirq_probe() 237 dev_warn(&pdev->dev, "device has more than " uio_dmem_genirq_probe() 273 pm_runtime_enable(&pdev->dev); uio_dmem_genirq_probe() 275 ret = uio_register_device(&pdev->dev, priv->uioinfo); uio_dmem_genirq_probe() 277 dev_err(&pdev->dev, "unable to register uio device\n"); uio_dmem_genirq_probe() 278 pm_runtime_disable(&pdev->dev); uio_dmem_genirq_probe() 282 platform_set_drvdata(pdev, priv); uio_dmem_genirq_probe() 288 if (pdev->dev.of_node) uio_dmem_genirq_probe() 294 static int uio_dmem_genirq_remove(struct platform_device *pdev) uio_dmem_genirq_remove() argument 296 struct uio_dmem_genirq_platdata *priv = platform_get_drvdata(pdev); uio_dmem_genirq_remove() 299 pm_runtime_disable(&pdev->dev); uio_dmem_genirq_remove() 305 if (pdev->dev.of_node) uio_dmem_genirq_remove()
|
H A D | uio_aec.c | 69 static void print_board_data(struct pci_dev *pdev, struct uio_info *i) print_board_data() argument 71 dev_info(&pdev->dev, "PCI-TC board vendor: %x%x number: %x%x" print_board_data() 81 static int probe(struct pci_dev *pdev, const struct pci_device_id *id) probe() argument 90 if (pci_enable_device(pdev)) probe() 93 if (pci_request_regions(pdev, "aectc")) probe() 97 info->port[0].start = pci_resource_start(pdev, 0); probe() 100 info->priv = pci_iomap(pdev, 0, 0); probe() 103 info->port[0].size = pci_resource_len(pdev, 0); probe() 107 info->irq = pdev->irq; probe() 111 print_board_data(pdev, info); probe() 112 ret = uio_register_device(&pdev->dev, info); probe() 120 dev_err(&pdev->dev, "aectc: interrupts not enabled\n"); probe() 122 pci_set_drvdata(pdev, info); probe() 127 pci_iounmap(pdev, info->priv); probe() 129 pci_release_regions(pdev); probe() 131 pci_disable_device(pdev); probe() 137 static void remove(struct pci_dev *pdev) remove() argument 139 struct uio_info *info = pci_get_drvdata(pdev); remove() 148 pci_release_regions(pdev); remove() 149 pci_disable_device(pdev); remove()
|
H A D | uio_pdrv_genirq.c | 37 struct platform_device *pdev; member in struct:uio_pdrv_genirq_platdata 50 pm_runtime_get_sync(&priv->pdev->dev); uio_pdrv_genirq_open() 59 pm_runtime_put_sync(&priv->pdev->dev); uio_pdrv_genirq_release() 105 static int uio_pdrv_genirq_probe(struct platform_device *pdev) uio_pdrv_genirq_probe() argument 107 struct uio_info *uioinfo = dev_get_platdata(&pdev->dev); uio_pdrv_genirq_probe() 113 if (pdev->dev.of_node) { uio_pdrv_genirq_probe() 115 uioinfo = devm_kzalloc(&pdev->dev, sizeof(*uioinfo), uio_pdrv_genirq_probe() 118 dev_err(&pdev->dev, "unable to kmalloc\n"); uio_pdrv_genirq_probe() 121 uioinfo->name = pdev->dev.of_node->name; uio_pdrv_genirq_probe() 127 dev_err(&pdev->dev, "missing platform_data\n"); uio_pdrv_genirq_probe() 133 dev_err(&pdev->dev, "interrupt configuration error\n"); uio_pdrv_genirq_probe() 137 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); uio_pdrv_genirq_probe() 139 dev_err(&pdev->dev, "unable to kmalloc\n"); uio_pdrv_genirq_probe() 146 priv->pdev = pdev; uio_pdrv_genirq_probe() 149 ret = platform_get_irq(pdev, 0); uio_pdrv_genirq_probe() 151 if (ret == -ENXIO && pdev->dev.of_node) uio_pdrv_genirq_probe() 154 dev_err(&pdev->dev, "failed to get IRQ\n"); uio_pdrv_genirq_probe() 161 for (i = 0; i < pdev->num_resources; ++i) { uio_pdrv_genirq_probe() 162 struct resource *r = &pdev->resource[i]; uio_pdrv_genirq_probe() 168 dev_warn(&pdev->dev, "device has more than " uio_pdrv_genirq_probe() 206 pm_runtime_enable(&pdev->dev); uio_pdrv_genirq_probe() 208 ret = uio_register_device(&pdev->dev, priv->uioinfo); uio_pdrv_genirq_probe() 210 dev_err(&pdev->dev, "unable to register uio device\n"); uio_pdrv_genirq_probe() 211 pm_runtime_disable(&pdev->dev); uio_pdrv_genirq_probe() 215 platform_set_drvdata(pdev, priv); uio_pdrv_genirq_probe() 219 static int uio_pdrv_genirq_remove(struct platform_device *pdev) uio_pdrv_genirq_remove() argument 221 struct uio_pdrv_genirq_platdata *priv = platform_get_drvdata(pdev); uio_pdrv_genirq_remove() 224 pm_runtime_disable(&pdev->dev); uio_pdrv_genirq_remove()
|
/linux-4.1.27/drivers/regulator/ |
H A D | stw481x-vmmc.c | 55 static int stw481x_vmmc_regulator_probe(struct platform_device *pdev) stw481x_vmmc_regulator_probe() argument 57 struct stw481x *stw481x = dev_get_platdata(&pdev->dev); stw481x_vmmc_regulator_probe() 66 dev_err(&pdev->dev, "could not disable external VMMC\n"); stw481x_vmmc_regulator_probe() 71 config.dev = &pdev->dev; stw481x_vmmc_regulator_probe() 74 config.of_node = pdev->dev.of_node; stw481x_vmmc_regulator_probe() 75 config.init_data = of_get_regulator_init_data(&pdev->dev, stw481x_vmmc_regulator_probe() 76 pdev->dev.of_node, stw481x_vmmc_regulator_probe() 79 rdev = devm_regulator_register(&pdev->dev, &vmmc_regulator, &config); stw481x_vmmc_regulator_probe() 81 dev_err(&pdev->dev, stw481x_vmmc_regulator_probe() 86 dev_info(&pdev->dev, "initialized STw481x VMMC regulator\n"); stw481x_vmmc_regulator_probe()
|
H A D | fixed-helper.c | 10 struct platform_device pdev; member in struct:fixed_regulator_data 16 struct fixed_regulator_data, pdev.dev); regulator_fixed_release() 53 data->pdev.name = "reg-fixed-voltage"; regulator_register_always_on() 54 data->pdev.id = id; regulator_register_always_on() 55 data->pdev.dev.platform_data = &data->cfg; regulator_register_always_on() 56 data->pdev.dev.release = regulator_fixed_release; regulator_register_always_on() 58 platform_device_register(&data->pdev); regulator_register_always_on() 60 return &data->pdev; regulator_register_always_on()
|
/linux-4.1.27/drivers/gpio/ |
H A D | gpio-clps711x.c | 18 static int clps711x_gpio_probe(struct platform_device *pdev) clps711x_gpio_probe() argument 20 struct device_node *np = pdev->dev.of_node; clps711x_gpio_probe() 24 int err, id = np ? of_alias_get_id(np, "gpio") : pdev->id; clps711x_gpio_probe() 29 bgc = devm_kzalloc(&pdev->dev, sizeof(*bgc), GFP_KERNEL); clps711x_gpio_probe() 33 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); clps711x_gpio_probe() 34 dat = devm_ioremap_resource(&pdev->dev, res); clps711x_gpio_probe() 38 res = platform_get_resource(pdev, IORESOURCE_MEM, 1); clps711x_gpio_probe() 39 dir = devm_ioremap_resource(&pdev->dev, res); clps711x_gpio_probe() 46 err = bgpio_init(bgc, &pdev->dev, 1, dat, NULL, NULL, clps711x_gpio_probe() 50 err = bgpio_init(bgc, &pdev->dev, 1, dat, NULL, NULL, clps711x_gpio_probe() 69 platform_set_drvdata(pdev, bgc); clps711x_gpio_probe() 74 static int clps711x_gpio_remove(struct platform_device *pdev) clps711x_gpio_remove() argument 76 struct bgpio_chip *bgc = platform_get_drvdata(pdev); clps711x_gpio_remove()
|
H A D | gpio-ge.c | 54 static int __init gef_gpio_probe(struct platform_device *pdev) gef_gpio_probe() argument 57 of_match_device(gef_gpio_ids, &pdev->dev); gef_gpio_probe() 62 bgc = devm_kzalloc(&pdev->dev, sizeof(*bgc), GFP_KERNEL); gef_gpio_probe() 66 regs = of_iomap(pdev->dev.of_node, 0); gef_gpio_probe() 70 ret = bgpio_init(bgc, &pdev->dev, 4, regs + GEF_GPIO_IN, gef_gpio_probe() 74 dev_err(&pdev->dev, "bgpio_init failed\n"); gef_gpio_probe() 79 bgc->gc.label = devm_kstrdup(&pdev->dev, pdev->dev.of_node->full_name, gef_gpio_probe() 89 bgc->gc.of_node = pdev->dev.of_node; gef_gpio_probe() 100 pdev->dev.of_node->full_name); gef_gpio_probe()
|
/linux-4.1.27/drivers/gpu/drm/nouveau/ |
H A D | nouveau_vga.c | 34 nouveau_switcheroo_set_state(struct pci_dev *pdev, nouveau_switcheroo_set_state() argument 37 struct drm_device *dev = pci_get_drvdata(pdev); nouveau_switcheroo_set_state() 45 nouveau_pmops_resume(&pdev->dev); nouveau_switcheroo_set_state() 53 nouveau_pmops_suspend(&pdev->dev); nouveau_switcheroo_set_state() 59 nouveau_switcheroo_reprobe(struct pci_dev *pdev) nouveau_switcheroo_reprobe() argument 61 struct drm_device *dev = pci_get_drvdata(pdev); nouveau_switcheroo_reprobe() 66 nouveau_switcheroo_can_switch(struct pci_dev *pdev) nouveau_switcheroo_can_switch() argument 68 struct drm_device *dev = pci_get_drvdata(pdev); nouveau_switcheroo_can_switch() 92 if (!dev->pdev) nouveau_vga_init() 95 vga_client_register(dev->pdev, dev, NULL, nouveau_vga_set_decode); nouveau_vga_init() 101 vga_switcheroo_register_client(dev->pdev, &nouveau_switcheroo_ops, runtime); nouveau_vga_init() 118 vga_switcheroo_unregister_client(dev->pdev); nouveau_vga_fini() 121 vga_client_register(dev->pdev, NULL, NULL, NULL); nouveau_vga_fini()
|
/linux-4.1.27/drivers/scsi/ufs/ |
H A D | ufshcd-pci.c | 43 * @pdev: pointer to PCI device handle 56 * @pdev: pointer to PCI device handle 88 * @pdev: pointer to PCI device handle 90 static void ufshcd_pci_shutdown(struct pci_dev *pdev) ufshcd_pci_shutdown() argument 92 ufshcd_shutdown((struct ufs_hba *)pci_get_drvdata(pdev)); ufshcd_pci_shutdown() 98 * @pdev - pointer to PCI handle 100 static void ufshcd_pci_remove(struct pci_dev *pdev) ufshcd_pci_remove() argument 102 struct ufs_hba *hba = pci_get_drvdata(pdev); ufshcd_pci_remove() 104 pm_runtime_forbid(&pdev->dev); ufshcd_pci_remove() 105 pm_runtime_get_noresume(&pdev->dev); ufshcd_pci_remove() 111 * @pdev: pointer to PCI device handle 117 ufshcd_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) ufshcd_pci_probe() argument 123 err = pcim_enable_device(pdev); ufshcd_pci_probe() 125 dev_err(&pdev->dev, "pcim_enable_device failed\n"); ufshcd_pci_probe() 129 pci_set_master(pdev); ufshcd_pci_probe() 131 err = pcim_iomap_regions(pdev, 1 << 0, UFSHCD); ufshcd_pci_probe() 133 dev_err(&pdev->dev, "request and iomap failed\n"); ufshcd_pci_probe() 137 mmio_base = pcim_iomap_table(pdev)[0]; ufshcd_pci_probe() 139 err = ufshcd_alloc_host(&pdev->dev, &hba); ufshcd_pci_probe() 141 dev_err(&pdev->dev, "Allocation failed\n"); ufshcd_pci_probe() 147 err = ufshcd_init(hba, mmio_base, pdev->irq); ufshcd_pci_probe() 149 dev_err(&pdev->dev, "Initialization failed\n"); ufshcd_pci_probe() 153 pci_set_drvdata(pdev, hba); ufshcd_pci_probe() 154 pm_runtime_put_noidle(&pdev->dev); ufshcd_pci_probe() 155 pm_runtime_allow(&pdev->dev); ufshcd_pci_probe()
|
/linux-4.1.27/drivers/net/wireless/p54/ |
H A D | p54pci.c | 87 dev_err(&priv->pdev->dev, "wrong firmware, " p54p_upload_firmware() 159 mapping = pci_map_single(priv->pdev, p54p_refill_rx_ring() 164 if (pci_dma_mapping_error(priv->pdev, mapping)) { p54p_refill_rx_ring() 166 dev_err(&priv->pdev->dev, p54p_refill_rx_ring() 215 dev_err(&priv->pdev->dev, "rx'd frame size " p54p_check_rx_ring() 221 pci_dma_sync_single_for_cpu(priv->pdev, dma_addr, p54p_check_rx_ring() 226 pci_unmap_single(priv->pdev, dma_addr, p54p_check_rx_ring() 232 pci_dma_sync_single_for_device(priv->pdev, dma_addr, p54p_check_rx_ring() 264 pci_unmap_single(priv->pdev, le32_to_cpu(desc->host_addr), p54p_check_tx_ring() 340 mapping = pci_map_single(priv->pdev, skb->data, skb->len, p54p_tx() 342 if (pci_dma_mapping_error(priv->pdev, mapping)) { p54p_tx() 345 dev_err(&priv->pdev->dev, "TX DMA mapping error\n"); p54p_tx() 375 free_irq(priv->pdev->irq, dev); p54p_stop() 384 pci_unmap_single(priv->pdev, p54p_stop() 395 pci_unmap_single(priv->pdev, p54p_stop() 406 pci_unmap_single(priv->pdev, p54p_stop() 418 pci_unmap_single(priv->pdev, p54p_stop() 437 err = request_irq(priv->pdev->irq, p54p_interrupt, p54p_open() 440 dev_err(&priv->pdev->dev, "failed to register IRQ handler\n"); p54p_open() 447 free_irq(priv->pdev->irq, dev); p54p_open() 498 struct pci_dev *pdev = priv->pdev; p54p_firmware_step2() local 502 dev_err(&pdev->dev, "Cannot find firmware (isl3886pci)\n"); p54p_firmware_step2() 517 err = p54_register_common(dev, &pdev->dev); p54p_firmware_step2() 526 struct device *parent = pdev->dev.parent; p54p_firmware_step2() 536 device_release_driver(&pdev->dev); p54p_firmware_step2() 542 pci_dev_put(pdev); p54p_firmware_step2() 545 static int p54p_probe(struct pci_dev *pdev, p54p_probe() argument 553 pci_dev_get(pdev); p54p_probe() 554 err = pci_enable_device(pdev); p54p_probe() 556 dev_err(&pdev->dev, "Cannot enable new PCI device\n"); p54p_probe() 560 mem_addr = pci_resource_start(pdev, 0); p54p_probe() 561 mem_len = pci_resource_len(pdev, 0); p54p_probe() 563 dev_err(&pdev->dev, "Too short PCI resources\n"); p54p_probe() 568 err = pci_request_regions(pdev, "p54pci"); p54p_probe() 570 dev_err(&pdev->dev, "Cannot obtain PCI resources\n"); p54p_probe() 574 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); p54p_probe() 576 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); p54p_probe() 578 dev_err(&pdev->dev, "No suitable DMA available\n"); p54p_probe() 582 pci_set_master(pdev); p54p_probe() 583 pci_try_set_mwi(pdev); p54p_probe() 585 pci_write_config_byte(pdev, 0x40, 0); p54p_probe() 586 pci_write_config_byte(pdev, 0x41, 0); p54p_probe() 590 dev_err(&pdev->dev, "ieee80211 alloc failed\n"); p54p_probe() 596 priv->pdev = pdev; p54p_probe() 599 SET_IEEE80211_DEV(dev, &pdev->dev); p54p_probe() 600 pci_set_drvdata(pdev, dev); p54p_probe() 604 dev_err(&pdev->dev, "Cannot map device memory\n"); p54p_probe() 609 priv->ring_control = pci_alloc_consistent(pdev, sizeof(*priv->ring_control), p54p_probe() 612 dev_err(&pdev->dev, "Cannot allocate rings\n"); p54p_probe() 624 &priv->pdev->dev, GFP_KERNEL, p54p_probe() 629 pci_free_consistent(pdev, sizeof(*priv->ring_control), p54p_probe() 639 pci_release_regions(pdev); p54p_probe() 641 pci_disable_device(pdev); p54p_probe() 642 pci_dev_put(pdev); p54p_probe() 646 static void p54p_remove(struct pci_dev *pdev) p54p_remove() argument 648 struct ieee80211_hw *dev = pci_get_drvdata(pdev); p54p_remove() 658 pci_free_consistent(pdev, sizeof(*priv->ring_control), p54p_remove() 661 pci_release_regions(pdev); p54p_remove() 662 pci_disable_device(pdev); p54p_remove() 669 struct pci_dev *pdev = to_pci_dev(device); p54p_suspend() local 671 pci_save_state(pdev); p54p_suspend() 672 pci_set_power_state(pdev, PCI_D3hot); p54p_suspend() 673 pci_disable_device(pdev); p54p_suspend() 679 struct pci_dev *pdev = to_pci_dev(device); p54p_resume() local 682 err = pci_reenable_device(pdev); p54p_resume() 685 return pci_set_power_state(pdev, PCI_D0); p54p_resume()
|
/linux-4.1.27/drivers/gpu/drm/gma500/ |
H A D | power.c | 73 pm_runtime_disable(&dev->pdev->dev); gma_power_uninit() 74 pm_runtime_set_suspended(&dev->pdev->dev); gma_power_uninit() 100 static void gma_resume_display(struct pci_dev *pdev) gma_resume_display() argument 102 struct drm_device *dev = pci_get_drvdata(pdev); gma_resume_display() 111 pci_write_config_word(pdev, PSB_GMCH_CTRL, gma_resume_display() 120 * @pdev: PCI device 124 static void gma_suspend_pci(struct pci_dev *pdev) gma_suspend_pci() argument 126 struct drm_device *dev = pci_get_drvdata(pdev); gma_suspend_pci() 133 pci_save_state(pdev); gma_suspend_pci() 134 pci_read_config_dword(pdev, 0x5C, &bsm); gma_suspend_pci() 136 pci_read_config_dword(pdev, 0xFC, &vbt); gma_suspend_pci() 138 pci_read_config_dword(pdev, PSB_PCIx_MSI_ADDR_LOC, &dev_priv->msi_addr); gma_suspend_pci() 139 pci_read_config_dword(pdev, PSB_PCIx_MSI_DATA_LOC, &dev_priv->msi_data); gma_suspend_pci() 141 pci_disable_device(pdev); gma_suspend_pci() 142 pci_set_power_state(pdev, PCI_D3hot); gma_suspend_pci() 154 static bool gma_resume_pci(struct pci_dev *pdev) gma_resume_pci() argument 156 struct drm_device *dev = pci_get_drvdata(pdev); gma_resume_pci() 163 pci_set_power_state(pdev, PCI_D0); gma_resume_pci() 164 pci_restore_state(pdev); gma_resume_pci() 165 pci_write_config_dword(pdev, 0x5c, dev_priv->regs.saveBSM); gma_resume_pci() 166 pci_write_config_dword(pdev, 0xFC, dev_priv->regs.saveVBT); gma_resume_pci() 168 pci_write_config_dword(pdev, PSB_PCIx_MSI_ADDR_LOC, dev_priv->msi_addr); gma_resume_pci() 169 pci_write_config_dword(pdev, PSB_PCIx_MSI_DATA_LOC, dev_priv->msi_data); gma_resume_pci() 170 ret = pci_enable_device(pdev); gma_resume_pci() 173 dev_err(&pdev->dev, "pci_enable failed: %d\n", ret); gma_resume_pci() 181 * @pdev: our PCI device 190 struct pci_dev *pdev = container_of(_dev, struct pci_dev, dev); gma_power_suspend() local 191 struct drm_device *dev = pci_get_drvdata(pdev); gma_power_suspend() 203 gma_suspend_pci(pdev); gma_power_suspend() 211 * @pdev: PCI device 217 struct pci_dev *pdev = container_of(_dev, struct pci_dev, dev); gma_power_resume() local 218 struct drm_device *dev = pci_get_drvdata(pdev); gma_power_resume() 221 gma_resume_pci(pdev); gma_power_resume() 222 gma_resume_display(pdev); gma_power_resume() 259 pm_runtime_get(&dev->pdev->dev); gma_power_begin() 267 ret = gma_resume_pci(dev->pdev); gma_power_begin() 271 pm_runtime_get(&dev->pdev->dev); gma_power_begin() 296 pm_runtime_put(&dev->pdev->dev); gma_power_end()
|
/linux-4.1.27/arch/x86/pci/ |
H A D | sta2x11-fixup.c | 60 static void sta2x11_new_instance(struct pci_dev *pdev) sta2x11_new_instance() argument 68 instance->bus0 = pdev->subordinate->number + 1; sta2x11_new_instance() 73 dev_info(&pdev->dev, "Using SWIOTLB (size %i)\n", size); sta2x11_new_instance() 75 dev_emerg(&pdev->dev, "init swiotlb failed\n"); sta2x11_new_instance() 84 static struct sta2x11_instance *sta2x11_pdev_to_instance(struct pci_dev *pdev) sta2x11_pdev_to_instance() argument 90 ep = pdev->bus->number - instance->bus0; sta2x11_pdev_to_instance() 97 static int sta2x11_pdev_to_ep(struct pci_dev *pdev) sta2x11_pdev_to_ep() argument 101 instance = sta2x11_pdev_to_instance(pdev); sta2x11_pdev_to_ep() 105 return pdev->bus->number - instance->bus0; sta2x11_pdev_to_ep() 108 static struct sta2x11_mapping *sta2x11_pdev_to_mapping(struct pci_dev *pdev) sta2x11_pdev_to_mapping() argument 113 instance = sta2x11_pdev_to_instance(pdev); sta2x11_pdev_to_mapping() 116 ep = sta2x11_pdev_to_ep(pdev); sta2x11_pdev_to_mapping() 121 struct sta2x11_instance *sta2x11_get_instance(struct pci_dev *pdev) sta2x11_get_instance() argument 123 return sta2x11_pdev_to_instance(pdev); sta2x11_get_instance() 132 * @pdev: PCI device (must be hosted within the connext) 134 static dma_addr_t p2a(dma_addr_t p, struct pci_dev *pdev) p2a() argument 139 map = sta2x11_pdev_to_mapping(pdev); p2a() 148 * @pdev: PCI device (must be hosted within the connext) 150 static dma_addr_t a2p(dma_addr_t a, struct pci_dev *pdev) a2p() argument 155 map = sta2x11_pdev_to_mapping(pdev); a2p() 198 static void sta2x11_setup_pdev(struct pci_dev *pdev) sta2x11_setup_pdev() argument 200 struct sta2x11_instance *instance = sta2x11_pdev_to_instance(pdev); sta2x11_setup_pdev() 204 pci_set_consistent_dma_mask(pdev, STA2X11_AMBA_SIZE - 1); sta2x11_setup_pdev() 205 pci_set_dma_mask(pdev, STA2X11_AMBA_SIZE - 1); sta2x11_setup_pdev() 206 pdev->dev.archdata.dma_ops = &sta2x11_dma_ops; sta2x11_setup_pdev() 209 pci_set_master(pdev); sta2x11_setup_pdev() 284 /* At probe time, enable mapping for each endpoint, using the pdev */ sta2x11_map_ep() 285 static void sta2x11_map_ep(struct pci_dev *pdev) sta2x11_map_ep() argument 287 struct sta2x11_mapping *map = sta2x11_pdev_to_mapping(pdev); sta2x11_map_ep() 292 pci_read_config_dword(pdev, AHB_BASE(0), &map->amba_base); sta2x11_map_ep() 295 pci_write_config_dword(pdev, AHB_PEXLBASE(0), 0); sta2x11_map_ep() 296 pci_write_config_dword(pdev, AHB_PEXHBASE(0), 0); sta2x11_map_ep() 297 pci_write_config_dword(pdev, AHB_CRW(0), STA2X11_AMBA_SIZE | sta2x11_map_ep() 302 pci_write_config_dword(pdev, AHB_CRW(i), 0); sta2x11_map_ep() 304 dev_info(&pdev->dev, sta2x11_map_ep() 306 sta2x11_pdev_to_ep(pdev), map->amba_base, sta2x11_map_ep() 313 static void suspend_mapping(struct pci_dev *pdev) suspend_mapping() argument 315 struct sta2x11_mapping *map = sta2x11_pdev_to_mapping(pdev); suspend_mapping() 329 pci_read_config_dword(pdev, AHB_BASE(i), ®s->base); suspend_mapping() 330 pci_read_config_dword(pdev, AHB_PEXLBASE(i), ®s->pexlbase); suspend_mapping() 331 pci_read_config_dword(pdev, AHB_PEXHBASE(i), ®s->pexhbase); suspend_mapping() 332 pci_read_config_dword(pdev, AHB_CRW(i), ®s->crw); suspend_mapping() 337 static void resume_mapping(struct pci_dev *pdev) resume_mapping() argument 339 struct sta2x11_mapping *map = sta2x11_pdev_to_mapping(pdev); resume_mapping() 354 pci_write_config_dword(pdev, AHB_BASE(i), regs->base); resume_mapping() 355 pci_write_config_dword(pdev, AHB_PEXLBASE(i), regs->pexlbase); resume_mapping() 356 pci_write_config_dword(pdev, AHB_PEXHBASE(i), regs->pexhbase); resume_mapping() 357 pci_write_config_dword(pdev, AHB_CRW(i), regs->crw); resume_mapping() 360 pci_set_master(pdev); /* Like at boot, enable master on all devices */ resume_mapping()
|
/linux-4.1.27/arch/mips/ath79/ |
H A D | dev-gpio-buttons.c | 23 struct platform_device *pdev; ath79_register_gpio_keys_polled() local 32 pdev = platform_device_alloc("gpio-keys-polled", id); ath79_register_gpio_keys_polled() 33 if (!pdev) ath79_register_gpio_keys_polled() 41 err = platform_device_add_data(pdev, &pdata, sizeof(pdata)); ath79_register_gpio_keys_polled() 45 err = platform_device_add(pdev); ath79_register_gpio_keys_polled() 52 platform_device_put(pdev); ath79_register_gpio_keys_polled()
|
H A D | dev-leds-gpio.c | 22 struct platform_device *pdev; ath79_register_leds_gpio() local 31 pdev = platform_device_alloc("leds-gpio", id); ath79_register_leds_gpio() 32 if (!pdev) ath79_register_leds_gpio() 39 err = platform_device_add_data(pdev, &pdata, sizeof(pdata)); ath79_register_leds_gpio() 43 err = platform_device_add(pdev); ath79_register_leds_gpio() 50 platform_device_put(pdev); ath79_register_leds_gpio()
|
/linux-4.1.27/arch/mips/loongson/loongson-3/ |
H A D | platform.c | 24 struct platform_device *pdev; loongson3_platform_init() local 33 pdev = kzalloc(sizeof(struct platform_device), GFP_KERNEL); loongson3_platform_init() 34 pdev->name = loongson_sysconf.sensors[i].name; loongson3_platform_init() 35 pdev->id = loongson_sysconf.sensors[i].id; loongson3_platform_init() 36 pdev->dev.platform_data = &loongson_sysconf.sensors[i]; loongson3_platform_init() 37 platform_device_register(pdev); loongson3_platform_init()
|
/linux-4.1.27/arch/avr32/mach-at32ap/ |
H A D | pdc.c | 14 static int __init pdc_probe(struct platform_device *pdev) pdc_probe() argument 18 pclk = clk_get(&pdev->dev, "pclk"); pdc_probe() 20 dev_err(&pdev->dev, "no pclk defined\n"); pdc_probe() 23 hclk = clk_get(&pdev->dev, "hclk"); pdc_probe() 25 dev_err(&pdev->dev, "no hclk defined\n"); pdc_probe() 33 dev_info(&pdev->dev, "Atmel Peripheral DMA Controller enabled\n"); pdc_probe()
|
/linux-4.1.27/drivers/vme/boards/ |
H A D | vme_vmivme7805.c | 42 static int vmic_probe(struct pci_dev *pdev, const struct pci_device_id *id) vmic_probe() argument 48 retval = pci_enable_device(pdev); vmic_probe() 50 dev_err(&pdev->dev, "Unable to enable device\n"); vmic_probe() 55 retval = pci_request_regions(pdev, driver_name); vmic_probe() 57 dev_err(&pdev->dev, "Unable to reserve resources\n"); vmic_probe() 62 vmic_base = ioremap_nocache(pci_resource_start(pdev, 0), 16); vmic_probe() 64 dev_err(&pdev->dev, "Unable to remap CRG region\n"); vmic_probe() 90 pci_release_regions(pdev); vmic_probe() 92 pci_disable_device(pdev); vmic_probe() 97 static void vmic_remove(struct pci_dev *pdev) vmic_remove() argument 100 pci_release_regions(pdev); vmic_remove() 101 pci_disable_device(pdev); vmic_remove()
|
/linux-4.1.27/arch/powerpc/sysdev/ |
H A D | mv64x60_dev.c | 36 struct platform_device *pdev; mv64x60_mpsc_register_shared_pdev() local 65 pdev = platform_device_alloc(MPSC_SHARED_NAME, 0); mv64x60_mpsc_register_shared_pdev() 66 if (!pdev) mv64x60_mpsc_register_shared_pdev() 69 err = platform_device_add_resources(pdev, r, 2); mv64x60_mpsc_register_shared_pdev() 73 err = platform_device_add_data(pdev, &pdata, sizeof(pdata)); mv64x60_mpsc_register_shared_pdev() 77 err = platform_device_add(pdev); mv64x60_mpsc_register_shared_pdev() 84 platform_device_put(pdev); mv64x60_mpsc_register_shared_pdev() 93 struct platform_device *pdev; mv64x60_mpsc_device_setup() local 186 pdev = platform_device_alloc(MPSC_CTLR_NAME, port_number); mv64x60_mpsc_device_setup() 187 if (!pdev) mv64x60_mpsc_device_setup() 189 pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); mv64x60_mpsc_device_setup() 191 err = platform_device_add_resources(pdev, r, 5); mv64x60_mpsc_device_setup() 195 err = platform_device_add_data(pdev, &pdata, sizeof(pdata)); mv64x60_mpsc_device_setup() 199 err = platform_device_add(pdev); mv64x60_mpsc_device_setup() 206 platform_device_put(pdev); mv64x60_mpsc_device_setup() 216 struct platform_device *pdev; mv64x60_eth_register_shared_pdev() local 230 pdev = platform_device_register_simple("orion-mdio", -1, &r[1], 1); mv64x60_eth_register_shared_pdev() 231 if (IS_ERR(pdev)) mv64x60_eth_register_shared_pdev() 232 return pdev; mv64x60_eth_register_shared_pdev() 235 pdev = platform_device_register_simple(MV643XX_ETH_SHARED_NAME, id, mv64x60_eth_register_shared_pdev() 238 return pdev; mv64x60_eth_register_shared_pdev() 246 struct platform_device *pdev; mv64x60_eth_device_setup() local 311 pdev = platform_device_alloc(MV643XX_ETH_NAME, id); mv64x60_eth_device_setup() 312 if (!pdev) mv64x60_eth_device_setup() 315 pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); mv64x60_eth_device_setup() 316 err = platform_device_add_resources(pdev, r, 1); mv64x60_eth_device_setup() 320 err = platform_device_add_data(pdev, &pdata, sizeof(pdata)); mv64x60_eth_device_setup() 324 err = platform_device_add(pdev); mv64x60_eth_device_setup() 331 platform_device_put(pdev); mv64x60_eth_device_setup() 341 struct platform_device *pdev; mv64x60_i2c_device_setup() local 368 pdev = platform_device_alloc(MV64XXX_I2C_CTLR_NAME, id); mv64x60_i2c_device_setup() 369 if (!pdev) mv64x60_i2c_device_setup() 372 err = platform_device_add_resources(pdev, r, 2); mv64x60_i2c_device_setup() 376 err = platform_device_add_data(pdev, &pdata, sizeof(pdata)); mv64x60_i2c_device_setup() 380 err = platform_device_add(pdev); mv64x60_i2c_device_setup() 387 platform_device_put(pdev); mv64x60_i2c_device_setup() 397 struct platform_device *pdev; mv64x60_wdt_device_setup() local 420 pdev = platform_device_alloc(MV64x60_WDT_NAME, id); mv64x60_wdt_device_setup() 421 if (!pdev) mv64x60_wdt_device_setup() 424 err = platform_device_add_resources(pdev, &r, 1); mv64x60_wdt_device_setup() 428 err = platform_device_add_data(pdev, &pdata, sizeof(pdata)); mv64x60_wdt_device_setup() 432 err = platform_device_add(pdev); mv64x60_wdt_device_setup() 439 platform_device_put(pdev); mv64x60_wdt_device_setup() 446 struct platform_device *pdev; mv64x60_device_setup() local 462 pdev = mv64x60_eth_register_shared_pdev(np, id++); mv64x60_device_setup() 463 if (IS_ERR(pdev)) { mv64x60_device_setup() 464 err = PTR_ERR(pdev); mv64x60_device_setup() 474 err = mv64x60_eth_device_setup(np2, id2++, pdev); for_each_child_of_node()
|
/linux-4.1.27/arch/arm/mach-omap2/ |
H A D | omap_device.h | 45 * @pdev: platform_device 59 struct platform_device *pdev; member in struct:omap_device 69 int omap_device_enable(struct platform_device *pdev); 70 int omap_device_idle(struct platform_device *pdev); 82 struct omap_device *omap_device_alloc(struct platform_device *pdev, 85 int omap_device_register(struct platform_device *pdev); 90 int omap_device_get_context_loss_count(struct platform_device *pdev); 94 int omap_device_assert_hardreset(struct platform_device *pdev, 96 int omap_device_deassert_hardreset(struct platform_device *pdev, 100 static inline struct omap_device *to_omap_device(struct platform_device *pdev) to_omap_device() argument 102 return pdev ? pdev->archdata.od : NULL; to_omap_device()
|
/linux-4.1.27/drivers/mtd/nand/ |
H A D | plat_nand.c | 32 static int plat_nand_probe(struct platform_device *pdev) plat_nand_probe() argument 34 struct platform_nand_data *pdata = dev_get_platdata(&pdev->dev); plat_nand_probe() 42 dev_err(&pdev->dev, "platform_nand_data is missing\n"); plat_nand_probe() 47 dev_err(&pdev->dev, "invalid number of chips specified\n"); plat_nand_probe() 52 data = devm_kzalloc(&pdev->dev, sizeof(struct plat_nand_data), plat_nand_probe() 57 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); plat_nand_probe() 58 data->io_base = devm_ioremap_resource(&pdev->dev, res); plat_nand_probe() 65 data->mtd.name = dev_name(&pdev->dev); plat_nand_probe() 83 platform_set_drvdata(pdev, data); plat_nand_probe() 87 err = pdata->ctrl.probe(pdev); plat_nand_probe() 100 ppdata.of_node = pdev->dev.of_node; plat_nand_probe() 111 pdata->ctrl.remove(pdev); plat_nand_probe() 118 static int plat_nand_remove(struct platform_device *pdev) plat_nand_remove() argument 120 struct plat_nand_data *data = platform_get_drvdata(pdev); plat_nand_remove() 121 struct platform_nand_data *pdata = dev_get_platdata(&pdev->dev); plat_nand_remove() 125 pdata->ctrl.remove(pdev); plat_nand_remove()
|
/linux-4.1.27/drivers/net/can/softing/ |
H A D | softing_cs.c | 31 static int softingcs_reset(struct platform_device *pdev, int v); 32 static int softingcs_enable_irq(struct platform_device *pdev, int v); 176 static int softingcs_reset(struct platform_device *pdev, int v) softingcs_reset() argument 178 struct pcmcia_device *pcmcia = to_pcmcia_dev(pdev->dev.parent); softingcs_reset() 180 dev_dbg(&pdev->dev, "pcmcia config [2] %02x\n", v ? 0 : 0x20); softingcs_reset() 184 static int softingcs_enable_irq(struct platform_device *pdev, int v) softingcs_enable_irq() argument 186 struct pcmcia_device *pcmcia = to_pcmcia_dev(pdev->dev.parent); softingcs_enable_irq() 188 dev_dbg(&pdev->dev, "pcmcia config [0] %02x\n", v ? 0x60 : 0); softingcs_enable_irq() 218 struct platform_device *pdev = pcmcia->priv; softingcs_remove() local 221 platform_device_unregister(pdev); softingcs_remove() 228 * pdev->resource has 2 entries: io & irq 232 struct platform_device *pdev = to_platform_device(dev); softingcs_pdev_release() local 233 kfree(pdev); softingcs_pdev_release() 239 struct platform_device *pdev; softingcs_probe() local 243 struct platform_device pdev; softingcs_probe() member in struct:dev 275 dev->pdev.resource = dev->res; softingcs_probe() 276 dev->pdev.num_resources = ARRAY_SIZE(dev->res); softingcs_probe() 277 dev->pdev.dev.release = softingcs_pdev_release; softingcs_probe() 279 pdev = &dev->pdev; softingcs_probe() 280 pdev->dev.platform_data = (void *)pdat; softingcs_probe() 281 pdev->dev.parent = &pcmcia->dev; softingcs_probe() 282 pcmcia->priv = pdev; softingcs_probe() 285 pdev->resource[0].flags = IORESOURCE_MEM; softingcs_probe() 286 pdev->resource[0].start = pres->start; softingcs_probe() 287 pdev->resource[0].end = pres->end; softingcs_probe() 289 pdev->resource[1].flags = IORESOURCE_IRQ; softingcs_probe() 290 pdev->resource[1].start = pcmcia->irq; softingcs_probe() 291 pdev->resource[1].end = pdev->resource[1].start; softingcs_probe() 295 pdev->id = softingcs_index++; softingcs_probe() 297 pdev->name = "softing"; softingcs_probe() 298 dev_set_name(&pdev->dev, "softingcs.%i", pdev->id); softingcs_probe() 299 ret = platform_device_register(pdev); softingcs_probe() 303 dev_info(&pcmcia->dev, "created %s\n", dev_name(&pdev->dev)); softingcs_probe()
|
/linux-4.1.27/drivers/net/wireless/ |
H A D | atmel_pci.c | 51 static int atmel_pci_probe(struct pci_dev *pdev, atmel_pci_probe() argument 56 if (pci_enable_device(pdev)) atmel_pci_probe() 59 pci_set_master(pdev); atmel_pci_probe() 61 dev = init_atmel_card(pdev->irq, pdev->resource[1].start, atmel_pci_probe() 63 &pdev->dev, NULL, NULL); atmel_pci_probe() 67 pci_set_drvdata(pdev, dev); atmel_pci_probe() 71 static void atmel_pci_remove(struct pci_dev *pdev) atmel_pci_remove() argument 73 stop_atmel_card(pci_get_drvdata(pdev)); atmel_pci_remove()
|
/linux-4.1.27/drivers/usb/renesas_usbhs/ |
H A D | rcar2.c | 21 static int usbhs_rcar2_hardware_init(struct platform_device *pdev) usbhs_rcar2_hardware_init() argument 23 struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev); usbhs_rcar2_hardware_init() 26 struct phy *phy = phy_get(&pdev->dev, "usb"); usbhs_rcar2_hardware_init() 36 struct usb_phy *usb_phy = usb_get_phy_dev(&pdev->dev, 0); usbhs_rcar2_hardware_init() 48 static int usbhs_rcar2_hardware_exit(struct platform_device *pdev) usbhs_rcar2_hardware_exit() argument 50 struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev); usbhs_rcar2_hardware_exit() 65 static int usbhs_rcar2_power_ctrl(struct platform_device *pdev, usbhs_rcar2_power_ctrl() argument 68 struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev); usbhs_rcar2_power_ctrl() 100 static int usbhs_rcar2_get_id(struct platform_device *pdev) usbhs_rcar2_get_id() argument
|
H A D | common.c | 95 struct usbhs_priv *usbhs_pdev_to_priv(struct platform_device *pdev) usbhs_pdev_to_priv() argument 97 return dev_get_drvdata(&pdev->dev); usbhs_pdev_to_priv() 224 struct platform_device *pdev = usbhs_priv_to_pdev(priv); usbhs_vbus_ctrl() local 226 return usbhs_platform_call(priv, set_vbus, pdev, enable); usbhs_vbus_ctrl() 343 struct platform_device *pdev = usbhs_priv_to_pdev(priv); usbhsc_power_ctrl() local 351 usbhs_platform_call(priv, power_ctrl, pdev, priv->base, enable); usbhsc_power_ctrl() 360 usbhs_platform_call(priv, power_ctrl, pdev, priv->base, enable); usbhsc_power_ctrl() 372 struct platform_device *pdev = usbhs_priv_to_pdev(priv); usbhsc_hotplug() local 382 enable = usbhs_platform_call(priv, get_vbus, pdev); usbhsc_hotplug() 387 id = usbhs_platform_call(priv, get_id, pdev); usbhsc_hotplug() 394 dev_info(&pdev->dev, usbhsc_hotplug() 404 dev_dbg(&pdev->dev, "%s enable\n", __func__); usbhsc_hotplug() 418 dev_dbg(&pdev->dev, "%s disable\n", __func__); usbhsc_hotplug() 433 usbhs_platform_call(priv, phy_reset, pdev); usbhsc_hotplug() 448 static int usbhsc_drvcllbck_notify_hotplug(struct platform_device *pdev) usbhsc_drvcllbck_notify_hotplug() argument 450 struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev); usbhsc_drvcllbck_notify_hotplug() 512 static int usbhs_probe(struct platform_device *pdev) usbhs_probe() argument 514 struct renesas_usbhs_platform_info *info = dev_get_platdata(&pdev->dev); usbhs_probe() 521 if (pdev->dev.of_node) usbhs_probe() 522 info = pdev->dev.platform_data = usbhs_parse_dt(&pdev->dev); usbhs_probe() 526 dev_err(&pdev->dev, "no platform information\n"); usbhs_probe() 531 irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); usbhs_probe() 533 dev_err(&pdev->dev, "Not enough Renesas USB platform resources.\n"); usbhs_probe() 538 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); usbhs_probe() 542 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); usbhs_probe() 543 priv->base = devm_ioremap_resource(&pdev->dev, res); usbhs_probe() 547 if (of_property_read_bool(pdev->dev.of_node, "extcon")) { usbhs_probe() 548 priv->edev = extcon_get_edev_by_phandle(&pdev->dev, 0); usbhs_probe() 573 dev_err(&pdev->dev, "no platform callbacks"); usbhs_probe() 605 priv->pdev = pdev; usbhs_probe() 623 platform_set_drvdata(pdev, priv); usbhs_probe() 637 dev_warn(&pdev->dev, usbhs_probe() 652 ret = usbhs_platform_call(priv, hardware_init, pdev); usbhs_probe() 654 dev_err(&pdev->dev, "platform init failed.\n"); usbhs_probe() 659 usbhs_platform_call(priv, phy_reset, pdev); usbhs_probe() 662 pm_runtime_enable(&pdev->dev); usbhs_probe() 671 usbhsc_drvcllbck_notify_hotplug(pdev); usbhs_probe() 673 dev_info(&pdev->dev, "probed\n"); usbhs_probe() 684 dev_info(&pdev->dev, "probe failed\n"); usbhs_probe() 689 static int usbhs_remove(struct platform_device *pdev) usbhs_remove() argument 691 struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev); usbhs_remove() 692 struct renesas_usbhs_platform_info *info = dev_get_platdata(&pdev->dev); usbhs_remove() 695 dev_dbg(&pdev->dev, "usb remove\n"); usbhs_remove() 703 pm_runtime_disable(&pdev->dev); usbhs_remove() 705 usbhs_platform_call(priv, hardware_exit, pdev); usbhs_remove() 732 struct platform_device *pdev = usbhs_priv_to_pdev(priv); usbhsc_resume() local 737 usbhs_platform_call(priv, phy_reset, pdev); usbhsc_resume() 739 usbhsc_drvcllbck_notify_hotplug(pdev); usbhsc_resume()
|
/linux-4.1.27/drivers/video/backlight/ |
H A D | gpio_backlight.c | 61 static int gpio_backlight_probe_dt(struct platform_device *pdev, gpio_backlight_probe_dt() argument 64 struct device_node *np = pdev->dev.of_node; gpio_backlight_probe_dt() 71 dev_err(&pdev->dev, gpio_backlight_probe_dt() 84 static int gpio_backlight_probe(struct platform_device *pdev) gpio_backlight_probe() argument 87 dev_get_platdata(&pdev->dev); gpio_backlight_probe() 91 struct device_node *np = pdev->dev.of_node; gpio_backlight_probe() 95 dev_err(&pdev->dev, gpio_backlight_probe() 100 gbl = devm_kzalloc(&pdev->dev, sizeof(*gbl), GFP_KERNEL); gpio_backlight_probe() 104 gbl->dev = &pdev->dev; gpio_backlight_probe() 107 ret = gpio_backlight_probe_dt(pdev, gbl); gpio_backlight_probe() 122 dev_err(&pdev->dev, "unable to request GPIO\n"); gpio_backlight_probe() 129 bl = devm_backlight_device_register(&pdev->dev, dev_name(&pdev->dev), gpio_backlight_probe() 130 &pdev->dev, gbl, &gpio_backlight_ops, gpio_backlight_probe() 133 dev_err(&pdev->dev, "failed to register backlight\n"); gpio_backlight_probe() 140 platform_set_drvdata(pdev, bl); gpio_backlight_probe()
|
H A D | aat2870_bl.c | 33 struct platform_device *pdev; member in struct:aat2870_bl_driver_data 56 = dev_get_drvdata(aat2870_bl->pdev->dev.parent); aat2870_bl_enable() 65 = dev_get_drvdata(aat2870_bl->pdev->dev.parent); aat2870_bl_disable() 74 dev_get_drvdata(aat2870_bl->pdev->dev.parent); aat2870_bl_update_status() 122 static int aat2870_bl_probe(struct platform_device *pdev) aat2870_bl_probe() argument 124 struct aat2870_bl_platform_data *pdata = dev_get_platdata(&pdev->dev); aat2870_bl_probe() 131 dev_err(&pdev->dev, "No platform data\n"); aat2870_bl_probe() 136 if (pdev->id != AAT2870_ID_BL) { aat2870_bl_probe() 137 dev_err(&pdev->dev, "Invalid device ID, %d\n", pdev->id); aat2870_bl_probe() 142 aat2870_bl = devm_kzalloc(&pdev->dev, aat2870_bl_probe() 153 bd = devm_backlight_device_register(&pdev->dev, "aat2870-backlight", aat2870_bl_probe() 154 &pdev->dev, aat2870_bl, &aat2870_bl_ops, aat2870_bl_probe() 157 dev_err(&pdev->dev, aat2870_bl_probe() 163 aat2870_bl->pdev = pdev; aat2870_bl_probe() 164 platform_set_drvdata(pdev, aat2870_bl); aat2870_bl_probe() 189 dev_err(&pdev->dev, "Failed to initialize\n"); aat2870_bl_probe() 199 static int aat2870_bl_remove(struct platform_device *pdev) aat2870_bl_remove() argument 201 struct aat2870_bl_driver_data *aat2870_bl = platform_get_drvdata(pdev); aat2870_bl_remove()
|
H A D | max8925_bl.c | 104 static void max8925_backlight_dt_init(struct platform_device *pdev) max8925_backlight_dt_init() argument 106 struct device_node *nproot = pdev->dev.parent->of_node, *np; max8925_backlight_dt_init() 113 pdata = devm_kzalloc(&pdev->dev, max8925_backlight_dt_init() 121 dev_err(&pdev->dev, "failed to find backlight node\n"); max8925_backlight_dt_init() 128 pdev->dev.platform_data = pdata; max8925_backlight_dt_init() 131 static int max8925_backlight_probe(struct platform_device *pdev) max8925_backlight_probe() argument 133 struct max8925_chip *chip = dev_get_drvdata(pdev->dev.parent); max8925_backlight_probe() 142 data = devm_kzalloc(&pdev->dev, sizeof(struct max8925_backlight_data), max8925_backlight_probe() 147 res = platform_get_resource(pdev, IORESOURCE_REG, 0); max8925_backlight_probe() 149 dev_err(&pdev->dev, "No REG resource for mode control!\n"); max8925_backlight_probe() 153 res = platform_get_resource(pdev, IORESOURCE_REG, 1); max8925_backlight_probe() 155 dev_err(&pdev->dev, "No REG resource for control!\n"); max8925_backlight_probe() 166 bl = devm_backlight_device_register(&pdev->dev, "max8925-backlight", max8925_backlight_probe() 167 &pdev->dev, data, max8925_backlight_probe() 170 dev_err(&pdev->dev, "failed to register backlight\n"); max8925_backlight_probe() 175 platform_set_drvdata(pdev, bl); max8925_backlight_probe() 178 if (!pdev->dev.platform_data) max8925_backlight_probe() 179 max8925_backlight_dt_init(pdev); max8925_backlight_probe() 181 pdata = pdev->dev.platform_data; max8925_backlight_probe()
|
/linux-4.1.27/arch/powerpc/platforms/powernv/ |
H A D | powernv.h | 15 extern int pnv_pci_dma_set_mask(struct pci_dev *pdev, u64 dma_mask); pnv_smp_init() 16 extern u64 pnv_pci_dma_get_required_mask(struct pci_dev *pdev); pnv_smp_init() 21 static inline int pnv_pci_dma_set_mask(struct pci_dev *pdev, u64 dma_mask) pnv_pci_dma_set_mask() argument 26 static inline u64 pnv_pci_dma_get_required_mask(struct pci_dev *pdev) pnv_pci_dma_get_required_mask() argument
|
/linux-4.1.27/drivers/ptp/ |
H A D | ptp_pch.c | 130 struct pci_dev *pdev; member in struct:pch_dev 194 u32 pch_ch_control_read(struct pci_dev *pdev) pch_ch_control_read() argument 196 struct pch_dev *chip = pci_get_drvdata(pdev); pch_ch_control_read() 205 void pch_ch_control_write(struct pci_dev *pdev, u32 val) pch_ch_control_write() argument 207 struct pch_dev *chip = pci_get_drvdata(pdev); pch_ch_control_write() 213 u32 pch_ch_event_read(struct pci_dev *pdev) pch_ch_event_read() argument 215 struct pch_dev *chip = pci_get_drvdata(pdev); pch_ch_event_read() 224 void pch_ch_event_write(struct pci_dev *pdev, u32 val) pch_ch_event_write() argument 226 struct pch_dev *chip = pci_get_drvdata(pdev); pch_ch_event_write() 232 u32 pch_src_uuid_lo_read(struct pci_dev *pdev) pch_src_uuid_lo_read() argument 234 struct pch_dev *chip = pci_get_drvdata(pdev); pch_src_uuid_lo_read() 243 u32 pch_src_uuid_hi_read(struct pci_dev *pdev) pch_src_uuid_hi_read() argument 245 struct pch_dev *chip = pci_get_drvdata(pdev); pch_src_uuid_hi_read() 254 u64 pch_rx_snap_read(struct pci_dev *pdev) pch_rx_snap_read() argument 256 struct pch_dev *chip = pci_get_drvdata(pdev); pch_rx_snap_read() 271 u64 pch_tx_snap_read(struct pci_dev *pdev) pch_tx_snap_read() argument 273 struct pch_dev *chip = pci_get_drvdata(pdev); pch_tx_snap_read() 312 int pch_set_station_address(u8 *addr, struct pci_dev *pdev) pch_set_station_address() argument 315 struct pch_dev *chip = pci_get_drvdata(pdev); pch_set_station_address() 319 dev_err(&pdev->dev, pch_set_station_address() 330 dev_err(&pdev->dev, pch_set_station_address() 337 dev_err(&pdev->dev, pch_set_station_address() 344 dev_err(&pdev->dev, pch_set_station_address() 351 dev_dbg(&pdev->dev, "invoking pch_station_set\n"); pch_set_station_address() 528 static s32 pch_suspend(struct pci_dev *pdev, pm_message_t state) pch_suspend() argument 530 pci_disable_device(pdev); pch_suspend() 531 pci_enable_wake(pdev, PCI_D3hot, 0); pch_suspend() 533 if (pci_save_state(pdev) != 0) { pch_suspend() 534 dev_err(&pdev->dev, "could not save PCI config state\n"); pch_suspend() 537 pci_set_power_state(pdev, pci_choose_state(pdev, state)); pch_suspend() 542 static s32 pch_resume(struct pci_dev *pdev) pch_resume() argument 546 pci_set_power_state(pdev, PCI_D0); pch_resume() 547 pci_restore_state(pdev); pch_resume() 548 ret = pci_enable_device(pdev); pch_resume() 550 dev_err(&pdev->dev, "pci_enable_device failed\n"); pch_resume() 553 pci_enable_wake(pdev, PCI_D3hot, 0); pch_resume() 561 static void pch_remove(struct pci_dev *pdev) pch_remove() argument 563 struct pch_dev *chip = pci_get_drvdata(pdev); pch_remove() 567 if (pdev->irq != 0) pch_remove() 568 free_irq(pdev->irq, chip); pch_remove() 580 pci_disable_device(pdev); pch_remove() 582 dev_info(&pdev->dev, "complete\n"); pch_remove() 586 pch_probe(struct pci_dev *pdev, const struct pci_device_id *id) pch_probe() argument 597 ret = pci_enable_device(pdev); pch_probe() 599 dev_err(&pdev->dev, "could not enable the pci device\n"); pch_probe() 603 chip->mem_base = pci_resource_start(pdev, IO_MEM_BAR); pch_probe() 605 dev_err(&pdev->dev, "could not locate IO memory address\n"); pch_probe() 611 chip->mem_size = pci_resource_len(pdev, IO_MEM_BAR); pch_probe() 615 dev_err(&pdev->dev, pch_probe() 625 dev_err(&pdev->dev, "Could not get virtual address\n"); pch_probe() 631 chip->ptp_clock = ptp_clock_register(&chip->caps, &pdev->dev); pch_probe() 639 ret = request_irq(pdev->irq, &isr, IRQF_SHARED, KBUILD_MODNAME, chip); pch_probe() 641 dev_err(&pdev->dev, "failed to get irq %d\n", pdev->irq); pch_probe() 646 chip->irq = pdev->irq; pch_probe() 647 chip->pdev = pdev; pch_probe() 648 pci_set_drvdata(pdev, chip); pch_probe() 662 if (pch_set_station_address(pch_param.station, pdev) != 0) { pch_probe() 663 dev_err(&pdev->dev, pch_probe() 685 pci_disable_device(pdev); pch_probe() 689 dev_err(&pdev->dev, "probe failed(ret=0x%x)\n", ret); pch_probe()
|
/linux-4.1.27/drivers/media/dvb-frontends/ |
H A D | rtl2832_sdr.c | 115 struct platform_device *pdev; member in struct:rtl2832_sdr_dev 163 struct platform_device *pdev = dev->pdev; rtl2832_sdr_wr_regs() local 164 struct rtl2832_sdr_platform_data *pdata = pdev->dev.platform_data; rtl2832_sdr_wr_regs() 175 struct platform_device *pdev = dev->pdev; 176 struct rtl2832_sdr_platform_data *pdata = pdev->dev.platform_data; 193 struct platform_device *pdev = dev->pdev; rtl2832_sdr_wr_reg_mask() local 194 struct rtl2832_sdr_platform_data *pdata = pdev->dev.platform_data; rtl2832_sdr_wr_reg_mask() 222 struct platform_device *pdev = dev->pdev; rtl2832_sdr_convert_stream() local 250 dev_dbg(&pdev->dev, rtl2832_sdr_convert_stream() 268 struct platform_device *pdev = dev->pdev; rtl2832_sdr_urb_complete() local 271 dev_dbg_ratelimited(&pdev->dev, "status=%d length=%d/%d errors=%d\n", rtl2832_sdr_urb_complete() 284 dev_err_ratelimited(&pdev->dev, "urb failed=%d\n", urb->status); rtl2832_sdr_urb_complete() 295 dev_notice_ratelimited(&pdev->dev, rtl2832_sdr_urb_complete() 316 struct platform_device *pdev = dev->pdev; rtl2832_sdr_kill_urbs() local 320 dev_dbg(&pdev->dev, "kill urb=%d\n", i); rtl2832_sdr_kill_urbs() 331 struct platform_device *pdev = dev->pdev; rtl2832_sdr_submit_urbs() local 335 dev_dbg(&pdev->dev, "submit urb=%d\n", i); rtl2832_sdr_submit_urbs() 338 dev_err(&pdev->dev, rtl2832_sdr_submit_urbs() 352 struct platform_device *pdev = dev->pdev; rtl2832_sdr_free_stream_bufs() local 357 dev_dbg(&pdev->dev, "free buf=%d\n", dev->buf_num); rtl2832_sdr_free_stream_bufs() 370 struct platform_device *pdev = dev->pdev; rtl2832_sdr_alloc_stream_bufs() local 375 dev_dbg(&pdev->dev, "all in all I will use %u bytes for streaming\n", rtl2832_sdr_alloc_stream_bufs() 383 dev_dbg(&pdev->dev, "alloc buf=%d failed\n", rtl2832_sdr_alloc_stream_bufs() 389 dev_dbg(&pdev->dev, "alloc buf=%d %p (dma %llu)\n", rtl2832_sdr_alloc_stream_bufs() 400 struct platform_device *pdev = dev->pdev; rtl2832_sdr_free_urbs() local 407 dev_dbg(&pdev->dev, "free urb=%d\n", i); rtl2832_sdr_free_urbs() 419 struct platform_device *pdev = dev->pdev; rtl2832_sdr_alloc_urbs() local 424 dev_dbg(&pdev->dev, "alloc urb=%d\n", i); rtl2832_sdr_alloc_urbs() 427 dev_dbg(&pdev->dev, "failed\n"); rtl2832_sdr_alloc_urbs() 450 struct platform_device *pdev = dev->pdev; rtl2832_sdr_cleanup_queued_bufs() local 453 dev_dbg(&pdev->dev, "\n"); rtl2832_sdr_cleanup_queued_bufs() 471 struct platform_device *pdev = dev->pdev; rtl2832_sdr_querycap() local 473 dev_dbg(&pdev->dev, "\n"); rtl2832_sdr_querycap() 490 struct platform_device *pdev = dev->pdev; rtl2832_sdr_queue_setup() local 492 dev_dbg(&pdev->dev, "nbuffers=%d\n", *nbuffers); rtl2832_sdr_queue_setup() 499 dev_dbg(&pdev->dev, "nbuffers=%d sizes[0]=%d\n", *nbuffers, sizes[0]); rtl2832_sdr_queue_setup() 534 struct platform_device *pdev = dev->pdev; rtl2832_sdr_set_adc() local 535 struct rtl2832_sdr_platform_data *pdata = pdev->dev.platform_data; rtl2832_sdr_set_adc() 543 dev_dbg(&pdev->dev, "f_adc=%u\n", dev->f_adc); rtl2832_sdr_set_adc() 577 dev_dbg(&pdev->dev, "f_if=%u if_ctl=%08x\n", f_if, u32tmp); rtl2832_sdr_set_adc() 746 dev_notice(&pdev->dev, "Unsupported tuner\n"); rtl2832_sdr_set_adc() 763 struct platform_device *pdev = dev->pdev; rtl2832_sdr_unset_adc() local 766 dev_dbg(&pdev->dev, "\n"); rtl2832_sdr_unset_adc() 800 struct platform_device *pdev = dev->pdev; rtl2832_sdr_set_tuner_freq() local 801 struct rtl2832_sdr_platform_data *pdata = pdev->dev.platform_data; rtl2832_sdr_set_tuner_freq() 829 dev_dbg(&pdev->dev, "frequency=%u bandwidth=%d\n", rtl2832_sdr_set_tuner_freq() 843 struct platform_device *pdev = dev->pdev; rtl2832_sdr_set_tuner() local 844 struct rtl2832_sdr_platform_data *pdata = pdev->dev.platform_data; rtl2832_sdr_set_tuner() 847 dev_dbg(&pdev->dev, "\n"); rtl2832_sdr_set_tuner() 857 struct platform_device *pdev = dev->pdev; rtl2832_sdr_unset_tuner() local 858 struct rtl2832_sdr_platform_data *pdata = pdev->dev.platform_data; rtl2832_sdr_unset_tuner() 861 dev_dbg(&pdev->dev, "\n"); rtl2832_sdr_unset_tuner() 872 struct platform_device *pdev = dev->pdev; rtl2832_sdr_start_streaming() local 873 struct rtl2832_sdr_platform_data *pdata = pdev->dev.platform_data; rtl2832_sdr_start_streaming() 877 dev_dbg(&pdev->dev, "\n"); rtl2832_sdr_start_streaming() 929 struct platform_device *pdev = dev->pdev; rtl2832_sdr_stop_streaming() local 930 struct rtl2832_sdr_platform_data *pdata = pdev->dev.platform_data; rtl2832_sdr_stop_streaming() 933 dev_dbg(&pdev->dev, "\n"); rtl2832_sdr_stop_streaming() 970 struct platform_device *pdev = dev->pdev; rtl2832_sdr_g_tuner() local 972 dev_dbg(&pdev->dev, "index=%d type=%d\n", v->index, v->type); rtl2832_sdr_g_tuner() 997 struct platform_device *pdev = dev->pdev; rtl2832_sdr_s_tuner() local 999 dev_dbg(&pdev->dev, "\n"); rtl2832_sdr_s_tuner() 1010 struct platform_device *pdev = dev->pdev; rtl2832_sdr_enum_freq_bands() local 1012 dev_dbg(&pdev->dev, "tuner=%d type=%d index=%d\n", rtl2832_sdr_enum_freq_bands() 1036 struct platform_device *pdev = dev->pdev; rtl2832_sdr_g_frequency() local 1039 dev_dbg(&pdev->dev, "tuner=%d type=%d\n", f->tuner, f->type); rtl2832_sdr_g_frequency() 1058 struct platform_device *pdev = dev->pdev; rtl2832_sdr_s_frequency() local 1061 dev_dbg(&pdev->dev, "tuner=%d type=%d frequency=%u\n", rtl2832_sdr_s_frequency() 1080 dev_dbg(&pdev->dev, "ADC frequency=%u Hz\n", dev->f_adc); rtl2832_sdr_s_frequency() 1086 dev_dbg(&pdev->dev, "RF frequency=%u Hz\n", f->frequency); rtl2832_sdr_s_frequency() 1100 struct platform_device *pdev = dev->pdev; rtl2832_sdr_enum_fmt_sdr_cap() local 1102 dev_dbg(&pdev->dev, "\n"); rtl2832_sdr_enum_fmt_sdr_cap() 1117 struct platform_device *pdev = dev->pdev; rtl2832_sdr_g_fmt_sdr_cap() local 1119 dev_dbg(&pdev->dev, "\n"); rtl2832_sdr_g_fmt_sdr_cap() 1133 struct platform_device *pdev = dev->pdev; rtl2832_sdr_s_fmt_sdr_cap() local 1137 dev_dbg(&pdev->dev, "pixelformat fourcc %4.4s\n", rtl2832_sdr_s_fmt_sdr_cap() 1165 struct platform_device *pdev = dev->pdev; rtl2832_sdr_try_fmt_sdr_cap() local 1168 dev_dbg(&pdev->dev, "pixelformat fourcc %4.4s\n", rtl2832_sdr_try_fmt_sdr_cap() 1237 struct platform_device *pdev = dev->pdev; rtl2832_sdr_s_ctrl() local 1238 struct rtl2832_sdr_platform_data *pdata = pdev->dev.platform_data; rtl2832_sdr_s_ctrl() 1243 dev_dbg(&pdev->dev, "id=%d name=%s val=%d min=%lld max=%lld step=%lld\n", rtl2832_sdr_s_ctrl() 1288 struct platform_device *pdev = dev->pdev; rtl2832_sdr_video_release() local 1290 dev_dbg(&pdev->dev, "\n"); rtl2832_sdr_video_release() 1298 static int rtl2832_sdr_probe(struct platform_device *pdev) rtl2832_sdr_probe() argument 1301 struct rtl2832_sdr_platform_data *pdata = pdev->dev.platform_data; rtl2832_sdr_probe() 1306 dev_dbg(&pdev->dev, "\n"); rtl2832_sdr_probe() 1309 dev_err(&pdev->dev, "Cannot proceed without platform data\n"); rtl2832_sdr_probe() 1313 if (!pdev->dev.parent->driver) { rtl2832_sdr_probe() 1314 dev_dbg(&pdev->dev, "No parent device\n"); rtl2832_sdr_probe() 1319 if (!try_module_get(pdev->dev.parent->driver->owner)) { rtl2832_sdr_probe() 1320 dev_err(&pdev->dev, "Refcount fail"); rtl2832_sdr_probe() 1332 dev->pdev = pdev; rtl2832_sdr_probe() 1357 dev_err(&pdev->dev, "Could not initialize vb2 queue\n"); rtl2832_sdr_probe() 1393 dev_err(&pdev->dev, "Unsupported tuner\n"); rtl2832_sdr_probe() 1398 dev_err(&pdev->dev, "Could not initialize controls\n"); rtl2832_sdr_probe() 1410 ret = v4l2_device_register(&pdev->dev, &dev->v4l2_dev); rtl2832_sdr_probe() 1412 dev_err(&pdev->dev, "Failed to register v4l2-device %d\n", ret); rtl2832_sdr_probe() 1423 dev_err(&pdev->dev, "Failed to register as video device %d\n", rtl2832_sdr_probe() 1427 dev_info(&pdev->dev, "Registered as %s\n", rtl2832_sdr_probe() 1429 dev_info(&pdev->dev, "Realtek RTL2832 SDR attached\n"); rtl2832_sdr_probe() 1430 dev_notice(&pdev->dev, rtl2832_sdr_probe() 1432 platform_set_drvdata(pdev, dev); rtl2832_sdr_probe() 1441 module_put(pdev->dev.parent->driver->owner); rtl2832_sdr_probe() 1446 static int rtl2832_sdr_remove(struct platform_device *pdev) rtl2832_sdr_remove() argument 1448 struct rtl2832_sdr_dev *dev = platform_get_drvdata(pdev); rtl2832_sdr_remove() 1450 dev_dbg(&pdev->dev, "\n"); rtl2832_sdr_remove() 1461 module_put(pdev->dev.parent->driver->owner); rtl2832_sdr_remove()
|
/linux-4.1.27/drivers/char/xillybus/ |
H A D | xillybus_pcie.c | 58 pci_dma_sync_single_for_cpu(ep->pdev, xilly_dma_sync_single_for_cpu_pci() 69 pci_dma_sync_single_for_device(ep->pdev, xilly_dma_sync_single_for_device_pci() 109 addr = pci_map_single(ep->pdev, ptr, size, pci_direction); xilly_map_single_pci() 111 if (pci_dma_mapping_error(ep->pdev, addr)) { xilly_map_single_pci() 116 this->device = ep->pdev; xilly_map_single_pci() 125 pci_unmap_single(ep->pdev, addr, size, pci_direction); xilly_map_single_pci() 140 static int xilly_probe(struct pci_dev *pdev, xilly_probe() argument 146 endpoint = xillybus_init_endpoint(pdev, &pdev->dev, &pci_hw); xilly_probe() 151 pci_set_drvdata(pdev, endpoint); xilly_probe() 153 rc = pcim_enable_device(pdev); xilly_probe() 162 pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S); xilly_probe() 164 if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) { xilly_probe() 170 rc = pcim_iomap_regions(pdev, 0x01, xillyname); xilly_probe() 177 endpoint->registers = pcim_iomap_table(pdev)[0]; xilly_probe() 179 pci_set_master(pdev); xilly_probe() 182 if (pci_enable_msi(pdev)) { xilly_probe() 187 rc = devm_request_irq(&pdev->dev, pdev->irq, xillybus_isr, 0, xilly_probe() 202 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) { xilly_probe() 212 static void xilly_remove(struct pci_dev *pdev) xilly_remove() argument 214 struct xilly_endpoint *endpoint = pci_get_drvdata(pdev); xilly_remove()
|
/linux-4.1.27/drivers/video/fbdev/ |
H A D | sunxvr2500.c | 17 struct pci_dev *pdev; member in struct:s3d_info 40 pci_name(sp->pdev)); s3d_get_props() 118 static int s3d_pci_register(struct pci_dev *pdev, s3d_pci_register() argument 125 err = pci_enable_device(pdev); s3d_pci_register() 128 pci_name(pdev)); s3d_pci_register() 132 info = framebuffer_alloc(sizeof(struct s3d_info), &pdev->dev); s3d_pci_register() 141 sp->pdev = pdev; s3d_pci_register() 142 sp->of_node = pci_device_to_OF_node(pdev); s3d_pci_register() 145 pci_name(pdev)); s3d_pci_register() 150 sp->fb_base_phys = pci_resource_start (pdev, 1); s3d_pci_register() 152 err = pci_request_region(pdev, 1, "s3d framebuffer"); s3d_pci_register() 155 pci_name(pdev)); s3d_pci_register() 193 pci_set_drvdata(pdev, info); s3d_pci_register() 195 printk("s3d: Found device at %s\n", pci_name(pdev)); s3d_pci_register() 200 pci_name(pdev)); s3d_pci_register() 210 pci_release_region(pdev, 1); s3d_pci_register() 216 pci_disable_device(pdev); s3d_pci_register() 222 static void s3d_pci_unregister(struct pci_dev *pdev) s3d_pci_unregister() argument 224 struct fb_info *info = pci_get_drvdata(pdev); s3d_pci_unregister() 231 pci_release_region(pdev, 1); s3d_pci_unregister() 235 pci_disable_device(pdev); s3d_pci_unregister()
|
/linux-4.1.27/drivers/net/ethernet/stmicro/stmmac/ |
H A D | stmmac_pci.c | 44 struct pci_dev *pdev; member in struct:stmmac_pci_info 53 unsigned int func = PCI_FUNC(info->pdev->devfn); stmmac_pci_find_phy_addr() 96 struct pci_dev *pdev = info->pdev; quark_default_data() local 107 plat->bus_id = PCI_DEVID(pdev->bus->number, pdev->devfn); quark_default_data() 152 * @pdev: pci device pointer 161 static int stmmac_pci_probe(struct pci_dev *pdev, stmmac_pci_probe() argument 170 plat = devm_kzalloc(&pdev->dev, sizeof(*plat), GFP_KERNEL); stmmac_pci_probe() 174 plat->mdio_bus_data = devm_kzalloc(&pdev->dev, stmmac_pci_probe() 180 plat->dma_cfg = devm_kzalloc(&pdev->dev, sizeof(*plat->dma_cfg), stmmac_pci_probe() 186 ret = pcim_enable_device(pdev); stmmac_pci_probe() 188 dev_err(&pdev->dev, "%s: ERROR: failed to enable device\n", stmmac_pci_probe() 195 if (pci_resource_len(pdev, i) == 0) stmmac_pci_probe() 197 ret = pcim_iomap_regions(pdev, BIT(i), pci_name(pdev)); stmmac_pci_probe() 203 pci_set_master(pdev); stmmac_pci_probe() 206 info->pdev = pdev; stmmac_pci_probe() 215 pci_enable_msi(pdev); stmmac_pci_probe() 217 priv = stmmac_dvr_probe(&pdev->dev, plat, pcim_iomap_table(pdev)[i]); stmmac_pci_probe() 219 dev_err(&pdev->dev, "%s: main driver probe failed\n", __func__); stmmac_pci_probe() 222 priv->dev->irq = pdev->irq; stmmac_pci_probe() 223 priv->wol_irq = pdev->irq; stmmac_pci_probe() 225 pci_set_drvdata(pdev, priv->dev); stmmac_pci_probe() 227 dev_dbg(&pdev->dev, "STMMAC PCI driver registration completed\n"); stmmac_pci_probe() 235 * @pdev: platform device pointer 239 static void stmmac_pci_remove(struct pci_dev *pdev) stmmac_pci_remove() argument 241 struct net_device *ndev = pci_get_drvdata(pdev); stmmac_pci_remove() 249 struct pci_dev *pdev = to_pci_dev(dev); stmmac_pci_suspend() local 250 struct net_device *ndev = pci_get_drvdata(pdev); stmmac_pci_suspend() 257 struct pci_dev *pdev = to_pci_dev(dev); stmmac_pci_resume() local 258 struct net_device *ndev = pci_get_drvdata(pdev); stmmac_pci_resume()
|
/linux-4.1.27/drivers/ide/ |
H A D | ide_platform.c | 49 static int plat_ide_probe(struct platform_device *pdev) plat_ide_probe() argument 59 pdata = dev_get_platdata(&pdev->dev); plat_ide_probe() 62 res_base = platform_get_resource(pdev, IORESOURCE_IO, 0); plat_ide_probe() 63 res_alt = platform_get_resource(pdev, IORESOURCE_IO, 1); plat_ide_probe() 66 res_base = platform_get_resource(pdev, IORESOURCE_MEM, 0); plat_ide_probe() 67 res_alt = platform_get_resource(pdev, IORESOURCE_MEM, 1); plat_ide_probe() 75 res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); plat_ide_probe() 82 base = devm_ioremap(&pdev->dev, plat_ide_probe() 84 alt_base = devm_ioremap(&pdev->dev, plat_ide_probe() 87 base = devm_ioport_map(&pdev->dev, plat_ide_probe() 89 alt_base = devm_ioport_map(&pdev->dev, plat_ide_probe() 95 hw.dev = &pdev->dev; plat_ide_probe() 108 platform_set_drvdata(pdev, host); plat_ide_probe() 116 static int plat_ide_remove(struct platform_device *pdev) plat_ide_remove() argument 118 struct ide_host *host = dev_get_drvdata(&pdev->dev); plat_ide_remove()
|
/linux-4.1.27/drivers/net/phy/ |
H A D | mdio-mux-mmioreg.c | 69 static int mdio_mux_mmioreg_probe(struct platform_device *pdev) mdio_mux_mmioreg_probe() argument 71 struct device_node *np2, *np = pdev->dev.of_node; mdio_mux_mmioreg_probe() 77 dev_dbg(&pdev->dev, "probing node %s\n", np->full_name); mdio_mux_mmioreg_probe() 79 s = devm_kzalloc(&pdev->dev, sizeof(*s), GFP_KERNEL); mdio_mux_mmioreg_probe() 85 dev_err(&pdev->dev, "could not obtain memory map for node %s\n", mdio_mux_mmioreg_probe() 92 dev_err(&pdev->dev, "only 8-bit registers are supported\n"); mdio_mux_mmioreg_probe() 98 dev_err(&pdev->dev, "missing or invalid mux-mask property\n"); mdio_mux_mmioreg_probe() 102 dev_err(&pdev->dev, "only 8-bit registers are supported\n"); mdio_mux_mmioreg_probe() 114 dev_err(&pdev->dev, "mdio-mux child node %s is " for_each_available_child_of_node() 119 dev_err(&pdev->dev, "mdio-mux child node %s has " for_each_available_child_of_node() 126 ret = mdio_mux_init(&pdev->dev, mdio_mux_mmioreg_switch_fn, 129 dev_err(&pdev->dev, "failed to register mdio-mux bus %s\n", 134 pdev->dev.platform_data = s; 139 static int mdio_mux_mmioreg_remove(struct platform_device *pdev) mdio_mux_mmioreg_remove() argument 141 struct mdio_mux_mmioreg_state *s = dev_get_platdata(&pdev->dev); mdio_mux_mmioreg_remove()
|
/linux-4.1.27/drivers/input/mouse/ |
H A D | gpio_mouse.c | 48 static int gpio_mouse_probe(struct platform_device *pdev) gpio_mouse_probe() argument 50 struct gpio_mouse_platform_data *pdata = dev_get_platdata(&pdev->dev); gpio_mouse_probe() 57 dev_err(&pdev->dev, "no platform data\n"); gpio_mouse_probe() 63 dev_err(&pdev->dev, "invalid scan time\n"); gpio_mouse_probe() 75 dev_err(&pdev->dev, gpio_mouse_probe() 82 dev_dbg(&pdev->dev, "no left button defined\n"); gpio_mouse_probe() 87 dev_err(&pdev->dev, "fail %d pin (%d idx)\n", gpio_mouse_probe() 98 dev_err(&pdev->dev, "not enough memory for input device\n"); gpio_mouse_probe() 103 platform_set_drvdata(pdev, input_poll); gpio_mouse_probe() 111 input->name = pdev->name; gpio_mouse_probe() 113 input->dev.parent = &pdev->dev; gpio_mouse_probe() 126 dev_err(&pdev->dev, "could not register input device\n"); gpio_mouse_probe() 130 dev_dbg(&pdev->dev, "%d ms scan time, buttons: %s%s%s\n", gpio_mouse_probe() 151 static int gpio_mouse_remove(struct platform_device *pdev) gpio_mouse_remove() argument 153 struct input_polled_dev *input = platform_get_drvdata(pdev); gpio_mouse_remove()
|
/linux-4.1.27/drivers/input/serio/ |
H A D | altera_ps2.c | 81 static int altera_ps2_probe(struct platform_device *pdev) altera_ps2_probe() argument 88 ps2if = devm_kzalloc(&pdev->dev, sizeof(struct ps2if), GFP_KERNEL); altera_ps2_probe() 92 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); altera_ps2_probe() 93 ps2if->base = devm_ioremap_resource(&pdev->dev, res); altera_ps2_probe() 97 irq = platform_get_irq(pdev, 0); altera_ps2_probe() 101 error = devm_request_irq(&pdev->dev, irq, altera_ps2_rxint, 0, altera_ps2_probe() 102 pdev->name, ps2if); altera_ps2_probe() 104 dev_err(&pdev->dev, "could not request IRQ %d\n", irq); altera_ps2_probe() 116 strlcpy(serio->name, dev_name(&pdev->dev), sizeof(serio->name)); altera_ps2_probe() 117 strlcpy(serio->phys, dev_name(&pdev->dev), sizeof(serio->phys)); altera_ps2_probe() 119 serio->dev.parent = &pdev->dev; altera_ps2_probe() 122 dev_info(&pdev->dev, "base %p, irq %d\n", ps2if->base, irq); altera_ps2_probe() 125 platform_set_drvdata(pdev, ps2if); altera_ps2_probe() 133 static int altera_ps2_remove(struct platform_device *pdev) altera_ps2_remove() argument 135 struct ps2if *ps2if = platform_get_drvdata(pdev); altera_ps2_remove()
|
H A D | arc_ps2.c | 154 static int arc_ps2_create_port(struct platform_device *pdev, arc_ps2_create_port() argument 178 dev_dbg(&pdev->dev, "port%d is allocated (data = 0x%p, status = 0x%p)\n", arc_ps2_create_port() 185 static int arc_ps2_probe(struct platform_device *pdev) arc_ps2_probe() argument 192 irq = platform_get_irq_byname(pdev, "arc_ps2_irq"); arc_ps2_probe() 194 dev_err(&pdev->dev, "no IRQ defined\n"); arc_ps2_probe() 198 arc_ps2 = devm_kzalloc(&pdev->dev, sizeof(struct arc_ps2_data), arc_ps2_probe() 201 dev_err(&pdev->dev, "out of memory\n"); arc_ps2_probe() 205 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); arc_ps2_probe() 206 arc_ps2->addr = devm_ioremap_resource(&pdev->dev, res); arc_ps2_probe() 210 dev_info(&pdev->dev, "irq = %d, address = 0x%p, ports = %i\n", arc_ps2_probe() 215 dev_err(&pdev->dev, "device id does not match\n"); arc_ps2_probe() 221 error = devm_request_irq(&pdev->dev, irq, arc_ps2_interrupt, arc_ps2_probe() 224 dev_err(&pdev->dev, "Could not allocate IRQ\n"); arc_ps2_probe() 229 error = arc_ps2_create_port(pdev, arc_ps2, i); arc_ps2_probe() 237 platform_set_drvdata(pdev, arc_ps2); arc_ps2_probe() 242 static int arc_ps2_remove(struct platform_device *pdev) arc_ps2_remove() argument 244 struct arc_ps2_data *arc_ps2 = platform_get_drvdata(pdev); arc_ps2_remove() 250 dev_dbg(&pdev->dev, "interrupt count = %i\n", arc_ps2->total_int); arc_ps2_remove() 251 dev_dbg(&pdev->dev, "frame error count = %i\n", arc_ps2->frame_error); arc_ps2_remove() 252 dev_dbg(&pdev->dev, "buffer overflow count = %i\n", arc_ps2_remove()
|
H A D | at32psif.c | 96 struct platform_device *pdev; member in struct:psif 121 dev_err(&psif->pdev->dev, "overrun read error\n"); psif_interrupt() 146 dev_dbg(&psif->pdev->dev, "timeout writing to THR\n"); psif_write() 194 dev_dbg(&psif->pdev->dev, "pclk too fast, " psif_set_prescaler() 203 static int __init psif_probe(struct platform_device *pdev) psif_probe() argument 214 dev_dbg(&pdev->dev, "out of memory\n"); psif_probe() 218 psif->pdev = pdev; psif_probe() 222 dev_dbg(&pdev->dev, "out of memory\n"); psif_probe() 228 regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); psif_probe() 230 dev_dbg(&pdev->dev, "no mmio resources defined\n"); psif_probe() 238 dev_dbg(&pdev->dev, "could not map I/O memory\n"); psif_probe() 242 pclk = clk_get(&pdev->dev, "pclk"); psif_probe() 244 dev_dbg(&pdev->dev, "could not get peripheral clock\n"); psif_probe() 253 dev_dbg(&pdev->dev, "could not enable pclk\n"); psif_probe() 259 irq = platform_get_irq(pdev, 0); psif_probe() 261 dev_dbg(&pdev->dev, "could not get irq\n"); psif_probe() 267 dev_dbg(&pdev->dev, "could not request irq %d\n", irq); psif_probe() 276 snprintf(io->name, sizeof(io->name), "AVR32 PS/2 port%d", pdev->id); psif_probe() 277 snprintf(io->phys, sizeof(io->phys), "at32psif/serio%d", pdev->id); psif_probe() 279 io->dev.parent = &pdev->dev; psif_probe() 285 platform_set_drvdata(pdev, psif); psif_probe() 287 dev_info(&pdev->dev, "Atmel AVR32 PSIF PS/2 driver on 0x%08x irq %d\n", psif_probe() 304 static int __exit psif_remove(struct platform_device *pdev) psif_remove() argument 306 struct psif *psif = platform_get_drvdata(pdev); psif_remove() 323 struct platform_device *pdev = to_platform_device(dev); psif_suspend() local 324 struct psif *psif = platform_get_drvdata(pdev); psif_suspend() 336 struct platform_device *pdev = to_platform_device(dev); psif_resume() local 337 struct psif *psif = platform_get_drvdata(pdev); psif_resume()
|
/linux-4.1.27/drivers/char/hw_random/ |
H A D | bcm63xx-rng.c | 79 static int bcm63xx_rng_probe(struct platform_device *pdev) bcm63xx_rng_probe() argument 87 r = platform_get_resource(pdev, IORESOURCE_MEM, 0); bcm63xx_rng_probe() 89 dev_err(&pdev->dev, "no iomem resource\n"); bcm63xx_rng_probe() 93 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); bcm63xx_rng_probe() 97 priv->rng.name = pdev->name; bcm63xx_rng_probe() 103 priv->clk = devm_clk_get(&pdev->dev, "ipsec"); bcm63xx_rng_probe() 106 dev_err(&pdev->dev, "no clock for device: %d\n", ret); bcm63xx_rng_probe() 110 if (!devm_request_mem_region(&pdev->dev, r->start, bcm63xx_rng_probe() 111 resource_size(r), pdev->name)) { bcm63xx_rng_probe() 112 dev_err(&pdev->dev, "request mem failed"); bcm63xx_rng_probe() 116 priv->regs = devm_ioremap_nocache(&pdev->dev, r->start, bcm63xx_rng_probe() 119 dev_err(&pdev->dev, "ioremap failed"); bcm63xx_rng_probe() 123 ret = devm_hwrng_register(&pdev->dev, &priv->rng); bcm63xx_rng_probe() 125 dev_err(&pdev->dev, "failed to register rng device: %d\n", bcm63xx_rng_probe() 130 dev_info(&pdev->dev, "registered RNG driver\n"); bcm63xx_rng_probe()
|
H A D | octeon-rng.c | 58 static int octeon_rng_probe(struct platform_device *pdev) octeon_rng_probe() argument 71 rng = devm_kzalloc(&pdev->dev, sizeof(*rng), GFP_KERNEL); octeon_rng_probe() 75 res_ports = platform_get_resource(pdev, IORESOURCE_MEM, 0); octeon_rng_probe() 79 res_result = platform_get_resource(pdev, IORESOURCE_MEM, 1); octeon_rng_probe() 84 rng->control_status = devm_ioremap_nocache(&pdev->dev, octeon_rng_probe() 90 rng->result = devm_ioremap_nocache(&pdev->dev, octeon_rng_probe() 98 platform_set_drvdata(pdev, &rng->ops); octeon_rng_probe() 103 dev_info(&pdev->dev, "Octeon Random Number Generator\n"); octeon_rng_probe() 108 static int octeon_rng_remove(struct platform_device *pdev) octeon_rng_remove() argument 110 struct hwrng *rng = platform_get_drvdata(pdev); octeon_rng_remove()
|
/linux-4.1.27/drivers/power/reset/ |
H A D | gpio-restart.c | 59 static int gpio_restart_probe(struct platform_device *pdev) gpio_restart_probe() argument 66 gpio_restart = devm_kzalloc(&pdev->dev, sizeof(*gpio_restart), gpio_restart_probe() 71 open_source = of_property_read_bool(pdev->dev.of_node, "open-source"); gpio_restart_probe() 73 gpio_restart->reset_gpio = devm_gpiod_get(&pdev->dev, NULL, gpio_restart_probe() 76 dev_err(&pdev->dev, "Could net get reset GPIO\n"); gpio_restart_probe() 86 ret = of_property_read_u32(pdev->dev.of_node, "priority", &property); gpio_restart_probe() 89 dev_err(&pdev->dev, "Invalid priority property: %u\n", gpio_restart_probe() 95 of_property_read_u32(pdev->dev.of_node, "active-delay", gpio_restart_probe() 97 of_property_read_u32(pdev->dev.of_node, "inactive-delay", gpio_restart_probe() 99 of_property_read_u32(pdev->dev.of_node, "wait-delay", gpio_restart_probe() 102 platform_set_drvdata(pdev, gpio_restart); gpio_restart_probe() 106 dev_err(&pdev->dev, "%s: cannot register restart handler, %d\n", gpio_restart_probe() 114 static int gpio_restart_remove(struct platform_device *pdev) gpio_restart_remove() argument 116 struct gpio_restart *gpio_restart = platform_get_drvdata(pdev); gpio_restart_remove() 121 dev_err(&pdev->dev, gpio_restart_remove()
|
H A D | at91-reset.c | 126 static void __init at91_reset_status(struct platform_device *pdev) at91_reset_status() argument 172 static int at91_reset_of_probe(struct platform_device *pdev) at91_reset_of_probe() argument 178 at91_rstc_base = of_iomap(pdev->dev.of_node, 0); at91_reset_of_probe() 180 dev_err(&pdev->dev, "Could not map reset controller address\n"); at91_reset_of_probe() 187 dev_err(&pdev->dev, "Could not map ram controller address\n"); for_each_matching_node() 193 match = of_match_node(at91_reset_of_match, pdev->dev.of_node); 198 static int at91_reset_platform_probe(struct platform_device *pdev) at91_reset_platform_probe() argument 204 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); at91_reset_platform_probe() 205 at91_rstc_base = devm_ioremap_resource(&pdev->dev, res); at91_reset_platform_probe() 207 dev_err(&pdev->dev, "Could not map reset controller address\n"); at91_reset_platform_probe() 212 res = platform_get_resource(pdev, IORESOURCE_MEM, idx + 1 ); at91_reset_platform_probe() 213 at91_ramc_base[idx] = devm_ioremap(&pdev->dev, res->start, at91_reset_platform_probe() 216 dev_err(&pdev->dev, "Could not map ram controller address\n"); at91_reset_platform_probe() 221 match = platform_get_device_id(pdev); at91_reset_platform_probe() 229 static int at91_reset_probe(struct platform_device *pdev) at91_reset_probe() argument 233 if (pdev->dev.of_node) at91_reset_probe() 234 ret = at91_reset_of_probe(pdev); at91_reset_probe() 236 ret = at91_reset_platform_probe(pdev); at91_reset_probe() 241 at91_reset_status(pdev); at91_reset_probe()
|
/linux-4.1.27/sound/soc/ux500/ |
H A D | mop500.c | 71 static int mop500_of_probe(struct platform_device *pdev, mop500_of_probe() argument 82 dev_err(&pdev->dev, "Phandle missing or invalid\n"); mop500_of_probe() 101 static int mop500_probe(struct platform_device *pdev) mop500_probe() argument 103 struct device_node *np = pdev->dev.of_node; mop500_probe() 106 dev_dbg(&pdev->dev, "%s: Enter.\n", __func__); mop500_probe() 108 mop500_card.dev = &pdev->dev; mop500_probe() 111 ret = mop500_of_probe(pdev, np); mop500_probe() 116 dev_dbg(&pdev->dev, "%s: Card %s: Set platform drvdata.\n", mop500_probe() 118 platform_set_drvdata(pdev, &mop500_card); mop500_probe() 122 dev_dbg(&pdev->dev, "%s: Card %s: num_links = %d\n", mop500_probe() 124 dev_dbg(&pdev->dev, "%s: Card %s: DAI-link 0: name = %s\n", mop500_probe() 126 dev_dbg(&pdev->dev, "%s: Card %s: DAI-link 0: stream_name = %s\n", mop500_probe() 132 dev_err(&pdev->dev, mop500_probe() 138 static int mop500_remove(struct platform_device *pdev) mop500_remove() argument 140 struct snd_soc_card *mop500_card = platform_get_drvdata(pdev); mop500_remove()
|
/linux-4.1.27/drivers/dma/ioat/ |
H A D | dca.c | 88 static int dca_enabled_in_bios(struct pci_dev *pdev) dca_enabled_in_bios() argument 98 dev_dbg(&pdev->dev, "DCA is disabled in BIOS\n"); dca_enabled_in_bios() 103 int system_has_dca_enabled(struct pci_dev *pdev) system_has_dca_enabled() argument 106 return dca_enabled_in_bios(pdev); system_has_dca_enabled() 108 dev_dbg(&pdev->dev, "boot cpu doesn't have X86_FEATURE_DCA\n"); system_has_dca_enabled() 113 struct pci_dev *pdev; /* requester device */ member in struct:ioat_dca_slot 142 struct pci_dev *pdev; ioat_dca_add_requester() local 149 pdev = to_pci_dev(dev); ioat_dca_add_requester() 150 id = dcaid_from_pcidev(pdev); ioat_dca_add_requester() 156 if (ioatdca->req_slots[i].pdev == NULL) { ioat_dca_add_requester() 159 ioatdca->req_slots[i].pdev = pdev; ioat_dca_add_requester() 175 struct pci_dev *pdev; ioat_dca_remove_requester() local 181 pdev = to_pci_dev(dev); ioat_dca_remove_requester() 184 if (ioatdca->req_slots[i].pdev == pdev) { ioat_dca_remove_requester() 186 ioatdca->req_slots[i].pdev = NULL; ioat_dca_remove_requester() 223 struct pci_dev *pdev; ioat_dca_dev_managed() local 226 pdev = to_pci_dev(dev); ioat_dca_dev_managed() 228 if (ioatdca->req_slots[i].pdev == pdev) ioat_dca_dev_managed() 242 struct dca_provider *ioat_dca_init(struct pci_dev *pdev, void __iomem *iobase) ioat_dca_init() argument 252 if (!system_has_dca_enabled(pdev)) ioat_dca_init() 256 switch (pdev->vendor) { ioat_dca_init() 258 switch (pdev->device) { ioat_dca_init() 271 switch (pdev->device) { ioat_dca_init() 301 err = register_dca_provider(dca, &pdev->dev); ioat_dca_init() 314 struct pci_dev *pdev; ioat2_dca_add_requester() local 322 pdev = to_pci_dev(dev); ioat2_dca_add_requester() 323 id = dcaid_from_pcidev(pdev); ioat2_dca_add_requester() 329 if (ioatdca->req_slots[i].pdev == NULL) { ioat2_dca_add_requester() 332 ioatdca->req_slots[i].pdev = pdev; ioat2_dca_add_requester() 349 struct pci_dev *pdev; ioat2_dca_remove_requester() local 356 pdev = to_pci_dev(dev); ioat2_dca_remove_requester() 359 if (ioatdca->req_slots[i].pdev == pdev) { ioat2_dca_remove_requester() 363 ioatdca->req_slots[i].pdev = NULL; ioat2_dca_remove_requester() 407 struct dca_provider *ioat2_dca_init(struct pci_dev *pdev, void __iomem *iobase) ioat2_dca_init() argument 420 if (!system_has_dca_enabled(pdev)) ioat2_dca_init() 472 dev_driver_string(&pdev->dev), ioat2_dca_init() 473 dev_name(&pdev->dev)); ioat2_dca_init() 478 err = register_dca_provider(dca, &pdev->dev); ioat2_dca_init() 490 struct pci_dev *pdev; ioat3_dca_add_requester() local 498 pdev = to_pci_dev(dev); ioat3_dca_add_requester() 499 id = dcaid_from_pcidev(pdev); ioat3_dca_add_requester() 505 if (ioatdca->req_slots[i].pdev == NULL) { ioat3_dca_add_requester() 508 ioatdca->req_slots[i].pdev = pdev; ioat3_dca_add_requester() 525 struct pci_dev *pdev; ioat3_dca_remove_requester() local 532 pdev = to_pci_dev(dev); ioat3_dca_remove_requester() 535 if (ioatdca->req_slots[i].pdev == pdev) { ioat3_dca_remove_requester() 539 ioatdca->req_slots[i].pdev = NULL; ioat3_dca_remove_requester() 621 struct dca_provider *ioat3_dca_init(struct pci_dev *pdev, void __iomem *iobase) ioat3_dca_init() argument 641 if (!system_has_dca_enabled(pdev)) ioat3_dca_init() 693 dev_driver_string(&pdev->dev), ioat3_dca_init() 694 dev_name(&pdev->dev)); ioat3_dca_init() 699 err = register_dca_provider(dca, &pdev->dev); ioat3_dca_init()
|
/linux-4.1.27/drivers/char/tpm/ |
H A D | tpm_nsc.c | 116 dev_info(chip->pdev, "wait for ready failed\n"); nsc_wait_for_ready() 132 dev_err(chip->pdev, "F0 timeout\n"); tpm_nsc_recv() 137 dev_err(chip->pdev, "not in normal mode (0x%x)\n", tpm_nsc_recv() 146 dev_err(chip->pdev, tpm_nsc_recv() 157 dev_err(chip->pdev, "F0 not set\n"); tpm_nsc_recv() 161 dev_err(chip->pdev, tpm_nsc_recv() 192 dev_err(chip->pdev, "IBF timeout\n"); tpm_nsc_send() 198 dev_err(chip->pdev, "IBR timeout\n"); tpm_nsc_send() 204 dev_err(chip->pdev, tpm_nsc_send() 212 dev_err(chip->pdev, "IBF timeout\n"); tpm_nsc_send() 245 static struct platform_device *pdev = NULL; variable in typeref:struct:platform_device 291 pdev = platform_device_alloc("tpm_nscl0", -1); init_nsc() 292 if (!pdev) { init_nsc() 297 pdev->num_resources = 0; init_nsc() 298 pdev->dev.driver = &nsc_drv.driver; init_nsc() 299 pdev->dev.release = tpm_nsc_remove; init_nsc() 301 if ((rc = platform_device_add(pdev)) < 0) init_nsc() 309 chip = tpmm_chip_alloc(&pdev->dev, &tpm_nsc); init_nsc() 319 dev_dbg(&pdev->dev, "NSC TPM detected\n"); init_nsc() 320 dev_dbg(&pdev->dev, init_nsc() 324 dev_dbg(&pdev->dev, init_nsc() 328 dev_dbg(&pdev->dev, "NSC IO Base0 0x%x\n", init_nsc() 330 dev_dbg(&pdev->dev, "NSC IO Base1 0x%x\n", init_nsc() 332 dev_dbg(&pdev->dev, "NSC Interrupt number and wakeup 0x%x\n", init_nsc() 334 dev_dbg(&pdev->dev, "NSC IRQ type select 0x%x\n", init_nsc() 336 dev_dbg(&pdev->dev, init_nsc() 339 dev_dbg(&pdev->dev, init_nsc() 348 dev_info(&pdev->dev, init_nsc() 359 platform_device_del(pdev); init_nsc() 361 platform_device_put(pdev); init_nsc() 369 if (pdev) { cleanup_nsc() 370 tpm_nsc_remove(&pdev->dev); cleanup_nsc() 371 platform_device_unregister(pdev); cleanup_nsc()
|
/linux-4.1.27/arch/alpha/kernel/ |
H A D | pci-sysfs.c | 35 static int __pci_mmap_fits(struct pci_dev *pdev, int num, __pci_mmap_fits() argument 43 size = ((pci_resource_len(pdev, num) - 1) >> (PAGE_SHIFT - shift)) + 1; __pci_mmap_fits() 50 pci_name(pdev), num, size); __pci_mmap_fits() 67 struct pci_dev *pdev = to_pci_dev(container_of(kobj, pci_mmap_resource() local 75 if (res == &pdev->resource[i]) pci_mmap_resource() 80 if (!__pci_mmap_fits(pdev, i, vma, sparse)) pci_mmap_resource() 86 pcibios_resource_to_bus(pdev->bus, &bar, res); pci_mmap_resource() 90 return hose_mmap_page_range(pdev->sysdata, vma, mmap_type, sparse); pci_mmap_resource() 114 void pci_remove_resource_files(struct pci_dev *pdev) pci_remove_resource_files() argument 121 res_attr = pdev->res_attr[i]; pci_remove_resource_files() 123 sysfs_remove_bin_file(&pdev->dev.kobj, res_attr); pci_remove_resource_files() 127 res_attr = pdev->res_attr_wc[i]; pci_remove_resource_files() 129 sysfs_remove_bin_file(&pdev->dev.kobj, res_attr); pci_remove_resource_files() 135 static int sparse_mem_mmap_fits(struct pci_dev *pdev, int num) sparse_mem_mmap_fits() argument 138 struct pci_controller *hose = pdev->sysdata; sparse_mem_mmap_fits() 142 pcibios_resource_to_bus(pdev->bus, &bar, &pdev->resource[num]); sparse_mem_mmap_fits() 154 static int pci_create_one_attr(struct pci_dev *pdev, int num, char *name, pci_create_one_attr() argument 158 size_t size = pci_resource_len(pdev, num); pci_create_one_attr() 166 res_attr->private = &pdev->resource[num]; pci_create_one_attr() 167 return sysfs_create_bin_file(&pdev->dev.kobj, res_attr); pci_create_one_attr() 170 static int pci_create_attr(struct pci_dev *pdev, int num) pci_create_attr() argument 176 struct pci_controller *hose = pdev->sysdata; pci_create_attr() 182 if (pdev->resource[num].flags & IORESOURCE_MEM) { pci_create_attr() 185 if (sparse_base && !sparse_mem_mmap_fits(pdev, num)) { pci_create_attr() 210 pdev->res_attr[num] = attr; pci_create_attr() 211 retval = pci_create_one_attr(pdev, num, attr_name, suffix, attr, pci_create_attr() 219 pdev->res_attr_wc[num] = attr; pci_create_attr() 220 return pci_create_one_attr(pdev, num, attr_name, "_dense", attr, 0); pci_create_attr() 229 int pci_create_resource_files(struct pci_dev *pdev) pci_create_resource_files() argument 238 if (!pci_resource_len(pdev, i)) pci_create_resource_files() 241 retval = pci_create_attr(pdev, i); pci_create_resource_files() 243 pci_remove_resource_files(pdev); pci_create_resource_files()
|
/linux-4.1.27/sound/soc/tegra/ |
H A D | tegra20_spdif.c | 265 static int tegra20_spdif_platform_probe(struct platform_device *pdev) tegra20_spdif_platform_probe() argument 272 spdif = devm_kzalloc(&pdev->dev, sizeof(struct tegra20_spdif), tegra20_spdif_platform_probe() 275 dev_err(&pdev->dev, "Can't allocate tegra20_spdif\n"); tegra20_spdif_platform_probe() 279 dev_set_drvdata(&pdev->dev, spdif); tegra20_spdif_platform_probe() 281 spdif->clk_spdif_out = clk_get(&pdev->dev, "spdif_out"); tegra20_spdif_platform_probe() 288 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); tegra20_spdif_platform_probe() 290 dev_err(&pdev->dev, "No memory resource\n"); tegra20_spdif_platform_probe() 295 dmareq = platform_get_resource(pdev, IORESOURCE_DMA, 0); tegra20_spdif_platform_probe() 297 dev_err(&pdev->dev, "No DMA resource\n"); tegra20_spdif_platform_probe() 302 memregion = devm_request_mem_region(&pdev->dev, mem->start, tegra20_spdif_platform_probe() 305 dev_err(&pdev->dev, "Memory region already claimed\n"); tegra20_spdif_platform_probe() 310 regs = devm_ioremap(&pdev->dev, mem->start, resource_size(mem)); tegra20_spdif_platform_probe() 312 dev_err(&pdev->dev, "ioremap failed\n"); tegra20_spdif_platform_probe() 317 spdif->regmap = devm_regmap_init_mmio(&pdev->dev, regs, tegra20_spdif_platform_probe() 320 dev_err(&pdev->dev, "regmap init failed\n"); tegra20_spdif_platform_probe() 330 pm_runtime_enable(&pdev->dev); tegra20_spdif_platform_probe() 331 if (!pm_runtime_enabled(&pdev->dev)) { tegra20_spdif_platform_probe() 332 ret = tegra20_spdif_runtime_resume(&pdev->dev); tegra20_spdif_platform_probe() 337 ret = snd_soc_register_component(&pdev->dev, &tegra20_spdif_component, tegra20_spdif_platform_probe() 340 dev_err(&pdev->dev, "Could not register DAI: %d\n", ret); tegra20_spdif_platform_probe() 345 ret = tegra_pcm_platform_register(&pdev->dev); tegra20_spdif_platform_probe() 347 dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); tegra20_spdif_platform_probe() 354 snd_soc_unregister_component(&pdev->dev); tegra20_spdif_platform_probe() 356 if (!pm_runtime_status_suspended(&pdev->dev)) tegra20_spdif_platform_probe() 357 tegra20_spdif_runtime_suspend(&pdev->dev); tegra20_spdif_platform_probe() 359 pm_runtime_disable(&pdev->dev); tegra20_spdif_platform_probe() 366 static int tegra20_spdif_platform_remove(struct platform_device *pdev) tegra20_spdif_platform_remove() argument 368 struct tegra20_spdif *spdif = dev_get_drvdata(&pdev->dev); tegra20_spdif_platform_remove() 370 pm_runtime_disable(&pdev->dev); tegra20_spdif_platform_remove() 371 if (!pm_runtime_status_suspended(&pdev->dev)) tegra20_spdif_platform_remove() 372 tegra20_spdif_runtime_suspend(&pdev->dev); tegra20_spdif_platform_remove() 374 tegra_pcm_platform_unregister(&pdev->dev); tegra20_spdif_platform_remove() 375 snd_soc_unregister_component(&pdev->dev); tegra20_spdif_platform_remove()
|
H A D | tegra20_das.c | 134 static int tegra20_das_probe(struct platform_device *pdev) tegra20_das_probe() argument 143 das = devm_kzalloc(&pdev->dev, sizeof(struct tegra20_das), GFP_KERNEL); tegra20_das_probe() 145 dev_err(&pdev->dev, "Can't allocate tegra20_das\n"); tegra20_das_probe() 149 das->dev = &pdev->dev; tegra20_das_probe() 151 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); tegra20_das_probe() 153 dev_err(&pdev->dev, "No memory resource\n"); tegra20_das_probe() 158 region = devm_request_mem_region(&pdev->dev, res->start, tegra20_das_probe() 159 resource_size(res), pdev->name); tegra20_das_probe() 161 dev_err(&pdev->dev, "Memory region already claimed\n"); tegra20_das_probe() 166 regs = devm_ioremap(&pdev->dev, res->start, resource_size(res)); tegra20_das_probe() 168 dev_err(&pdev->dev, "ioremap failed\n"); tegra20_das_probe() 173 das->regmap = devm_regmap_init_mmio(&pdev->dev, regs, tegra20_das_probe() 176 dev_err(&pdev->dev, "regmap init failed\n"); tegra20_das_probe() 184 dev_err(&pdev->dev, "Can't set up DAS DAP connection\n"); tegra20_das_probe() 190 dev_err(&pdev->dev, "Can't set up DAS DAC connection\n"); tegra20_das_probe() 197 dev_err(&pdev->dev, "Can't set up DAS DAP connection\n"); tegra20_das_probe() 203 dev_err(&pdev->dev, "Can't set up DAS DAC connection\n"); tegra20_das_probe() 207 platform_set_drvdata(pdev, das); tegra20_das_probe() 216 static int tegra20_das_remove(struct platform_device *pdev) tegra20_das_remove() argument
|
/linux-4.1.27/drivers/leds/ |
H A D | leds-asic3.c | 42 struct platform_device *pdev = to_platform_device(cdev->dev->parent); brightness_set() local 43 const struct mfd_cell *cell = mfd_get_cell(pdev); brightness_set() 44 struct asic3 *asic = dev_get_drvdata(pdev->dev.parent); brightness_set() 61 struct platform_device *pdev = to_platform_device(cdev->dev->parent); blink_set() local 62 const struct mfd_cell *cell = mfd_get_cell(pdev); blink_set() 63 struct asic3 *asic = dev_get_drvdata(pdev->dev.parent); blink_set() 94 static int asic3_led_probe(struct platform_device *pdev) asic3_led_probe() argument 96 struct asic3_led *led = dev_get_platdata(&pdev->dev); asic3_led_probe() 99 ret = mfd_cell_enable(pdev); asic3_led_probe() 103 led->cdev = devm_kzalloc(&pdev->dev, sizeof(struct led_classdev), asic3_led_probe() 116 ret = led_classdev_register(&pdev->dev, led->cdev); asic3_led_probe() 123 (void) mfd_cell_disable(pdev); asic3_led_probe() 127 static int asic3_led_remove(struct platform_device *pdev) asic3_led_remove() argument 129 struct asic3_led *led = dev_get_platdata(&pdev->dev); asic3_led_remove() 133 return mfd_cell_disable(pdev); asic3_led_remove() 139 struct platform_device *pdev = to_platform_device(dev); asic3_led_suspend() local 140 const struct mfd_cell *cell = mfd_get_cell(pdev); asic3_led_suspend() 145 ret = (*cell->suspend)(pdev); asic3_led_suspend() 152 struct platform_device *pdev = to_platform_device(dev); asic3_led_resume() local 153 const struct mfd_cell *cell = mfd_get_cell(pdev); asic3_led_resume() 158 ret = (*cell->resume)(pdev); asic3_led_resume()
|
H A D | leds-net48xx.c | 26 static struct platform_device *pdev; variable in typeref:struct:platform_device 40 static int net48xx_led_probe(struct platform_device *pdev) net48xx_led_probe() argument 42 return led_classdev_register(&pdev->dev, &net48xx_error_led); net48xx_led_probe() 45 static int net48xx_led_remove(struct platform_device *pdev) net48xx_led_remove() argument 73 pdev = platform_device_register_simple(DRVNAME, -1, NULL, 0); net48xx_led_init() 74 if (IS_ERR(pdev)) { net48xx_led_init() 75 ret = PTR_ERR(pdev); net48xx_led_init() 86 platform_device_unregister(pdev); net48xx_led_exit()
|
H A D | leds-wrap.c | 27 static struct platform_device *pdev; variable in typeref:struct:platform_device 75 static int wrap_led_probe(struct platform_device *pdev) wrap_led_probe() argument 79 ret = led_classdev_register(&pdev->dev, &wrap_power_led); wrap_led_probe() 83 ret = led_classdev_register(&pdev->dev, &wrap_error_led); wrap_led_probe() 87 ret = led_classdev_register(&pdev->dev, &wrap_extra_led); wrap_led_probe() 101 static int wrap_led_remove(struct platform_device *pdev) wrap_led_remove() argument 130 pdev = platform_device_register_simple(DRVNAME, -1, NULL, 0); wrap_led_init() 131 if (IS_ERR(pdev)) { wrap_led_init() 132 ret = PTR_ERR(pdev); wrap_led_init() 143 platform_device_unregister(pdev); wrap_led_exit()
|
/linux-4.1.27/drivers/vfio/pci/ |
H A D | vfio_pci.c | 80 struct pci_dev *tmp = NULL, *pdev = vdev->pdev; vfio_pci_set_vga_decode() local 84 if (single_vga || !vfio_vga_disabled() || pci_is_root_bus(pdev->bus)) vfio_pci_set_vga_decode() 88 max_busnr = pci_bus_max_busnr(pdev->bus); vfio_pci_set_vga_decode() 92 if (tmp == pdev || vfio_pci_set_vga_decode() 93 pci_domain_nr(tmp->bus) != pci_domain_nr(pdev->bus) || vfio_pci_set_vga_decode() 97 if (tmp->bus->number >= pdev->bus->number && vfio_pci_set_vga_decode() 108 static inline bool vfio_pci_is_vga(struct pci_dev *pdev) vfio_pci_is_vga() argument 110 return (pdev->class >> 8) == PCI_CLASS_DISPLAY_VGA; vfio_pci_is_vga() 117 struct pci_dev *pdev = vdev->pdev; vfio_pci_enable() local 122 pci_set_power_state(pdev, PCI_D0); vfio_pci_enable() 125 pci_clear_master(pdev); vfio_pci_enable() 127 ret = pci_enable_device(pdev); vfio_pci_enable() 131 vdev->reset_works = (pci_reset_function(pdev) == 0); vfio_pci_enable() 132 pci_save_state(pdev); vfio_pci_enable() 133 vdev->pci_saved_state = pci_store_saved_state(pdev); vfio_pci_enable() 136 __func__, dev_name(&pdev->dev)); vfio_pci_enable() 142 pci_disable_device(pdev); vfio_pci_enable() 147 vdev->pci_2_3 = pci_intx_mask_supported(pdev); vfio_pci_enable() 149 pci_read_config_word(pdev, PCI_COMMAND, &cmd); vfio_pci_enable() 152 pci_write_config_word(pdev, PCI_COMMAND, cmd); vfio_pci_enable() 155 msix_pos = pdev->msix_cap; vfio_pci_enable() 160 pci_read_config_word(pdev, msix_pos + PCI_MSIX_FLAGS, &flags); vfio_pci_enable() 161 pci_read_config_dword(pdev, msix_pos + PCI_MSIX_TABLE, &table); vfio_pci_enable() 169 if (!vfio_vga_disabled() && vfio_pci_is_vga(pdev)) vfio_pci_enable() 177 struct pci_dev *pdev = vdev->pdev; vfio_pci_disable() local 181 pci_clear_master(pdev); vfio_pci_disable() 194 pci_iounmap(pdev, vdev->barmap[bar]); vfio_pci_disable() 195 pci_release_selected_regions(pdev, 1 << bar); vfio_pci_disable() 207 if (pci_load_and_free_saved_state(pdev, &vdev->pci_saved_state)) { vfio_pci_disable() 209 __func__, dev_name(&pdev->dev)); vfio_pci_disable() 214 pci_save_state(pdev); vfio_pci_disable() 221 pci_write_config_word(pdev, PCI_COMMAND, PCI_COMMAND_INTX_DISABLE); vfio_pci_disable() 227 if (vdev->reset_works && !pci_try_reset_function(pdev)) vfio_pci_disable() 230 pci_restore_state(pdev); vfio_pci_disable() 232 pci_disable_device(pdev); vfio_pci_disable() 237 pci_set_power_state(pdev, PCI_D3hot); vfio_pci_disable() 247 vfio_spapr_pci_eeh_release(vdev->pdev); vfio_pci_release() 271 vfio_spapr_pci_eeh_open(vdev->pdev); vfio_pci_open() 285 pci_read_config_byte(vdev->pdev, PCI_INTERRUPT_PIN, &pin); vfio_pci_get_irq_count() 293 pos = vdev->pdev->msi_cap; vfio_pci_get_irq_count() 295 pci_read_config_word(vdev->pdev, vfio_pci_get_irq_count() 303 pos = vdev->pdev->msix_cap; vfio_pci_get_irq_count() 305 pci_read_config_word(vdev->pdev, vfio_pci_get_irq_count() 311 if (pci_is_pcie(vdev->pdev)) vfio_pci_get_irq_count() 320 static int vfio_pci_count_devs(struct pci_dev *pdev, void *data) vfio_pci_count_devs() argument 332 static int vfio_pci_fill_devs(struct pci_dev *pdev, void *data) vfio_pci_fill_devs() argument 340 iommu_group = iommu_group_get(&pdev->dev); vfio_pci_fill_devs() 345 fill->devices[fill->cur].segment = pci_domain_nr(pdev->bus); vfio_pci_fill_devs() 346 fill->devices[fill->cur].bus = pdev->bus->number; vfio_pci_fill_devs() 347 fill->devices[fill->cur].devfn = pdev->devfn; vfio_pci_fill_devs() 363 static int vfio_pci_validate_devs(struct pci_dev *pdev, void *data) vfio_pci_validate_devs() argument 369 group = iommu_group_get(&pdev->dev); vfio_pci_validate_devs() 384 static bool vfio_pci_dev_below_slot(struct pci_dev *pdev, struct pci_slot *slot) vfio_pci_dev_below_slot() argument 386 for (; pdev; pdev = pdev->bus->self) vfio_pci_dev_below_slot() 387 if (pdev->bus == slot->bus) vfio_pci_dev_below_slot() 388 return (pdev->slot == slot); vfio_pci_dev_below_slot() 395 struct pci_dev *pdev; member in struct:vfio_pci_walk_info 400 static int vfio_pci_walk_wrapper(struct pci_dev *pdev, void *data) vfio_pci_walk_wrapper() argument 404 if (!walk->slot || vfio_pci_dev_below_slot(pdev, walk->pdev->slot)) vfio_pci_walk_wrapper() 405 walk->ret = walk->fn(pdev, walk->data); vfio_pci_walk_wrapper() 410 static int vfio_pci_for_each_slot_or_bus(struct pci_dev *pdev, vfio_pci_for_each_slot_or_bus() argument 416 .fn = fn, .data = data, .pdev = pdev, .slot = slot, .ret = 0, vfio_pci_for_each_slot_or_bus() 419 pci_walk_bus(pdev->bus, vfio_pci_walk_wrapper, &walk); vfio_pci_for_each_slot_or_bus() 453 struct pci_dev *pdev = vdev->pdev; vfio_pci_ioctl() local 467 info.size = pdev->cfg_size; vfio_pci_ioctl() 473 info.size = pci_resource_len(pdev, info.index); vfio_pci_ioctl() 482 pci_resource_flags(pdev, info.index) & vfio_pci_ioctl() 495 info.size = pci_resource_len(pdev, info.index); vfio_pci_ioctl() 500 io = pci_map_rom(pdev, &size); vfio_pci_ioctl() 505 pci_unmap_rom(pdev, io); vfio_pci_ioctl() 543 if (pci_is_pcie(vdev->pdev)) vfio_pci_ioctl() 611 pci_try_reset_function(vdev->pdev) : -EINVAL; vfio_pci_ioctl() 631 if (!pci_probe_reset_slot(vdev->pdev->slot)) vfio_pci_ioctl() 633 else if (pci_probe_reset_bus(vdev->pdev->bus)) vfio_pci_ioctl() 637 ret = vfio_pci_for_each_slot_or_bus(vdev->pdev, vfio_pci_ioctl() 661 ret = vfio_pci_for_each_slot_or_bus(vdev->pdev, vfio_pci_ioctl() 703 if (!pci_probe_reset_slot(vdev->pdev->slot)) vfio_pci_ioctl() 705 else if (pci_probe_reset_bus(vdev->pdev->bus)) vfio_pci_ioctl() 714 ret = vfio_pci_for_each_slot_or_bus(vdev->pdev, vfio_pci_ioctl() 776 ret = vfio_pci_for_each_slot_or_bus(vdev->pdev, vfio_pci_ioctl() 781 ret = slot ? pci_try_reset_slot(vdev->pdev->slot) : vfio_pci_ioctl() 782 pci_try_reset_bus(vdev->pdev->bus); vfio_pci_ioctl() 844 struct pci_dev *pdev = vdev->pdev; vfio_pci_mmap() local 857 if (!(pci_resource_flags(pdev, index) & IORESOURCE_MEM)) vfio_pci_mmap() 860 phys_len = pci_resource_len(pdev, index); vfio_pci_mmap() 890 ret = pci_request_selected_regions(pdev, vfio_pci_mmap() 895 vdev->barmap[index] = pci_iomap(pdev, index, 0); vfio_pci_mmap() 900 vma->vm_pgoff = (pci_resource_start(pdev, index) >> PAGE_SHIFT) + pgoff; vfio_pci_mmap() 914 dev_notice_ratelimited(&vdev->pdev->dev, vfio_pci_request() 919 dev_warn(&vdev->pdev->dev, vfio_pci_request() 937 static int vfio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) vfio_pci_probe() argument 943 if (pdev->hdr_type != PCI_HEADER_TYPE_NORMAL) vfio_pci_probe() 946 group = iommu_group_get(&pdev->dev); vfio_pci_probe() 956 vdev->pdev = pdev; vfio_pci_probe() 961 ret = vfio_add_group_dev(&pdev->dev, &vfio_pci_ops, vdev); vfio_pci_probe() 968 if (vfio_pci_is_vga(pdev)) { vfio_pci_probe() 969 vga_client_register(pdev, vdev, NULL, vfio_pci_set_vga_decode); vfio_pci_probe() 970 vga_set_legacy_decoding(pdev, vfio_pci_probe() 984 pci_set_power_state(pdev, PCI_D0); vfio_pci_probe() 985 pci_set_power_state(pdev, PCI_D3hot); vfio_pci_probe() 991 static void vfio_pci_remove(struct pci_dev *pdev) vfio_pci_remove() argument 995 vdev = vfio_del_group_dev(&pdev->dev); vfio_pci_remove() 999 iommu_group_put(pdev->dev.iommu_group); vfio_pci_remove() 1002 if (vfio_pci_is_vga(pdev)) { vfio_pci_remove() 1003 vga_client_register(pdev, NULL, NULL, NULL); vfio_pci_remove() 1004 vga_set_legacy_decoding(pdev, vfio_pci_remove() 1010 pci_set_power_state(pdev, PCI_D0); vfio_pci_remove() 1013 static pci_ers_result_t vfio_pci_aer_err_detected(struct pci_dev *pdev, vfio_pci_aer_err_detected() argument 1019 device = vfio_device_get_from_dev(&pdev->dev); vfio_pci_aer_err_detected() 1059 static int vfio_pci_get_devs(struct pci_dev *pdev, void *data) vfio_pci_get_devs() argument 1062 struct pci_driver *pci_drv = ACCESS_ONCE(pdev->driver); vfio_pci_get_devs() 1070 devs->devices[devs->cur_index] = vfio_device_get_from_dev(&pdev->dev); vfio_pci_get_devs() 1097 if (!pci_probe_reset_slot(vdev->pdev->slot)) vfio_pci_try_bus_reset() 1099 else if (pci_probe_reset_bus(vdev->pdev->bus)) vfio_pci_try_bus_reset() 1102 if (vfio_pci_for_each_slot_or_bus(vdev->pdev, vfio_pci_count_devs, vfio_pci_try_bus_reset() 1111 if (vfio_pci_for_each_slot_or_bus(vdev->pdev, vfio_pci_try_bus_reset() 1124 ret = slot ? pci_try_reset_slot(vdev->pdev->slot) : vfio_pci_try_bus_reset() 1125 pci_try_reset_bus(vdev->pdev->bus); vfio_pci_try_bus_reset() 1134 pci_set_power_state(tmp->pdev, PCI_D3hot); vfio_pci_try_bus_reset()
|
/linux-4.1.27/drivers/pcmcia/ |
H A D | at91_cf.c | 50 struct platform_device *pdev; member in struct:at91_cf_socket 78 dev_dbg(&cf->pdev->dev, "card %s\n", at91_cf_irq() 136 dev_dbg(&cf->pdev->dev, "Vcc %d, io_irq %d, flags %04x csc %04x\n", at91_cf_set_socket() 173 dev_dbg(&cf->pdev->dev, "8bit i/o bus\n"); at91_cf_set_io_map() 176 dev_dbg(&cf->pdev->dev, "16bit i/o bus\n"); at91_cf_set_io_map() 224 static int at91_cf_dt_init(struct platform_device *pdev) at91_cf_dt_init() argument 228 board = devm_kzalloc(&pdev->dev, sizeof(*board), GFP_KERNEL); at91_cf_dt_init() 232 board->irq_pin = of_get_gpio(pdev->dev.of_node, 0); at91_cf_dt_init() 233 board->det_pin = of_get_gpio(pdev->dev.of_node, 1); at91_cf_dt_init() 234 board->vcc_pin = of_get_gpio(pdev->dev.of_node, 2); at91_cf_dt_init() 235 board->rst_pin = of_get_gpio(pdev->dev.of_node, 3); at91_cf_dt_init() 237 pdev->dev.platform_data = board; at91_cf_dt_init() 242 static int at91_cf_dt_init(struct platform_device *pdev) at91_cf_dt_init() argument 248 static int at91_cf_probe(struct platform_device *pdev) at91_cf_probe() argument 251 struct at91_cf_data *board = pdev->dev.platform_data; at91_cf_probe() 256 status = at91_cf_dt_init(pdev); at91_cf_probe() 260 board = pdev->dev.platform_data; at91_cf_probe() 266 io = platform_get_resource(pdev, IORESOURCE_MEM, 0); at91_cf_probe() 270 cf = devm_kzalloc(&pdev->dev, sizeof(*cf), GFP_KERNEL); at91_cf_probe() 275 cf->pdev = pdev; at91_cf_probe() 277 platform_set_drvdata(pdev, cf); at91_cf_probe() 280 status = devm_gpio_request(&pdev->dev, board->det_pin, "cf_det"); at91_cf_probe() 284 status = devm_request_irq(&pdev->dev, gpio_to_irq(board->det_pin), at91_cf_probe() 289 device_init_wakeup(&pdev->dev, 1); at91_cf_probe() 291 status = devm_gpio_request(&pdev->dev, board->rst_pin, "cf_rst"); at91_cf_probe() 296 status = devm_gpio_request(&pdev->dev, board->vcc_pin, "cf_vcc"); at91_cf_probe() 308 status = devm_gpio_request(&pdev->dev, board->irq_pin, "cf_irq"); at91_cf_probe() 312 status = devm_request_irq(&pdev->dev, gpio_to_irq(board->irq_pin), at91_cf_probe() 330 if (!devm_request_mem_region(&pdev->dev, io->start, resource_size(io), "at91_cf")) { at91_cf_probe() 335 dev_info(&pdev->dev, "irqs det #%d, io #%d\n", at91_cf_probe() 339 cf->socket.dev.parent = &pdev->dev; at91_cf_probe() 354 device_init_wakeup(&pdev->dev, 0); at91_cf_probe() 358 static int at91_cf_remove(struct platform_device *pdev) at91_cf_remove() argument 360 struct at91_cf_socket *cf = platform_get_drvdata(pdev); at91_cf_remove() 363 device_init_wakeup(&pdev->dev, 0); at91_cf_remove() 370 static int at91_cf_suspend(struct platform_device *pdev, pm_message_t mesg) at91_cf_suspend() argument 372 struct at91_cf_socket *cf = platform_get_drvdata(pdev); at91_cf_suspend() 375 if (device_may_wakeup(&pdev->dev)) { at91_cf_suspend() 383 static int at91_cf_resume(struct platform_device *pdev) at91_cf_resume() argument 385 struct at91_cf_socket *cf = platform_get_drvdata(pdev); at91_cf_resume() 388 if (device_may_wakeup(&pdev->dev)) { at91_cf_resume()
|
/linux-4.1.27/drivers/pwm/ |
H A D | pwm-lpss-platform.c | 20 static int pwm_lpss_probe_platform(struct platform_device *pdev) pwm_lpss_probe_platform() argument 27 id = acpi_match_device(pdev->dev.driver->acpi_match_table, &pdev->dev); pwm_lpss_probe_platform() 32 r = platform_get_resource(pdev, IORESOURCE_MEM, 0); pwm_lpss_probe_platform() 34 lpwm = pwm_lpss_probe(&pdev->dev, r, info); pwm_lpss_probe_platform() 38 platform_set_drvdata(pdev, lpwm); pwm_lpss_probe_platform() 42 static int pwm_lpss_remove_platform(struct platform_device *pdev) pwm_lpss_remove_platform() argument 44 struct pwm_lpss_chip *lpwm = platform_get_drvdata(pdev); pwm_lpss_remove_platform()
|
H A D | pwm-tipwmss.c | 57 static int pwmss_probe(struct platform_device *pdev) pwmss_probe() argument 62 struct device_node *node = pdev->dev.of_node; pwmss_probe() 64 info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL); pwmss_probe() 70 r = platform_get_resource(pdev, IORESOURCE_MEM, 0); pwmss_probe() 71 info->mmio_base = devm_ioremap_resource(&pdev->dev, r); pwmss_probe() 75 pm_runtime_enable(&pdev->dev); pwmss_probe() 76 pm_runtime_get_sync(&pdev->dev); pwmss_probe() 77 platform_set_drvdata(pdev, info); pwmss_probe() 80 ret = of_platform_populate(node, NULL, NULL, &pdev->dev); pwmss_probe() 82 dev_err(&pdev->dev, "no child node found\n"); pwmss_probe() 87 static int pwmss_remove(struct platform_device *pdev) pwmss_remove() argument 89 struct pwmss_info *info = platform_get_drvdata(pdev); pwmss_remove() 91 pm_runtime_put_sync(&pdev->dev); pwmss_remove() 92 pm_runtime_disable(&pdev->dev); pwmss_remove()
|
/linux-4.1.27/arch/mips/cobalt/ |
H A D | serial.c | 55 struct platform_device *pdev; cobalt_uart_add() local 64 pdev = platform_device_alloc("serial8250", -1); cobalt_uart_add() 65 if (!pdev) cobalt_uart_add() 68 pdev->id = PLAT8250_DEV_PLATFORM; cobalt_uart_add() 69 pdev->dev.platform_data = cobalt_serial8250_port; cobalt_uart_add() 71 retval = platform_device_add_resources(pdev, cobalt_uart_resource, ARRAY_SIZE(cobalt_uart_resource)); cobalt_uart_add() 75 retval = platform_device_add(pdev); cobalt_uart_add() 82 platform_device_put(pdev); cobalt_uart_add()
|
/linux-4.1.27/arch/mips/ralink/ |
H A D | ill_acc.c | 51 struct platform_device *pdev; ill_acc_of_setup() local 63 pdev = of_find_device_by_node(np); ill_acc_of_setup() 64 if (!pdev) { ill_acc_of_setup() 65 pr_err("%s: failed to lookup pdev\n", np->name); ill_acc_of_setup() 71 dev_err(&pdev->dev, "failed to get irq\n"); ill_acc_of_setup() 75 if (request_irq(irq, ill_acc_irq_handler, 0, "ill_acc", &pdev->dev)) { ill_acc_of_setup() 76 dev_err(&pdev->dev, "failed to request irq\n"); ill_acc_of_setup() 82 dev_info(&pdev->dev, "irq registered\n"); ill_acc_of_setup()
|
H A D | timer.c | 111 static int rt_timer_probe(struct platform_device *pdev) rt_timer_probe() argument 113 struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); rt_timer_probe() 117 rt = devm_kzalloc(&pdev->dev, sizeof(*rt), GFP_KERNEL); rt_timer_probe() 119 dev_err(&pdev->dev, "failed to allocate memory\n"); rt_timer_probe() 123 rt->irq = platform_get_irq(pdev, 0); rt_timer_probe() 125 dev_err(&pdev->dev, "failed to load irq\n"); rt_timer_probe() 129 rt->membase = devm_ioremap_resource(&pdev->dev, res); rt_timer_probe() 133 clk = devm_clk_get(&pdev->dev, NULL); rt_timer_probe() 135 dev_err(&pdev->dev, "failed get clock rate\n"); rt_timer_probe() 143 rt->dev = &pdev->dev; rt_timer_probe() 144 platform_set_drvdata(pdev, rt); rt_timer_probe() 150 dev_info(&pdev->dev, "maximum frequency is %luHz\n", rt->timer_freq); rt_timer_probe() 155 static int rt_timer_remove(struct platform_device *pdev) rt_timer_remove() argument 157 struct rt_timer *rt = platform_get_drvdata(pdev); rt_timer_remove()
|
/linux-4.1.27/arch/blackfin/mach-bf609/include/mach/ |
H A D | pm.h | 23 int bf609_nor_flash_init(struct platform_device *pdev); 24 void bf609_nor_flash_exit(struct platform_device *pdev);
|
/linux-4.1.27/include/linux/mmc/ |
H A D | sdhci-pci-data.h | 7 struct pci_dev *pdev; member in struct:sdhci_pci_data 15 extern struct sdhci_pci_data *(*sdhci_pci_get_data)(struct pci_dev *pdev,
|
/linux-4.1.27/arch/arm/mach-omap1/ |
H A D | timer.c | 45 static int omap1_dm_timer_set_src(struct platform_device *pdev, omap1_dm_timer_set_src() argument 48 int n = (pdev->id - 1) << 1; omap1_dm_timer_set_src() 63 struct platform_device *pdev; omap1_dm_timer_init() local 113 pdev = platform_device_alloc("omap_timer", i); omap1_dm_timer_init() 114 if (!pdev) { omap1_dm_timer_init() 127 ret = platform_device_add_resources(pdev, res, omap1_dm_timer_init() 130 dev_err(&pdev->dev, "%s: Failed to add resources.\n", omap1_dm_timer_init() 137 dev_err(&pdev->dev, "%s: Failed to allocate pdata.\n", omap1_dm_timer_init() 147 ret = platform_device_add_data(pdev, pdata, sizeof(*pdata)); omap1_dm_timer_init() 149 dev_err(&pdev->dev, "%s: Failed to add platform data.\n", omap1_dm_timer_init() 154 ret = platform_device_add(pdev); omap1_dm_timer_init() 156 dev_err(&pdev->dev, "%s: Failed to add platform device.\n", omap1_dm_timer_init() 161 dev_dbg(&pdev->dev, " Registered.\n"); omap1_dm_timer_init() 170 platform_device_unregister(pdev); omap1_dm_timer_init()
|
/linux-4.1.27/sound/soc/sirf/ |
H A D | sirf-audio.c | 83 static int sirf_audio_probe(struct platform_device *pdev) sirf_audio_probe() argument 89 sirf_audio_card = devm_kzalloc(&pdev->dev, sizeof(struct sirf_audio_card), sirf_audio_probe() 95 of_parse_phandle(pdev->dev.of_node, "sirf,audio-platform", 0); sirf_audio_probe() 97 of_parse_phandle(pdev->dev.of_node, "sirf,audio-platform", 0); sirf_audio_probe() 99 of_parse_phandle(pdev->dev.of_node, "sirf,audio-codec", 0); sirf_audio_probe() 100 sirf_audio_card->gpio_spk_pa = of_get_named_gpio(pdev->dev.of_node, sirf_audio_probe() 102 sirf_audio_card->gpio_hp_pa = of_get_named_gpio(pdev->dev.of_node, sirf_audio_probe() 105 ret = devm_gpio_request_one(&pdev->dev, sirf_audio_probe() 109 dev_err(&pdev->dev, sirf_audio_probe() 116 ret = devm_gpio_request_one(&pdev->dev, sirf_audio_probe() 120 dev_err(&pdev->dev, sirf_audio_probe() 127 card->dev = &pdev->dev; sirf_audio_probe() 130 ret = devm_snd_soc_register_card(&pdev->dev, card); sirf_audio_probe() 132 dev_err(&pdev->dev, "snd_soc_register_card() failed:%d\n", ret); sirf_audio_probe()
|
/linux-4.1.27/drivers/net/wireless/ath/ath9k/ |
H A D | ahb.c | 62 struct platform_device *pdev = to_platform_device(sc->dev); ath_ahb_eeprom_read() local 65 pdata = dev_get_platdata(&pdev->dev); ath_ahb_eeprom_read() 83 static int ath_ahb_probe(struct platform_device *pdev) ath_ahb_probe() argument 89 const struct platform_device_id *id = platform_get_device_id(pdev); ath_ahb_probe() 95 if (!dev_get_platdata(&pdev->dev)) { ath_ahb_probe() 96 dev_err(&pdev->dev, "no platform data specified\n"); ath_ahb_probe() 100 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ath_ahb_probe() 102 dev_err(&pdev->dev, "no memory resource found\n"); ath_ahb_probe() 106 mem = devm_ioremap_nocache(&pdev->dev, res->start, resource_size(res)); ath_ahb_probe() 108 dev_err(&pdev->dev, "ioremap failed\n"); ath_ahb_probe() 112 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); ath_ahb_probe() 114 dev_err(&pdev->dev, "no IRQ resource found\n"); ath_ahb_probe() 123 dev_err(&pdev->dev, "no memory for ieee80211_hw\n"); ath_ahb_probe() 127 SET_IEEE80211_DEV(hw, &pdev->dev); ath_ahb_probe() 128 platform_set_drvdata(pdev, hw); ath_ahb_probe() 132 sc->dev = &pdev->dev; ath_ahb_probe() 138 dev_err(&pdev->dev, "request_irq failed\n"); ath_ahb_probe() 144 dev_err(&pdev->dev, "failed to initialize device\n"); ath_ahb_probe() 162 static int ath_ahb_remove(struct platform_device *pdev) ath_ahb_remove() argument 164 struct ieee80211_hw *hw = platform_get_drvdata(pdev); ath_ahb_remove()
|
/linux-4.1.27/drivers/scsi/isci/ |
H A D | probe_roms.c | 41 struct isci_orom *isci_request_oprom(struct pci_dev *pdev) isci_request_oprom() argument 43 void __iomem *oprom = pci_map_biosrom(pdev); isci_request_oprom() 54 len = pci_biosrom_size(pdev); isci_request_oprom() 55 rom = devm_kzalloc(&pdev->dev, sizeof(*rom), GFP_KERNEL); isci_request_oprom() 57 dev_warn(&pdev->dev, isci_request_oprom() 88 dev_warn(&pdev->dev, isci_request_oprom() 99 dev_info(&pdev->dev, isci_request_oprom() 106 dev_err(&pdev->dev, "oprom parse error\n"); isci_request_oprom() 114 struct isci_orom *isci_request_firmware(struct pci_dev *pdev, const struct firmware *fw) isci_request_firmware() argument 119 if (request_firmware(&fw, ISCI_FW_NAME, &pdev->dev) != 0) isci_request_firmware() 131 orom = devm_kzalloc(&pdev->dev, fw->size, GFP_KERNEL); isci_request_firmware() 137 if (is_c0(pdev) || is_c1(pdev)) isci_request_firmware() 166 struct isci_orom *isci_get_efi_var(struct pci_dev *pdev) isci_get_efi_var() argument 178 efi_data = devm_kzalloc(&pdev->dev, data_len, GFP_KERNEL); isci_get_efi_var() 180 dev_warn(&pdev->dev, isci_get_efi_var() 197 dev_warn(&pdev->dev, isci_get_efi_var() 205 dev_warn(&pdev->dev, isci_get_efi_var() 216 dev_warn(&pdev->dev, isci_get_efi_var() 224 dev_warn(&pdev->dev, isci_get_efi_var()
|
/linux-4.1.27/drivers/net/wireless/prism54/ |
H A D | islpci_hotplug.c | 95 prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id) prism54_probe() argument 104 if (pci_enable_device(pdev)) { prism54_probe() 110 pci_read_config_byte(pdev, PCI_LATENCY_TIMER, &latency_tmr); prism54_probe() 116 pci_write_config_byte(pdev, PCI_LATENCY_TIMER, prism54_probe() 121 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) { prism54_probe() 140 pci_write_config_byte(pdev, 0x40, (u8)init_pcitm); prism54_probe() 141 pci_write_config_byte(pdev, 0x41, (u8)init_pcitm); prism54_probe() 147 rvalue = pci_request_regions(pdev, DRV_NAME); prism54_probe() 155 rvalue = pci_read_config_dword(pdev, PCI_BASE_ADDRESS_0, &mem_addr); prism54_probe() 163 DEBUG(SHOW_TRACING, "%s: pci_set_master(pdev)\n", DRV_NAME); prism54_probe() 164 pci_set_master(pdev); prism54_probe() 167 pci_try_set_mwi(pdev); prism54_probe() 170 if (!(ndev = islpci_setup(pdev))) { prism54_probe() 184 rvalue = request_irq(pdev->irq, islpci_interrupt, prism54_probe() 204 pci_clear_mwi(pdev); prism54_probe() 206 pci_release_regions(pdev); prism54_probe() 208 pci_disable_device(pdev); prism54_probe() 217 prism54_remove(struct pci_dev *pdev) prism54_remove() argument 219 struct net_device *ndev = pci_get_drvdata(pdev); prism54_remove() 240 /* pci_set_power_state(pdev, 3);*/ /* try to power-off */ prism54_remove() 243 free_irq(pdev->irq, priv); prism54_remove() 251 pci_clear_mwi(pdev); prism54_remove() 253 pci_release_regions(pdev); prism54_remove() 255 pci_disable_device(pdev); prism54_remove() 259 prism54_suspend(struct pci_dev *pdev, pm_message_t state) prism54_suspend() argument 261 struct net_device *ndev = pci_get_drvdata(pdev); prism54_suspend() 266 pci_save_state(pdev); prism54_suspend() 282 prism54_resume(struct pci_dev *pdev) prism54_resume() argument 284 struct net_device *ndev = pci_get_drvdata(pdev); prism54_resume() 292 err = pci_enable_device(pdev); prism54_resume() 299 pci_restore_state(pdev); prism54_resume()
|
/linux-4.1.27/drivers/crypto/ccp/ |
H A D | ccp-pci.c | 47 struct pci_dev *pdev = container_of(dev, struct pci_dev, dev); ccp_get_msix_irqs() local 55 ret = pci_enable_msix_range(pdev, msix_entry, 1, v); ccp_get_msix_irqs() 79 pci_disable_msix(pdev); ccp_get_msix_irqs() 89 struct pci_dev *pdev = container_of(dev, struct pci_dev, dev); ccp_get_msi_irq() local 92 ret = pci_enable_msi(pdev); ccp_get_msi_irq() 96 ccp->irq = pdev->irq; ccp_get_msi_irq() 106 pci_disable_msi(pdev); ccp_get_msi_irq() 136 struct pci_dev *pdev = container_of(dev, struct pci_dev, dev); ccp_free_irqs() local 142 pci_disable_msix(pdev); ccp_free_irqs() 145 pci_disable_msi(pdev); ccp_free_irqs() 152 struct pci_dev *pdev = container_of(dev, struct pci_dev, dev); ccp_find_mmio_area() local 156 io_flags = pci_resource_flags(pdev, IO_BAR); ccp_find_mmio_area() 157 io_len = pci_resource_len(pdev, IO_BAR); ccp_find_mmio_area() 164 static int ccp_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) ccp_pci_probe() argument 168 struct device *dev = &pdev->dev; ccp_pci_probe() 185 ret = pci_request_regions(pdev, "ccp"); ccp_pci_probe() 191 ret = pci_enable_device(pdev); ccp_pci_probe() 197 pci_set_master(pdev); ccp_pci_probe() 205 ccp->io_map = pci_iomap(pdev, bar, 0); ccp_pci_probe() 233 pci_iounmap(pdev, ccp->io_map); ccp_pci_probe() 236 pci_disable_device(pdev); ccp_pci_probe() 239 pci_release_regions(pdev); ccp_pci_probe() 246 static void ccp_pci_remove(struct pci_dev *pdev) ccp_pci_remove() argument 248 struct device *dev = &pdev->dev; ccp_pci_remove() 256 pci_iounmap(pdev, ccp->io_map); ccp_pci_remove() 258 pci_disable_device(pdev); ccp_pci_remove() 260 pci_release_regions(pdev); ccp_pci_remove() 266 static int ccp_pci_suspend(struct pci_dev *pdev, pm_message_t state) ccp_pci_suspend() argument 268 struct device *dev = &pdev->dev; ccp_pci_suspend() 291 static int ccp_pci_resume(struct pci_dev *pdev) ccp_pci_resume() argument 293 struct device *dev = &pdev->dev; ccp_pci_resume()
|
/linux-4.1.27/drivers/video/fbdev/omap2/displays-new/ |
H A D | panel-sharp-ls037v7dw01.c | 220 static int sharp_ls_probe_pdata(struct platform_device *pdev) sharp_ls_probe_pdata() argument 223 struct panel_drv_data *ddata = platform_get_drvdata(pdev); sharp_ls_probe_pdata() 227 pdata = dev_get_platdata(&pdev->dev); sharp_ls_probe_pdata() 231 dev_err(&pdev->dev, "failed to find video source '%s'\n", sharp_ls_probe_pdata() 243 r = sharp_ls_get_gpio(&pdev->dev, pdata->mo_gpio, GPIOF_OUT_INIT_LOW, sharp_ls_probe_pdata() 247 r = sharp_ls_get_gpio(&pdev->dev, pdata->lr_gpio, GPIOF_OUT_INIT_HIGH, sharp_ls_probe_pdata() 251 r = sharp_ls_get_gpio(&pdev->dev, pdata->ud_gpio, GPIOF_OUT_INIT_HIGH, sharp_ls_probe_pdata() 255 r = sharp_ls_get_gpio(&pdev->dev, pdata->resb_gpio, GPIOF_OUT_INIT_LOW, sharp_ls_probe_pdata() 259 r = sharp_ls_get_gpio(&pdev->dev, pdata->ini_gpio, GPIOF_OUT_INIT_LOW, sharp_ls_probe_pdata() 287 static int sharp_ls_probe_of(struct platform_device *pdev) sharp_ls_probe_of() argument 289 struct panel_drv_data *ddata = platform_get_drvdata(pdev); sharp_ls_probe_of() 290 struct device_node *node = pdev->dev.of_node; sharp_ls_probe_of() 294 ddata->vcc = devm_regulator_get(&pdev->dev, "envdd"); sharp_ls_probe_of() 296 dev_err(&pdev->dev, "failed to get regulator\n"); sharp_ls_probe_of() 301 r = sharp_ls_get_gpio_of(&pdev->dev, 0, 0, "enable", &ddata->ini_gpio); sharp_ls_probe_of() 306 r = sharp_ls_get_gpio_of(&pdev->dev, 0, 0, "reset", &ddata->resb_gpio); sharp_ls_probe_of() 311 r = sharp_ls_get_gpio_of(&pdev->dev, 0, 0, "mode", &ddata->mo_gpio); sharp_ls_probe_of() 316 r = sharp_ls_get_gpio_of(&pdev->dev, 1, 1, "mode", &ddata->lr_gpio); sharp_ls_probe_of() 321 r = sharp_ls_get_gpio_of(&pdev->dev, 2, 1, "mode", &ddata->ud_gpio); sharp_ls_probe_of() 327 dev_err(&pdev->dev, "failed to find video source\n"); sharp_ls_probe_of() 336 static int sharp_ls_probe(struct platform_device *pdev) sharp_ls_probe() argument 342 ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); sharp_ls_probe() 346 platform_set_drvdata(pdev, ddata); sharp_ls_probe() 348 if (dev_get_platdata(&pdev->dev)) { sharp_ls_probe() 349 r = sharp_ls_probe_pdata(pdev); sharp_ls_probe() 352 } else if (pdev->dev.of_node) { sharp_ls_probe() 353 r = sharp_ls_probe_of(pdev); sharp_ls_probe() 363 dssdev->dev = &pdev->dev; sharp_ls_probe() 372 dev_err(&pdev->dev, "Failed to register panel\n"); sharp_ls_probe() 383 static int __exit sharp_ls_remove(struct platform_device *pdev) sharp_ls_remove() argument 385 struct panel_drv_data *ddata = platform_get_drvdata(pdev); sharp_ls_remove()
|
/linux-4.1.27/drivers/ipack/carriers/ |
H A D | tpci200.c | 94 free_irq(tpci200->info->pdev->irq, (void *) tpci200); tpci200_unregister() 96 pci_iounmap(tpci200->info->pdev, tpci200->info->interface_regs); tpci200_unregister() 97 pci_iounmap(tpci200->info->pdev, tpci200->info->cfg_regs); tpci200_unregister() 99 pci_release_region(tpci200->info->pdev, TPCI200_IP_INTERFACE_BAR); tpci200_unregister() 100 pci_release_region(tpci200->info->pdev, TPCI200_IO_ID_INT_SPACES_BAR); tpci200_unregister() 101 pci_release_region(tpci200->info->pdev, TPCI200_MEM16_SPACE_BAR); tpci200_unregister() 102 pci_release_region(tpci200->info->pdev, TPCI200_MEM8_SPACE_BAR); tpci200_unregister() 103 pci_release_region(tpci200->info->pdev, TPCI200_CFG_MEM_BAR); tpci200_unregister() 105 pci_disable_device(tpci200->info->pdev); tpci200_unregister() 106 pci_dev_put(tpci200->info->pdev); tpci200_unregister() 159 dev_info(&tpci200->info->pdev->dev, tpci200_interrupt() 254 if (pci_enable_device(tpci200->info->pdev) < 0) tpci200_register() 258 res = pci_request_region(tpci200->info->pdev, TPCI200_IP_INTERFACE_BAR, tpci200_register() 261 dev_err(&tpci200->info->pdev->dev, tpci200_register() 263 tpci200->info->pdev->bus->number, tpci200_register() 264 tpci200->info->pdev->devfn); tpci200_register() 269 res = pci_request_region(tpci200->info->pdev, tpci200_register() 273 dev_err(&tpci200->info->pdev->dev, tpci200_register() 275 tpci200->info->pdev->bus->number, tpci200_register() 276 tpci200->info->pdev->devfn); tpci200_register() 281 res = pci_request_region(tpci200->info->pdev, TPCI200_MEM8_SPACE_BAR, tpci200_register() 284 dev_err(&tpci200->info->pdev->dev, tpci200_register() 286 tpci200->info->pdev->bus->number, tpci200_register() 287 tpci200->info->pdev->devfn); tpci200_register() 292 res = pci_request_region(tpci200->info->pdev, TPCI200_MEM16_SPACE_BAR, tpci200_register() 295 dev_err(&tpci200->info->pdev->dev, tpci200_register() 297 tpci200->info->pdev->bus->number, tpci200_register() 298 tpci200->info->pdev->devfn); tpci200_register() 304 ioremap_nocache(pci_resource_start(tpci200->info->pdev, tpci200_register() 311 ioidint_base = pci_resource_start(tpci200->info->pdev, tpci200_register() 318 pci_resource_start(tpci200->info->pdev, tpci200_register() 321 pci_resource_start(tpci200->info->pdev, tpci200_register() 336 res = request_irq(tpci200->info->pdev->irq, tpci200_register() 340 dev_err(&tpci200->info->pdev->dev, tpci200_register() 342 tpci200->info->pdev->bus->number, tpci200_register() 343 tpci200->info->pdev->devfn); tpci200_register() 350 pci_release_region(tpci200->info->pdev, TPCI200_MEM8_SPACE_BAR); tpci200_register() 352 pci_release_region(tpci200->info->pdev, TPCI200_IO_ID_INT_SPACES_BAR); tpci200_register() 354 pci_release_region(tpci200->info->pdev, TPCI200_IP_INTERFACE_BAR); tpci200_register() 356 pci_disable_device(tpci200->info->pdev); tpci200_register() 513 static int tpci200_pci_probe(struct pci_dev *pdev, tpci200_pci_probe() argument 530 pci_dev_get(pdev); tpci200_pci_probe() 533 ret = pci_request_region(pdev, TPCI200_CFG_MEM_BAR, tpci200_pci_probe() 536 dev_err(&pdev->dev, "Failed to allocate PCI Configuration Memory"); tpci200_pci_probe() 541 pci_resource_start(pdev, TPCI200_CFG_MEM_BAR), tpci200_pci_probe() 542 pci_resource_len(pdev, TPCI200_CFG_MEM_BAR)); tpci200_pci_probe() 544 dev_err(&pdev->dev, "Failed to map PCI Configuration Memory"); tpci200_pci_probe() 561 tpci200->info->pdev = pdev; tpci200_pci_probe() 567 dev_err(&pdev->dev, "error during tpci200 install\n"); tpci200_pci_probe() 573 tpci200->info->ipack_bus = ipack_bus_register(&pdev->dev, tpci200_pci_probe() 578 dev_err(&pdev->dev, tpci200_pci_probe() 586 dev_set_drvdata(&pdev->dev, tpci200); tpci200_pci_probe() 597 pci_release_region(pdev, TPCI200_CFG_MEM_BAR); tpci200_pci_probe() 599 pci_dev_put(pdev); tpci200_pci_probe()
|
/linux-4.1.27/drivers/scsi/ |
H A D | am53c974.c | 99 struct pci_dev *pdev = esp->dev; pci_esp_get_priv() local 101 return pci_get_drvdata(pdev); pci_esp_get_priv() 314 static void dc390_eeprom_prepare_read(struct pci_dev *pdev, u8 cmd) dc390_eeprom_prepare_read() argument 321 pci_write_config_byte(pdev, 0x80, 0x40); dc390_eeprom_prepare_read() 327 pci_write_config_byte(pdev, 0x80, bval); dc390_eeprom_prepare_read() 329 pci_write_config_byte(pdev, 0x80, 0); dc390_eeprom_prepare_read() 337 static u16 dc390_eeprom_get_data(struct pci_dev *pdev) dc390_eeprom_get_data() argument 346 pci_write_config_byte(pdev, 0x80, 0x80); dc390_eeprom_get_data() 348 pci_write_config_byte(pdev, 0x80, 0x40); dc390_eeprom_get_data() 350 pci_read_config_byte(pdev, 0x00, &bval); dc390_eeprom_get_data() 359 static void dc390_read_eeprom(struct pci_dev *pdev, u16 *ptr) dc390_read_eeprom() argument 364 pci_write_config_byte(pdev, 0xc0, 0); dc390_read_eeprom() 367 dc390_eeprom_prepare_read(pdev, cmd++); dc390_read_eeprom() 368 *ptr++ = dc390_eeprom_get_data(pdev); dc390_read_eeprom() 370 pci_write_config_byte(pdev, 0x80, 0); dc390_read_eeprom() 371 pci_write_config_byte(pdev, 0x80, 0); dc390_read_eeprom() 389 struct pci_dev *pdev = esp->dev; dc390_check_eeprom() local 390 dev_printk(KERN_INFO, &pdev->dev, dc390_check_eeprom() 400 static int pci_esp_probe_one(struct pci_dev *pdev, pci_esp_probe_one() argument 409 if (pci_enable_device(pdev)) { pci_esp_probe_one() 410 dev_printk(KERN_INFO, &pdev->dev, "cannot enable device\n"); pci_esp_probe_one() 414 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) { pci_esp_probe_one() 415 dev_printk(KERN_INFO, &pdev->dev, pci_esp_probe_one() 422 dev_printk(KERN_INFO, &pdev->dev, pci_esp_probe_one() 430 dev_printk(KERN_INFO, &pdev->dev, pci_esp_probe_one() 438 esp->dev = pdev; pci_esp_probe_one() 454 if (pci_request_regions(pdev, DRV_MODULE_NAME)) { pci_esp_probe_one() 455 dev_printk(KERN_ERR, &pdev->dev, pci_esp_probe_one() 460 esp->regs = pci_iomap(pdev, 0, pci_resource_len(pdev, 0)); pci_esp_probe_one() 462 dev_printk(KERN_ERR, &pdev->dev, "pci I/O map failed\n"); pci_esp_probe_one() 468 pci_set_master(pdev); pci_esp_probe_one() 470 esp->command_block = pci_alloc_consistent(pdev, 16, pci_esp_probe_one() 473 dev_printk(KERN_ERR, &pdev->dev, pci_esp_probe_one() 479 pci_set_drvdata(pdev, pep); pci_esp_probe_one() 481 err = request_irq(pdev->irq, scsi_esp_intr, IRQF_SHARED, pci_esp_probe_one() 484 dev_printk(KERN_ERR, &pdev->dev, "failed to register IRQ\n"); pci_esp_probe_one() 493 shost->irq = pdev->irq; pci_esp_probe_one() 494 shost->io_port = pci_resource_start(pdev, 0); pci_esp_probe_one() 495 shost->n_io_port = pci_resource_len(pdev, 0); pci_esp_probe_one() 501 err = scsi_esp_register(esp, &pdev->dev); pci_esp_probe_one() 508 free_irq(pdev->irq, esp); pci_esp_probe_one() 510 pci_set_drvdata(pdev, NULL); pci_esp_probe_one() 511 pci_free_consistent(pdev, 16, esp->command_block, pci_esp_probe_one() 514 pci_iounmap(pdev, esp->regs); pci_esp_probe_one() 516 pci_release_regions(pdev); pci_esp_probe_one() 522 pci_disable_device(pdev); pci_esp_probe_one() 527 static void pci_esp_remove_one(struct pci_dev *pdev) pci_esp_remove_one() argument 529 struct pci_esp_priv *pep = pci_get_drvdata(pdev); pci_esp_remove_one() 533 free_irq(pdev->irq, esp); pci_esp_remove_one() 534 pci_set_drvdata(pdev, NULL); pci_esp_remove_one() 535 pci_free_consistent(pdev, 16, esp->command_block, pci_esp_remove_one() 537 pci_iounmap(pdev, esp->regs); pci_esp_remove_one() 538 pci_release_regions(pdev); pci_esp_remove_one() 539 pci_disable_device(pdev); pci_esp_remove_one()
|
H A D | a4000t.c | 34 static int __init amiga_a4000t_scsi_probe(struct platform_device *pdev) amiga_a4000t_scsi_probe() argument 41 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); amiga_a4000t_scsi_probe() 52 dev_err(&pdev->dev, "Failed to allocate host data\n"); amiga_a4000t_scsi_probe() 67 &pdev->dev); amiga_a4000t_scsi_probe() 69 dev_err(&pdev->dev, amiga_a4000t_scsi_probe() 80 dev_err(&pdev->dev, "request_irq failed\n"); amiga_a4000t_scsi_probe() 84 platform_set_drvdata(pdev, host); amiga_a4000t_scsi_probe() 97 static int __exit amiga_a4000t_scsi_remove(struct platform_device *pdev) amiga_a4000t_scsi_remove() argument 99 struct Scsi_Host *host = platform_get_drvdata(pdev); amiga_a4000t_scsi_remove() 101 struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); amiga_a4000t_scsi_remove()
|
/linux-4.1.27/drivers/base/ |
H A D | platform.c | 43 * @pdev: platform device 56 void __weak arch_setup_pdev_archdata(struct platform_device *pdev) arch_setup_pdev_archdata() argument 189 struct platform_device pdev; member in struct:platform_object 195 * @pdev: platform device to free 200 void platform_device_put(struct platform_device *pdev) platform_device_put() argument 202 if (pdev) platform_device_put() 203 put_device(&pdev->dev); platform_device_put() 210 pdev.dev); platform_device_release() 212 of_device_node_put(&pa->pdev.dev); platform_device_release() 213 kfree(pa->pdev.dev.platform_data); platform_device_release() 214 kfree(pa->pdev.mfd_cell); platform_device_release() 215 kfree(pa->pdev.resource); platform_device_release() 216 kfree(pa->pdev.driver_override); platform_device_release() 235 pa->pdev.name = pa->name; platform_device_alloc() 236 pa->pdev.id = id; platform_device_alloc() 237 device_initialize(&pa->pdev.dev); platform_device_alloc() 238 pa->pdev.dev.release = platform_device_release; platform_device_alloc() 239 arch_setup_pdev_archdata(&pa->pdev); platform_device_alloc() 242 return pa ? &pa->pdev : NULL; platform_device_alloc() 248 * @pdev: platform device allocated by platform_device_alloc to add resources to 256 int platform_device_add_resources(struct platform_device *pdev, platform_device_add_resources() argument 267 kfree(pdev->resource); platform_device_add_resources() 268 pdev->resource = r; platform_device_add_resources() 269 pdev->num_resources = num; platform_device_add_resources() 276 * @pdev: platform device allocated by platform_device_alloc to add resources to 284 int platform_device_add_data(struct platform_device *pdev, const void *data, platform_device_add_data() argument 295 kfree(pdev->dev.platform_data); platform_device_add_data() 296 pdev->dev.platform_data = d; platform_device_add_data() 303 * @pdev: platform device we're adding 306 * separately _iff_ pdev was allocated by platform_device_alloc(). 308 int platform_device_add(struct platform_device *pdev) platform_device_add() argument 312 if (!pdev) platform_device_add() 315 if (!pdev->dev.parent) platform_device_add() 316 pdev->dev.parent = &platform_bus; platform_device_add() 318 pdev->dev.bus = &platform_bus_type; platform_device_add() 320 switch (pdev->id) { platform_device_add() 322 dev_set_name(&pdev->dev, "%s.%d", pdev->name, pdev->id); platform_device_add() 325 dev_set_name(&pdev->dev, "%s", pdev->name); platform_device_add() 336 pdev->id = ret; platform_device_add() 337 pdev->id_auto = true; platform_device_add() 338 dev_set_name(&pdev->dev, "%s.%d.auto", pdev->name, pdev->id); platform_device_add() 342 for (i = 0; i < pdev->num_resources; i++) { platform_device_add() 343 struct resource *p, *r = &pdev->resource[i]; platform_device_add() 346 r->name = dev_name(&pdev->dev); platform_device_add() 357 dev_err(&pdev->dev, "failed to claim resource %d\n", i); platform_device_add() 364 dev_name(&pdev->dev), dev_name(pdev->dev.parent)); platform_device_add() 366 ret = device_add(&pdev->dev); platform_device_add() 371 if (pdev->id_auto) { platform_device_add() 372 ida_simple_remove(&platform_devid_ida, pdev->id); platform_device_add() 373 pdev->id = PLATFORM_DEVID_AUTO; platform_device_add() 377 struct resource *r = &pdev->resource[i]; platform_device_add() 389 * @pdev: platform device we're removing 395 void platform_device_del(struct platform_device *pdev) platform_device_del() argument 399 if (pdev) { platform_device_del() 400 device_del(&pdev->dev); platform_device_del() 402 if (pdev->id_auto) { platform_device_del() 403 ida_simple_remove(&platform_devid_ida, pdev->id); platform_device_del() 404 pdev->id = PLATFORM_DEVID_AUTO; platform_device_del() 407 for (i = 0; i < pdev->num_resources; i++) { platform_device_del() 408 struct resource *r = &pdev->resource[i]; platform_device_del() 418 * @pdev: platform device we're adding 420 int platform_device_register(struct platform_device *pdev) platform_device_register() argument 422 device_initialize(&pdev->dev); platform_device_register() 423 arch_setup_pdev_archdata(pdev); platform_device_register() 424 return platform_device_add(pdev); platform_device_register() 430 * @pdev: platform device we're unregistering 436 void platform_device_unregister(struct platform_device *pdev) platform_device_unregister() argument 438 platform_device_del(pdev); platform_device_unregister() 439 platform_device_put(pdev); platform_device_unregister() 455 struct platform_device *pdev; platform_device_register_full() local 457 pdev = platform_device_alloc(pdevinfo->name, pdevinfo->id); platform_device_register_full() 458 if (!pdev) platform_device_register_full() 461 pdev->dev.parent = pdevinfo->parent; platform_device_register_full() 462 pdev->dev.fwnode = pdevinfo->fwnode; platform_device_register_full() 471 pdev->dev.dma_mask = platform_device_register_full() 472 kmalloc(sizeof(*pdev->dev.dma_mask), GFP_KERNEL); platform_device_register_full() 473 if (!pdev->dev.dma_mask) platform_device_register_full() 476 *pdev->dev.dma_mask = pdevinfo->dma_mask; platform_device_register_full() 477 pdev->dev.coherent_dma_mask = pdevinfo->dma_mask; platform_device_register_full() 480 ret = platform_device_add_resources(pdev, platform_device_register_full() 485 ret = platform_device_add_data(pdev, platform_device_register_full() 490 ret = platform_device_add(pdev); platform_device_register_full() 493 ACPI_COMPANION_SET(&pdev->dev, NULL); platform_device_register_full() 494 kfree(pdev->dev.dma_mask); platform_device_register_full() 497 platform_device_put(pdev); platform_device_register_full() 501 return pdev; platform_device_register_full() 665 struct platform_device *pdev; __platform_create_bundle() local 668 pdev = platform_device_alloc(driver->driver.name, -1); __platform_create_bundle() 669 if (!pdev) { __platform_create_bundle() 674 error = platform_device_add_resources(pdev, res, n_res); __platform_create_bundle() 678 error = platform_device_add_data(pdev, data, size); __platform_create_bundle() 682 error = platform_device_add(pdev); __platform_create_bundle() 690 return pdev; __platform_create_bundle() 693 platform_device_del(pdev); __platform_create_bundle() 695 platform_device_put(pdev); __platform_create_bundle() 710 struct platform_device *pdev = to_platform_device(dev); modalias_show() local 721 len = snprintf(buf, PAGE_SIZE, "platform:%s\n", pdev->name); modalias_show() 731 struct platform_device *pdev = to_platform_device(dev); driver_override_store() local 732 char *driver_override, *old = pdev->driver_override, *cp; driver_override_store() 746 pdev->driver_override = driver_override; driver_override_store() 749 pdev->driver_override = NULL; driver_override_store() 760 struct platform_device *pdev = to_platform_device(dev); driver_override_show() local 762 return sprintf(buf, "%s\n", pdev->driver_override); driver_override_show() 776 struct platform_device *pdev = to_platform_device(dev); platform_uevent() local 789 pdev->name); platform_uevent() 795 struct platform_device *pdev) platform_match_id() 798 if (strcmp(pdev->name, id->name) == 0) { platform_match_id() 799 pdev->id_entry = id; platform_match_id() 822 struct platform_device *pdev = to_platform_device(dev); platform_match() local 826 if (pdev->driver_override) platform_match() 827 return !strcmp(pdev->driver_override, drv->name); platform_match() 839 return platform_match_id(pdrv->id_table, pdev) != NULL; platform_match() 842 return (strcmp(pdev->name, drv->name) == 0); platform_match() 850 struct platform_device *pdev = to_platform_device(dev); platform_legacy_suspend() local 854 ret = pdrv->suspend(pdev, mesg); platform_legacy_suspend() 862 struct platform_device *pdev = to_platform_device(dev); platform_legacy_resume() local 866 ret = pdrv->resume(pdev); platform_legacy_resume() 793 platform_match_id( const struct platform_device_id *id, struct platform_device *pdev) platform_match_id() argument
|
/linux-4.1.27/drivers/mtd/onenand/ |
H A D | generic.c | 37 static int generic_onenand_probe(struct platform_device *pdev) generic_onenand_probe() argument 40 struct onenand_platform_data *pdata = dev_get_platdata(&pdev->dev); generic_onenand_probe() 41 struct resource *res = pdev->resource; generic_onenand_probe() 49 if (!request_mem_region(res->start, size, dev_name(&pdev->dev))) { generic_onenand_probe() 61 info->onenand.irq = platform_get_irq(pdev, 0); generic_onenand_probe() 63 info->mtd.name = dev_name(&pdev->dev); generic_onenand_probe() 76 platform_set_drvdata(pdev, info); generic_onenand_probe() 90 static int generic_onenand_remove(struct platform_device *pdev) generic_onenand_remove() argument 92 struct onenand_info *info = platform_get_drvdata(pdev); generic_onenand_remove() 93 struct resource *res = pdev->resource; generic_onenand_remove()
|
/linux-4.1.27/drivers/char/ |
H A D | scx200_gpio.c | 26 static struct platform_device *pdev; variable in typeref:struct:platform_device 85 /* support dev_dbg() with pdev->dev */ scx200_gpio_init() 86 pdev = platform_device_alloc(DRVNAME, 0); scx200_gpio_init() 87 if (!pdev) scx200_gpio_init() 90 rc = platform_device_add(pdev); scx200_gpio_init() 95 scx200_gpio_ops.dev = &pdev->dev; scx200_gpio_init() 105 dev_err(&pdev->dev, "SCx200 chrdev_region err: %d\n", rc); scx200_gpio_init() 115 platform_device_del(pdev); scx200_gpio_init() 117 platform_device_put(pdev); scx200_gpio_init() 128 platform_device_unregister(pdev); scx200_gpio_cleanup()
|
/linux-4.1.27/drivers/w1/slaves/ |
H A D | w1_bq27000.c | 50 struct platform_device *pdev; w1_bq27000_add_slave() local 52 pdev = platform_device_alloc("bq27000-battery", -1); w1_bq27000_add_slave() 53 if (!pdev) { w1_bq27000_add_slave() 57 ret = platform_device_add_data(pdev, w1_bq27000_add_slave() 62 pdev->dev.parent = &sl->dev; w1_bq27000_add_slave() 64 ret = platform_device_add(pdev); w1_bq27000_add_slave() 68 dev_set_drvdata(&sl->dev, pdev); w1_bq27000_add_slave() 73 platform_device_put(pdev); w1_bq27000_add_slave() 80 struct platform_device *pdev = dev_get_drvdata(&sl->dev); w1_bq27000_remove_slave() local 82 platform_device_unregister(pdev); w1_bq27000_remove_slave()
|
/linux-4.1.27/arch/arm/mach-s3c24xx/ |
H A D | h1940-bluetooth.c | 67 static int h1940bt_probe(struct platform_device *pdev) h1940bt_probe() argument 72 ret = gpio_request(S3C2410_GPH(1), dev_name(&pdev->dev)); h1940bt_probe() 74 dev_err(&pdev->dev, "could not get GPH1\n"); h1940bt_probe() 78 ret = gpio_request(H1940_LATCH_BLUETOOTH_POWER, dev_name(&pdev->dev)); h1940bt_probe() 81 dev_err(&pdev->dev, "could not get BT_POWER\n"); h1940bt_probe() 95 rfk = rfkill_alloc(DRV_NAME, &pdev->dev, RFKILL_TYPE_BLUETOOTH, h1940bt_probe() 106 platform_set_drvdata(pdev, rfk); h1940bt_probe() 116 static int h1940bt_remove(struct platform_device *pdev) h1940bt_remove() argument 118 struct rfkill *rfk = platform_get_drvdata(pdev); h1940bt_remove() 120 platform_set_drvdata(pdev, NULL); h1940bt_remove()
|
/linux-4.1.27/drivers/rtc/ |
H A D | rtc-mxc.c | 111 struct platform_device *pdev = to_platform_device(dev); get_alarm_or_time() local 112 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); get_alarm_or_time() 141 struct platform_device *pdev = to_platform_device(dev); set_alarm_or_time() local 142 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); set_alarm_or_time() 178 struct platform_device *pdev = to_platform_device(dev); rtc_update_alarm() local 179 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); rtc_update_alarm() 192 struct platform_device *pdev = to_platform_device(dev); mxc_rtc_irq_enable() local 193 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); mxc_rtc_irq_enable() 212 struct platform_device *pdev = dev_id; mxc_rtc_interrupt() local 213 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); mxc_rtc_interrupt() 228 mxc_rtc_irq_enable(&pdev->dev, RTC_ALM_BIT, 0); mxc_rtc_interrupt() 248 struct platform_device *pdev = to_platform_device(dev); mxc_rtc_release() local 249 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); mxc_rtc_release() 291 struct platform_device *pdev = to_platform_device(dev); mxc_rtc_set_mmss() local 292 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); mxc_rtc_set_mmss() 320 struct platform_device *pdev = to_platform_device(dev); mxc_rtc_read_alarm() local 321 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); mxc_rtc_read_alarm() 335 struct platform_device *pdev = to_platform_device(dev); mxc_rtc_set_alarm() local 336 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); mxc_rtc_set_alarm() 356 static int mxc_rtc_probe(struct platform_device *pdev) mxc_rtc_probe() argument 365 pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); mxc_rtc_probe() 369 pdata->devtype = pdev->id_entry->driver_data; mxc_rtc_probe() 371 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); mxc_rtc_probe() 372 pdata->ioaddr = devm_ioremap_resource(&pdev->dev, res); mxc_rtc_probe() 376 pdata->clk = devm_clk_get(&pdev->dev, NULL); mxc_rtc_probe() 378 dev_err(&pdev->dev, "unable to get clock!\n"); mxc_rtc_probe() 395 dev_err(&pdev->dev, "rtc clock is not valid (%lu)\n", rate); mxc_rtc_probe() 403 dev_err(&pdev->dev, "hardware module can't be enabled!\n"); mxc_rtc_probe() 408 platform_set_drvdata(pdev, pdata); mxc_rtc_probe() 411 pdata->irq = platform_get_irq(pdev, 0); mxc_rtc_probe() 414 devm_request_irq(&pdev->dev, pdata->irq, mxc_rtc_interrupt, mxc_rtc_probe() 415 IRQF_SHARED, pdev->name, pdev) < 0) { mxc_rtc_probe() 416 dev_warn(&pdev->dev, "interrupt not available.\n"); mxc_rtc_probe() 421 device_init_wakeup(&pdev->dev, 1); mxc_rtc_probe() 423 rtc = devm_rtc_device_register(&pdev->dev, pdev->name, &mxc_rtc_ops, mxc_rtc_probe() 440 static int mxc_rtc_remove(struct platform_device *pdev) mxc_rtc_remove() argument 442 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); mxc_rtc_remove()
|
H A D | rtc-pcap.c | 46 struct platform_device *pdev = to_platform_device(dev); pcap_rtc_read_alarm() local 47 struct pcap_rtc *pcap_rtc = platform_get_drvdata(pdev); pcap_rtc_read_alarm() 66 struct platform_device *pdev = to_platform_device(dev); pcap_rtc_set_alarm() local 67 struct pcap_rtc *pcap_rtc = platform_get_drvdata(pdev); pcap_rtc_set_alarm() 85 struct platform_device *pdev = to_platform_device(dev); pcap_rtc_read_time() local 86 struct pcap_rtc *pcap_rtc = platform_get_drvdata(pdev); pcap_rtc_read_time() 103 struct platform_device *pdev = to_platform_device(dev); pcap_rtc_set_mmss() local 104 struct pcap_rtc *pcap_rtc = platform_get_drvdata(pdev); pcap_rtc_set_mmss() 118 struct platform_device *pdev = to_platform_device(dev); pcap_rtc_irq_enable() local 119 struct pcap_rtc *pcap_rtc = platform_get_drvdata(pdev); pcap_rtc_irq_enable() 142 static int __init pcap_rtc_probe(struct platform_device *pdev) pcap_rtc_probe() argument 148 pcap_rtc = devm_kzalloc(&pdev->dev, sizeof(struct pcap_rtc), pcap_rtc_probe() 153 pcap_rtc->pcap = dev_get_drvdata(pdev->dev.parent); pcap_rtc_probe() 155 platform_set_drvdata(pdev, pcap_rtc); pcap_rtc_probe() 157 pcap_rtc->rtc = devm_rtc_device_register(&pdev->dev, "pcap", pcap_rtc_probe() 165 err = devm_request_irq(&pdev->dev, timer_irq, pcap_rtc_irq, 0, pcap_rtc_probe() 170 err = devm_request_irq(&pdev->dev, alarm_irq, pcap_rtc_irq, 0, pcap_rtc_probe() 178 static int __exit pcap_rtc_remove(struct platform_device *pdev) pcap_rtc_remove() argument
|
/linux-4.1.27/drivers/usb/c67x00/ |
H A D | c67x00-drv.c | 111 dev_warn(&c67x00->pdev->dev, "Not all interrupts handled! " c67x00_irq() 119 static int c67x00_drv_probe(struct platform_device *pdev) c67x00_drv_probe() argument 126 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); c67x00_drv_probe() 130 res2 = platform_get_resource(pdev, IORESOURCE_IRQ, 0); c67x00_drv_probe() 134 pdata = dev_get_platdata(&pdev->dev); c67x00_drv_probe() 143 pdev->name)) { c67x00_drv_probe() 144 dev_err(&pdev->dev, "Memory region busy\n"); c67x00_drv_probe() 150 dev_err(&pdev->dev, "Unable to map HPI registers\n"); c67x00_drv_probe() 157 c67x00->pdata = dev_get_platdata(&pdev->dev); c67x00_drv_probe() 158 c67x00->pdev = pdev; c67x00_drv_probe() 163 ret = request_irq(res2->start, c67x00_irq, 0, pdev->name, c67x00); c67x00_drv_probe() 165 dev_err(&pdev->dev, "Cannot claim IRQ\n"); c67x00_drv_probe() 171 dev_err(&pdev->dev, "Device reset failed\n"); c67x00_drv_probe() 178 platform_set_drvdata(pdev, c67x00); c67x00_drv_probe() 194 static int c67x00_drv_remove(struct platform_device *pdev) c67x00_drv_remove() argument 196 struct c67x00_device *c67x00 = platform_get_drvdata(pdev); c67x00_drv_remove() 205 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); c67x00_drv_remove() 211 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); c67x00_drv_remove()
|
/linux-4.1.27/arch/powerpc/kernel/ |
H A D | eeh_sysfs.c | 43 struct pci_dev *pdev = to_pci_dev(dev); \ 44 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); \ 60 struct pci_dev *pdev = to_pci_dev(dev); eeh_pe_state_show() local 61 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); eeh_pe_state_show() 76 struct pci_dev *pdev = to_pci_dev(dev); eeh_pe_state_store() local 77 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); eeh_pe_state_store() 94 void eeh_sysfs_add_device(struct pci_dev *pdev) eeh_sysfs_add_device() argument 96 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); eeh_sysfs_add_device() 105 rc += device_create_file(&pdev->dev, &dev_attr_eeh_mode); eeh_sysfs_add_device() 106 rc += device_create_file(&pdev->dev, &dev_attr_eeh_config_addr); eeh_sysfs_add_device() 107 rc += device_create_file(&pdev->dev, &dev_attr_eeh_pe_config_addr); eeh_sysfs_add_device() 108 rc += device_create_file(&pdev->dev, &dev_attr_eeh_pe_state); eeh_sysfs_add_device() 116 void eeh_sysfs_remove_device(struct pci_dev *pdev) eeh_sysfs_remove_device() argument 118 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); eeh_sysfs_remove_device() 124 if (!pdev->dev.kobj.sd) { eeh_sysfs_remove_device() 130 device_remove_file(&pdev->dev, &dev_attr_eeh_mode); eeh_sysfs_remove_device() 131 device_remove_file(&pdev->dev, &dev_attr_eeh_config_addr); eeh_sysfs_remove_device() 132 device_remove_file(&pdev->dev, &dev_attr_eeh_pe_config_addr); eeh_sysfs_remove_device() 133 device_remove_file(&pdev->dev, &dev_attr_eeh_pe_state); eeh_sysfs_remove_device()
|
/linux-4.1.27/drivers/net/wireless/rt2x00/ |
H A D | rt2x00soc.c | 47 struct platform_device *pdev = to_platform_device(rt2x00dev->dev); rt2x00soc_alloc_reg() local 50 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); rt2x00soc_alloc_reg() 75 int rt2x00soc_probe(struct platform_device *pdev, const struct rt2x00_ops *ops) rt2x00soc_probe() argument 87 platform_set_drvdata(pdev, hw); rt2x00soc_probe() 90 rt2x00dev->dev = &pdev->dev; rt2x00soc_probe() 93 rt2x00dev->irq = platform_get_irq(pdev, 0); rt2x00soc_probe() 94 rt2x00dev->name = pdev->dev.driver->name; rt2x00soc_probe() 118 int rt2x00soc_remove(struct platform_device *pdev) rt2x00soc_remove() argument 120 struct ieee80211_hw *hw = platform_get_drvdata(pdev); rt2x00soc_remove() 135 int rt2x00soc_suspend(struct platform_device *pdev, pm_message_t state) rt2x00soc_suspend() argument 137 struct ieee80211_hw *hw = platform_get_drvdata(pdev); rt2x00soc_suspend() 144 int rt2x00soc_resume(struct platform_device *pdev) rt2x00soc_resume() argument 146 struct ieee80211_hw *hw = platform_get_drvdata(pdev); rt2x00soc_resume()
|
/linux-4.1.27/drivers/gpu/drm/cirrus/ |
H A D | cirrus_drv.c | 44 static int cirrus_kick_out_firmware_fb(struct pci_dev *pdev) cirrus_kick_out_firmware_fb() argument 53 ap->ranges[0].base = pci_resource_start(pdev, 0); cirrus_kick_out_firmware_fb() 54 ap->ranges[0].size = pci_resource_len(pdev, 0); cirrus_kick_out_firmware_fb() 57 primary = pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW; cirrus_kick_out_firmware_fb() 65 static int cirrus_pci_probe(struct pci_dev *pdev, cirrus_pci_probe() argument 70 ret = cirrus_kick_out_firmware_fb(pdev); cirrus_pci_probe() 74 return drm_get_pci_dev(pdev, ent, &driver); cirrus_pci_probe() 77 static void cirrus_pci_remove(struct pci_dev *pdev) cirrus_pci_remove() argument 79 struct drm_device *dev = pci_get_drvdata(pdev); cirrus_pci_remove() 87 struct pci_dev *pdev = to_pci_dev(dev); cirrus_pm_suspend() local 88 struct drm_device *drm_dev = pci_get_drvdata(pdev); cirrus_pm_suspend() 104 struct pci_dev *pdev = to_pci_dev(dev); cirrus_pm_resume() local 105 struct drm_device *drm_dev = pci_get_drvdata(pdev); cirrus_pm_resume()
|
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/subdev/bios/ |
H A D | shadowpci.c | 28 struct pci_dev *pdev; member in struct:priv 48 pci_unmap_rom(priv->pdev, priv->rom); pcirom_fini() 49 pci_disable_rom(priv->pdev); pcirom_fini() 56 struct pci_dev *pdev = nv_device(bios)->pdev; pcirom_init() local 60 if (!(ret = pci_enable_rom(pdev))) { pcirom_init() 64 (priv->rom = pci_map_rom(pdev, &priv->size))) { pcirom_init() 65 priv->pdev = pdev; pcirom_init() 70 pci_disable_rom(pdev); pcirom_init() 88 struct pci_dev *pdev = nv_device(bios)->pdev; platform_init() local 94 (priv->rom = pci_platform_rom(pdev, &priv->size))) platform_init()
|
/linux-4.1.27/drivers/watchdog/ |
H A D | intel-mid_wdt.c | 114 static int mid_wdt_probe(struct platform_device *pdev) mid_wdt_probe() argument 117 struct intel_mid_wdt_pdata *pdata = pdev->dev.platform_data; mid_wdt_probe() 121 dev_err(&pdev->dev, "missing platform data\n"); mid_wdt_probe() 126 ret = pdata->probe(pdev); mid_wdt_probe() 131 wdt_dev = devm_kzalloc(&pdev->dev, sizeof(*wdt_dev), GFP_KERNEL); mid_wdt_probe() 141 watchdog_set_drvdata(wdt_dev, &pdev->dev); mid_wdt_probe() 142 platform_set_drvdata(pdev, wdt_dev); mid_wdt_probe() 144 ret = devm_request_irq(&pdev->dev, pdata->irq, mid_wdt_irq, mid_wdt_probe() 148 dev_err(&pdev->dev, "error requesting warning irq %d\n", mid_wdt_probe() 155 dev_err(&pdev->dev, "error registering watchdog device\n"); mid_wdt_probe() 159 dev_info(&pdev->dev, "Intel MID watchdog device probed\n"); mid_wdt_probe() 164 static int mid_wdt_remove(struct platform_device *pdev) mid_wdt_remove() argument 166 struct watchdog_device *wd = platform_get_drvdata(pdev); mid_wdt_remove()
|
/linux-4.1.27/net/rfkill/ |
H A D | rfkill-regulator.c | 60 static int rfkill_regulator_probe(struct platform_device *pdev) rfkill_regulator_probe() argument 62 struct rfkill_regulator_platform_data *pdata = pdev->dev.platform_data; rfkill_regulator_probe() 69 dev_err(&pdev->dev, "no platform data\n"); rfkill_regulator_probe() 74 dev_err(&pdev->dev, "invalid name or type in platform data\n"); rfkill_regulator_probe() 78 vcc = regulator_get_exclusive(&pdev->dev, "vrfkill"); rfkill_regulator_probe() 80 dev_err(&pdev->dev, "Cannot get vcc for %s\n", pdata->name); rfkill_regulator_probe() 91 rf_kill = rfkill_alloc(pdata->name, &pdev->dev, rfkill_regulator_probe() 100 dev_dbg(&pdev->dev, "Regulator already enabled\n"); rfkill_regulator_probe() 108 dev_err(&pdev->dev, "Cannot register rfkill device\n"); rfkill_regulator_probe() 112 platform_set_drvdata(pdev, rfkill_data); rfkill_regulator_probe() 113 dev_info(&pdev->dev, "%s initialized\n", pdata->name); rfkill_regulator_probe() 127 static int rfkill_regulator_remove(struct platform_device *pdev) rfkill_regulator_remove() argument 129 struct rfkill_regulator_data *rfkill_data = platform_get_drvdata(pdev); rfkill_regulator_remove()
|
/linux-4.1.27/drivers/irqchip/ |
H A D | irq-renesas-irqc.c | 67 struct platform_device *pdev; member in struct:irqc_priv 75 dev_dbg(&i->p->pdev->dev, "%s (%d:%d:%d)\n", irqc_dbg() 176 static int irqc_probe(struct platform_device *pdev) irqc_probe() argument 178 struct renesas_irqc_config *pdata = pdev->dev.platform_data; irqc_probe() 183 const char *name = dev_name(&pdev->dev); irqc_probe() 189 dev_err(&pdev->dev, "failed to allocate driver data\n"); irqc_probe() 198 p->pdev = pdev; irqc_probe() 199 platform_set_drvdata(pdev, p); irqc_probe() 201 p->clk = devm_clk_get(&pdev->dev, NULL); irqc_probe() 203 dev_warn(&pdev->dev, "unable to get clock\n"); irqc_probe() 207 pm_runtime_enable(&pdev->dev); irqc_probe() 208 pm_runtime_get_sync(&pdev->dev); irqc_probe() 211 io = platform_get_resource(pdev, IORESOURCE_MEM, 0); irqc_probe() 213 dev_err(&pdev->dev, "not enough IOMEM resources\n"); irqc_probe() 220 irq = platform_get_resource(pdev, IORESOURCE_IRQ, k); irqc_probe() 230 dev_err(&pdev->dev, "not enough IRQ resources\n"); irqc_probe() 238 dev_err(&pdev->dev, "failed to remap IOMEM\n"); irqc_probe() 253 p->irq_domain = irq_domain_add_simple(pdev->dev.of_node, irqc_probe() 259 dev_err(&pdev->dev, "cannot initialize irq domain\n"); irqc_probe() 267 dev_err(&pdev->dev, "failed to request IRQ\n"); irqc_probe() 273 dev_info(&pdev->dev, "driving %d irqs\n", p->number_of_irqs); irqc_probe() 278 dev_warn(&pdev->dev, "irq base mismatch (%d/%d)\n", irqc_probe() 291 pm_runtime_put(&pdev->dev); irqc_probe() 292 pm_runtime_disable(&pdev->dev); irqc_probe() 298 static int irqc_remove(struct platform_device *pdev) irqc_remove() argument 300 struct irqc_priv *p = platform_get_drvdata(pdev); irqc_remove() 308 pm_runtime_put(&pdev->dev); irqc_remove() 309 pm_runtime_disable(&pdev->dev); irqc_remove()
|
/linux-4.1.27/drivers/net/can/c_can/ |
H A D | c_can_pci.c | 114 static int c_can_pci_probe(struct pci_dev *pdev, c_can_pci_probe() argument 123 ret = pci_enable_device(pdev); c_can_pci_probe() 125 dev_err(&pdev->dev, "pci_enable_device FAILED\n"); c_can_pci_probe() 129 ret = pci_request_regions(pdev, KBUILD_MODNAME); c_can_pci_probe() 131 dev_err(&pdev->dev, "pci_request_regions FAILED\n"); c_can_pci_probe() 135 ret = pci_enable_msi(pdev); c_can_pci_probe() 137 dev_info(&pdev->dev, "MSI enabled\n"); c_can_pci_probe() 138 pci_set_master(pdev); c_can_pci_probe() 141 addr = pci_iomap(pdev, c_can_pci_data->bar, c_can_pci_probe() 142 pci_resource_len(pdev, c_can_pci_data->bar)); c_can_pci_probe() 144 dev_err(&pdev->dev, c_can_pci_probe() 159 pci_set_drvdata(pdev, dev); c_can_pci_probe() 160 SET_NETDEV_DEV(dev, &pdev->dev); c_can_pci_probe() 162 dev->irq = pdev->irq; c_can_pci_probe() 166 dev_err(&pdev->dev, "no clock frequency defined\n"); c_can_pci_probe() 214 dev_err(&pdev->dev, "registering %s failed (err=%d)\n", c_can_pci_probe() 219 dev_dbg(&pdev->dev, "%s device registered (regs=%p, irq=%d)\n", c_can_pci_probe() 227 pci_iounmap(pdev, addr); c_can_pci_probe() 229 pci_disable_msi(pdev); c_can_pci_probe() 230 pci_clear_master(pdev); c_can_pci_probe() 231 pci_release_regions(pdev); c_can_pci_probe() 233 pci_disable_device(pdev); c_can_pci_probe() 238 static void c_can_pci_remove(struct pci_dev *pdev) c_can_pci_remove() argument 240 struct net_device *dev = pci_get_drvdata(pdev); c_can_pci_remove() 247 pci_iounmap(pdev, priv->base); c_can_pci_remove() 248 pci_disable_msi(pdev); c_can_pci_remove() 249 pci_clear_master(pdev); c_can_pci_remove() 250 pci_release_regions(pdev); c_can_pci_remove() 251 pci_disable_device(pdev); c_can_pci_remove()
|
/linux-4.1.27/drivers/power/ |
H A D | jz4740-battery.c | 35 struct platform_device *pdev; member in struct:jz_battery 80 battery->cell->enable(battery->pdev); jz_battery_read_voltage() 97 battery->cell->disable(battery->pdev); jz_battery_read_voltage() 242 static int jz_battery_probe(struct platform_device *pdev) jz_battery_probe() argument 245 struct jz_battery_platform_data *pdata = pdev->dev.parent->platform_data; jz_battery_probe() 252 dev_err(&pdev->dev, "No platform_data supplied\n"); jz_battery_probe() 256 jz_battery = devm_kzalloc(&pdev->dev, sizeof(*jz_battery), GFP_KERNEL); jz_battery_probe() 258 dev_err(&pdev->dev, "Failed to allocate driver structure\n"); jz_battery_probe() 262 jz_battery->cell = mfd_get_cell(pdev); jz_battery_probe() 264 jz_battery->irq = platform_get_irq(pdev, 0); jz_battery_probe() 266 dev_err(&pdev->dev, "Failed to get platform irq: %d\n", ret); jz_battery_probe() 270 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); jz_battery_probe() 272 jz_battery->base = devm_ioremap_resource(&pdev->dev, mem); jz_battery_probe() 289 jz_battery->pdev = pdev; jz_battery_probe() 296 ret = request_irq(jz_battery->irq, jz_battery_irq_handler, 0, pdev->name, jz_battery_probe() 299 dev_err(&pdev->dev, "Failed to request irq %d\n", ret); jz_battery_probe() 305 ret = gpio_request(pdata->gpio_charge, dev_name(&pdev->dev)); jz_battery_probe() 307 dev_err(&pdev->dev, "charger state gpio request failed.\n"); jz_battery_probe() 312 dev_err(&pdev->dev, "charger state gpio set direction failed.\n"); jz_battery_probe() 322 dev_name(&pdev->dev), jz_battery); jz_battery_probe() 324 dev_err(&pdev->dev, "Failed to request charge irq: %d\n", ret); jz_battery_probe() 333 jz4740_adc_set_config(pdev->dev.parent, JZ_ADC_CONFIG_BAT_MB, jz_battery_probe() 336 jz4740_adc_set_config(pdev->dev.parent, JZ_ADC_CONFIG_BAT_MB, 0); jz_battery_probe() 338 jz_battery->battery = power_supply_register(&pdev->dev, battery_desc, jz_battery_probe() 341 dev_err(&pdev->dev, "power supply battery register failed.\n"); jz_battery_probe() 346 platform_set_drvdata(pdev, jz_battery); jz_battery_probe() 362 static int jz_battery_remove(struct platform_device *pdev) jz_battery_remove() argument 364 struct jz_battery *jz_battery = platform_get_drvdata(pdev); jz_battery_remove()
|
/linux-4.1.27/drivers/net/ethernet/intel/i40e/ |
H A D | i40e_debugfs.c | 46 dev_info(&pf->pdev->dev, "%d: bad seid\n", seid); i40e_dbg_find_vsi() 66 dev_info(&pf->pdev->dev, "%d: bad seid\n", seid); i40e_dbg_find_veb() 168 dev_info(&pf->pdev->dev, "bad seid value\n"); i40e_dbg_dump_write() 176 dev_info(&pf->pdev->dev, "debug buffer freed\n"); i40e_dbg_dump_write() 203 dev_info(&pf->pdev->dev, i40e_dbg_dump_write() 273 dev_info(&pf->pdev->dev, i40e_dbg_dump_write() 293 dev_info(&pf->pdev->dev, i40e_dbg_dump_write() 302 dev_info(&pf->pdev->dev, "unknown seid %ld\n", seid); i40e_dbg_dump_write() 377 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 381 dev_info(&pf->pdev->dev, "vsi seid %d\n", seid); i40e_dbg_dump_vsi_seid() 383 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 387 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 389 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 394 dev_info(&pf->pdev->dev, "MAC address: %pM SAN MAC: %pM Port MAC: %pM\n", i40e_dbg_dump_vsi_seid() 399 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 405 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 411 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 417 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 421 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 426 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 431 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 436 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 440 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 444 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 450 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 456 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 460 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 465 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 470 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 475 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 479 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 483 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 493 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 496 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 501 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 506 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 511 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 517 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 522 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 527 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 531 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 541 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 544 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 549 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 554 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 557 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 563 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 568 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 573 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 577 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 581 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 586 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 592 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 595 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 598 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 601 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 604 dev_info(&pf->pdev->dev, " type = %i\n", vsi->type); i40e_dbg_dump_vsi_seid() 605 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 608 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 611 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 614 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 618 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 622 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 625 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 629 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 635 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 641 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 647 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 653 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 656 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 659 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 665 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 671 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 674 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 683 dev_info(&pf->pdev->dev, " PF = %p\n", vsi->back); i40e_dbg_dump_vsi_seid() 684 dev_info(&pf->pdev->dev, " idx = %d\n", vsi->idx); i40e_dbg_dump_vsi_seid() 685 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 689 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 695 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 699 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 707 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 712 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 716 dev_info(&pf->pdev->dev, i40e_dbg_dump_vsi_seid() 720 dev_info(&pf->pdev->dev, " fcoe_stats: ddp_count = %llu\n", i40e_dbg_dump_vsi_seid() 738 dev_driver_string(&pf->pdev->dev), i40e_dbg_dump_aq_desc() 739 dev_name(&pf->pdev->dev)); i40e_dbg_dump_aq_desc() 742 dev_info(&pf->pdev->dev, "AdminQ Tx Ring\n"); i40e_dbg_dump_aq_desc() 746 dev_info(&pf->pdev->dev, i40e_dbg_dump_aq_desc() 754 dev_info(&pf->pdev->dev, "AdminQ Rx Ring\n"); i40e_dbg_dump_aq_desc() 758 dev_info(&pf->pdev->dev, i40e_dbg_dump_aq_desc() 787 dev_info(&pf->pdev->dev, "vsi %d not found\n", vsi_seid); i40e_dbg_dump_desc() 791 dev_info(&pf->pdev->dev, "ring %d not found\n", ring_id); i40e_dbg_dump_desc() 795 dev_info(&pf->pdev->dev, i40e_dbg_dump_desc() 808 dev_info(&pf->pdev->dev, "vsi = %02i %s ring = %02i\n", i40e_dbg_dump_desc() 813 dev_info(&pf->pdev->dev, i40e_dbg_dump_desc() 820 dev_info(&pf->pdev->dev, i40e_dbg_dump_desc() 826 dev_info(&pf->pdev->dev, i40e_dbg_dump_desc() 835 dev_info(&pf->pdev->dev, i40e_dbg_dump_desc() 841 dev_info(&pf->pdev->dev, i40e_dbg_dump_desc() 848 dev_info(&pf->pdev->dev, i40e_dbg_dump_desc() 854 dev_info(&pf->pdev->dev, i40e_dbg_dump_desc() 861 dev_info(&pf->pdev->dev, "dump desc rx/tx <vsi_seid> <ring_id> [<desc_n>]\n"); i40e_dbg_dump_desc() 878 dev_info(&pf->pdev->dev, "dump vsi[%d]: %d\n", i40e_dbg_dump_vsi_no_seid() 890 dev_info(&pf->pdev->dev, " ethstats:\n"); i40e_dbg_dump_eth_stats() 891 dev_info(&pf->pdev->dev, i40e_dbg_dump_eth_stats() 894 dev_info(&pf->pdev->dev, i40e_dbg_dump_eth_stats() 897 dev_info(&pf->pdev->dev, i40e_dbg_dump_eth_stats() 900 dev_info(&pf->pdev->dev, i40e_dbg_dump_eth_stats() 903 dev_info(&pf->pdev->dev, i40e_dbg_dump_eth_stats() 919 dev_info(&pf->pdev->dev, "%d: bad seid\n", seid); i40e_dbg_dump_veb_seid() 925 dev_info(&pf->pdev->dev, "can't find veb %d\n", seid); i40e_dbg_dump_veb_seid() 928 dev_info(&pf->pdev->dev, i40e_dbg_dump_veb_seid() 966 dev_info(&pf->pdev->dev, "requesting a PF reset\n"); i40e_dbg_cmd_fd_ctrl() 1019 dev_info(&pf->pdev->dev, "add VSI %d: bad vsi seid\n", i40e_dbg_command_write() 1035 dev_info(&pf->pdev->dev, "added VSI %d to relay %d\n", i40e_dbg_command_write() 1038 dev_info(&pf->pdev->dev, "'%s' failed\n", cmd_buf); i40e_dbg_command_write() 1044 dev_info(&pf->pdev->dev, "del VSI %d: seid not found\n", i40e_dbg_command_write() 1049 dev_info(&pf->pdev->dev, "deleting VSI %d\n", vsi_seid); i40e_dbg_command_write() 1058 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1063 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1071 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1081 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1090 dev_info(&pf->pdev->dev, "added relay %d\n", veb->seid); i40e_dbg_command_write() 1092 dev_info(&pf->pdev->dev, "add relay failed\n"); i40e_dbg_command_write() 1098 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1103 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1113 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1118 dev_info(&pf->pdev->dev, "deleting relay %d\n", veb_seid); i40e_dbg_command_write() 1135 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1143 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1151 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1155 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1172 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1180 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1188 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1192 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1203 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1210 dev_info(&pf->pdev->dev, "add pvid: VSI %d not found\n", i40e_dbg_command_write() 1218 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1222 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1230 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1238 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1244 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1278 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1280 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1282 dev_info(&pf->pdev->dev, "dump desc aq\n"); i40e_dbg_command_write() 1285 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1287 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1289 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1291 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1293 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1316 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1323 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1330 dev_info(&pf->pdev->dev, "port bw: tc_bw_share=%d tc_bw_limit=%d\n", i40e_dbg_command_write() 1338 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1340 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1345 dev_info(&pf->pdev->dev, "port ets_cfg: %d prio_tc=%d tcbw=%d tctsa=%d\n", i40e_dbg_command_write() 1351 dev_info(&pf->pdev->dev, "port ets_rec: %d prio_tc=%d tcbw=%d tctsa=%d\n", i40e_dbg_command_write() 1356 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1360 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1363 dev_info(&pf->pdev->dev, "port app_table: %d prio=%d selector=%d protocol=0x%x\n", i40e_dbg_command_write() 1369 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1374 dev_info(&pf->pdev->dev, "remote port ets_cfg: %d prio_tc=%d tcbw=%d tctsa=%d\n", i40e_dbg_command_write() 1380 dev_info(&pf->pdev->dev, "remote port ets_rec: %d prio_tc=%d tcbw=%d tctsa=%d\n", i40e_dbg_command_write() 1385 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1391 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1395 dev_info(&pf->pdev->dev, "remote port app_table: %d prio=%d selector=%d protocol=0x%x\n", i40e_dbg_command_write() 1412 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1417 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1429 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1436 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1445 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1447 dev_info(&pf->pdev->dev, "dump switch\n"); i40e_dbg_command_write() 1448 dev_info(&pf->pdev->dev, "dump vsi [seid]\n"); i40e_dbg_command_write() 1449 dev_info(&pf->pdev->dev, "dump reset stats\n"); i40e_dbg_command_write() 1450 dev_info(&pf->pdev->dev, "dump port\n"); i40e_dbg_command_write() 1451 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1461 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1466 dev_info(&pf->pdev->dev, "set msg_enable = 0x%08x\n", i40e_dbg_command_write() 1469 dev_info(&pf->pdev->dev, "msg_enable = 0x%08x\n", i40e_dbg_command_write() 1473 dev_info(&pf->pdev->dev, "debugfs: forcing PFR\n"); i40e_dbg_command_write() 1477 dev_info(&pf->pdev->dev, "debugfs: forcing CoreR\n"); i40e_dbg_command_write() 1481 dev_info(&pf->pdev->dev, "debugfs: forcing GlobR\n"); i40e_dbg_command_write() 1485 dev_info(&pf->pdev->dev, "debugfs: forcing EMPR\n"); i40e_dbg_command_write() 1493 dev_info(&pf->pdev->dev, "read <reg>\n"); i40e_dbg_command_write() 1499 dev_info(&pf->pdev->dev, "read reg address 0x%08x too large\n", i40e_dbg_command_write() 1505 dev_info(&pf->pdev->dev, "read: 0x%08x = 0x%08x\n", i40e_dbg_command_write() 1512 dev_info(&pf->pdev->dev, "write <reg> <value>\n"); i40e_dbg_command_write() 1518 dev_info(&pf->pdev->dev, "write reg address 0x%08x too large\n", i40e_dbg_command_write() 1524 dev_info(&pf->pdev->dev, "write: 0x%08x = 0x%08x\n", i40e_dbg_command_write() 1533 dev_info(&pf->pdev->dev, "vsi clear stats called for all vsi's\n"); i40e_dbg_command_write() 1537 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1543 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1547 dev_info(&pf->pdev->dev, "clear_stats vsi [seid]\n"); i40e_dbg_command_write() 1552 dev_info(&pf->pdev->dev, "port stats cleared\n"); i40e_dbg_command_write() 1554 dev_info(&pf->pdev->dev, "clear port stats not allowed on this port partition\n"); i40e_dbg_command_write() 1557 dev_info(&pf->pdev->dev, "clear_stats vsi [seid] or clear_stats port\n"); i40e_dbg_command_write() 1576 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1585 dev_info(&pf->pdev->dev, "AQ command sent Status : Success\n"); i40e_dbg_command_write() 1587 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1591 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1595 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1625 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1646 dev_info(&pf->pdev->dev, "AQ command sent Status : Success\n"); i40e_dbg_command_write() 1648 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1652 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1656 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1711 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1733 dev_info(&pf->pdev->dev, "FD raw packet dump\n"); i40e_dbg_command_write() 1739 dev_info(&pf->pdev->dev, "Filter command send Status : Success\n"); i40e_dbg_command_write() 1741 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1753 dev_info(&pf->pdev->dev, "FD current total filter count for this interface: %d\n", i40e_dbg_command_write() 1760 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1771 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1788 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1796 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1819 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1826 dev_info(&pf->pdev->dev, "LLDP MIB (local)\n"); i40e_dbg_command_write() 1846 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1853 dev_info(&pf->pdev->dev, "LLDP MIB (remote)\n"); i40e_dbg_command_write() 1864 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1874 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1899 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1917 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1928 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1932 dev_info(&pf->pdev->dev, i40e_dbg_command_write() 1943 dev_info(&pf->pdev->dev, "unknown command '%s'\n", cmd_buf); i40e_dbg_command_write() 1944 dev_info(&pf->pdev->dev, "available commands\n"); i40e_dbg_command_write() 1945 dev_info(&pf->pdev->dev, " add vsi [relay_seid]\n"); i40e_dbg_command_write() 1946 dev_info(&pf->pdev->dev, " del vsi [vsi_seid]\n"); i40e_dbg_command_write() 1947 dev_info(&pf->pdev->dev, " add relay <uplink_seid> <vsi_seid>\n"); i40e_dbg_command_write() 1948 dev_info(&pf->pdev->dev, " del relay <relay_seid>\n"); i40e_dbg_command_write() 1949 dev_info(&pf->pdev->dev, " add macaddr <vsi_seid> <aa:bb:cc:dd:ee:ff> [vlan]\n"); i40e_dbg_command_write() 1950 dev_info(&pf->pdev->dev, " del macaddr <vsi_seid> <aa:bb:cc:dd:ee:ff> [vlan]\n"); i40e_dbg_command_write() 1951 dev_info(&pf->pdev->dev, " add pvid <vsi_seid> <vid>\n"); i40e_dbg_command_write() 1952 dev_info(&pf->pdev->dev, " del pvid <vsi_seid>\n"); i40e_dbg_command_write() 1953 dev_info(&pf->pdev->dev, " dump switch\n"); i40e_dbg_command_write() 1954 dev_info(&pf->pdev->dev, " dump vsi [seid]\n"); i40e_dbg_command_write() 1955 dev_info(&pf->pdev->dev, " dump desc tx <vsi_seid> <ring_id> [<desc_n>]\n"); i40e_dbg_command_write() 1956 dev_info(&pf->pdev->dev, " dump desc rx <vsi_seid> <ring_id> [<desc_n>]\n"); i40e_dbg_command_write() 1957 dev_info(&pf->pdev->dev, " dump desc aq\n"); i40e_dbg_command_write() 1958 dev_info(&pf->pdev->dev, " dump reset stats\n"); i40e_dbg_command_write() 1959 dev_info(&pf->pdev->dev, " dump debug fwdata <cluster_id> <table_id> <index>\n"); i40e_dbg_command_write() 1960 dev_info(&pf->pdev->dev, " msg_enable [level]\n"); i40e_dbg_command_write() 1961 dev_info(&pf->pdev->dev, " read <reg>\n"); i40e_dbg_command_write() 1962 dev_info(&pf->pdev->dev, " write <reg> <value>\n"); i40e_dbg_command_write() 1963 dev_info(&pf->pdev->dev, " clear_stats vsi [seid]\n"); i40e_dbg_command_write() 1964 dev_info(&pf->pdev->dev, " clear_stats port\n"); i40e_dbg_command_write() 1965 dev_info(&pf->pdev->dev, " pfr\n"); i40e_dbg_command_write() 1966 dev_info(&pf->pdev->dev, " corer\n"); i40e_dbg_command_write() 1967 dev_info(&pf->pdev->dev, " globr\n"); i40e_dbg_command_write() 1968 dev_info(&pf->pdev->dev, " send aq_cmd <flags> <opcode> <datalen> <retval> <cookie_h> <cookie_l> <param0> <param1> <param2> <param3>\n"); i40e_dbg_command_write() 1969 dev_info(&pf->pdev->dev, " send indirect aq_cmd <flags> <opcode> <datalen> <retval> <cookie_h> <cookie_l> <param0> <param1> <param2> <param3> <buffer_len>\n"); i40e_dbg_command_write() 1970 dev_info(&pf->pdev->dev, " add fd_filter <dest q_index> <flex_off> <pctype> <dest_vsi> <dest_ctl> <fd_status> <cnt_index> <fd_id> <packet_len> <packet>\n"); i40e_dbg_command_write() 1971 dev_info(&pf->pdev->dev, " rem fd_filter <dest q_index> <flex_off> <pctype> <dest_vsi> <dest_ctl> <fd_status> <cnt_index> <fd_id> <packet_len> <packet>\n"); i40e_dbg_command_write() 1972 dev_info(&pf->pdev->dev, " fd-atr off\n"); i40e_dbg_command_write() 1973 dev_info(&pf->pdev->dev, " fd-atr on\n"); i40e_dbg_command_write() 1974 dev_info(&pf->pdev->dev, " fd current cnt"); i40e_dbg_command_write() 1975 dev_info(&pf->pdev->dev, " lldp start\n"); i40e_dbg_command_write() 1976 dev_info(&pf->pdev->dev, " lldp stop\n"); i40e_dbg_command_write() 1977 dev_info(&pf->pdev->dev, " lldp get local\n"); i40e_dbg_command_write() 1978 dev_info(&pf->pdev->dev, " lldp get remote\n"); i40e_dbg_command_write() 1979 dev_info(&pf->pdev->dev, " lldp event on\n"); i40e_dbg_command_write() 1980 dev_info(&pf->pdev->dev, " lldp event off\n"); i40e_dbg_command_write() 1981 dev_info(&pf->pdev->dev, " nvm read [module] [word_offset] [word_count]\n"); i40e_dbg_command_write() 2086 dev_info(&pf->pdev->dev, "tx_timeout <vsi_seid>\n"); i40e_dbg_netdev_ops_write() 2091 dev_info(&pf->pdev->dev, i40e_dbg_netdev_ops_write() 2094 dev_info(&pf->pdev->dev, "tx_timeout: no netdev for VSI %d\n", i40e_dbg_netdev_ops_write() 2097 dev_info(&pf->pdev->dev, "tx_timeout: VSI %d not UP\n", i40e_dbg_netdev_ops_write() 2102 dev_info(&pf->pdev->dev, "tx_timeout called\n"); i40e_dbg_netdev_ops_write() 2104 dev_info(&pf->pdev->dev, "Could not acquire RTNL - please try again\n"); i40e_dbg_netdev_ops_write() 2111 dev_info(&pf->pdev->dev, "change_mtu <vsi_seid> <mtu>\n"); i40e_dbg_netdev_ops_write() 2116 dev_info(&pf->pdev->dev, i40e_dbg_netdev_ops_write() 2119 dev_info(&pf->pdev->dev, "change_mtu: no netdev for VSI %d\n", i40e_dbg_netdev_ops_write() 2125 dev_info(&pf->pdev->dev, "change_mtu called\n"); i40e_dbg_netdev_ops_write() 2127 dev_info(&pf->pdev->dev, "Could not acquire RTNL - please try again\n"); i40e_dbg_netdev_ops_write() 2133 dev_info(&pf->pdev->dev, "set_rx_mode <vsi_seid>\n"); i40e_dbg_netdev_ops_write() 2138 dev_info(&pf->pdev->dev, i40e_dbg_netdev_ops_write() 2141 dev_info(&pf->pdev->dev, "set_rx_mode: no netdev for VSI %d\n", i40e_dbg_netdev_ops_write() 2146 dev_info(&pf->pdev->dev, "set_rx_mode called\n"); i40e_dbg_netdev_ops_write() 2148 dev_info(&pf->pdev->dev, "Could not acquire RTNL - please try again\n"); i40e_dbg_netdev_ops_write() 2154 dev_info(&pf->pdev->dev, "napi <vsi_seid>\n"); i40e_dbg_netdev_ops_write() 2159 dev_info(&pf->pdev->dev, "napi: VSI %d not found\n", i40e_dbg_netdev_ops_write() 2162 dev_info(&pf->pdev->dev, "napi: no netdev for VSI %d\n", i40e_dbg_netdev_ops_write() 2167 dev_info(&pf->pdev->dev, "napi called\n"); i40e_dbg_netdev_ops_write() 2170 dev_info(&pf->pdev->dev, "unknown command '%s'\n", i40e_dbg_netdev_ops_write() 2172 dev_info(&pf->pdev->dev, "available commands\n"); i40e_dbg_netdev_ops_write() 2173 dev_info(&pf->pdev->dev, " tx_timeout <vsi_seid>\n"); i40e_dbg_netdev_ops_write() 2174 dev_info(&pf->pdev->dev, " change_mtu <vsi_seid> <mtu>\n"); i40e_dbg_netdev_ops_write() 2175 dev_info(&pf->pdev->dev, " set_rx_mode <vsi_seid>\n"); i40e_dbg_netdev_ops_write() 2176 dev_info(&pf->pdev->dev, " napi <vsi_seid>\n"); i40e_dbg_netdev_ops_write() 2196 const char *name = pci_name(pf->pdev); i40e_dbg_pf_init() 2197 const struct device *dev = &pf->pdev->dev; i40e_dbg_pf_init()
|
/linux-4.1.27/drivers/gpu/vga/ |
H A D | vgaarb.c | 57 struct pci_dev *pdev; member in struct:vga_device 119 static void vga_arb_device_card_gone(struct pci_dev *pdev); 122 static struct vga_device *vgadev_find(struct pci_dev *pdev) vgadev_find() argument 127 if (pdev == vgadev->pdev) vgadev_find() 140 void vga_set_default_device(struct pci_dev *pdev) vga_set_default_device() argument 142 if (vga_default == pdev) vga_set_default_device() 146 vga_default = pci_dev_get(pdev); vga_set_default_device() 217 if (!vga_conflicts(vgadev->pdev, conflict->pdev)) __vga_tryget() 226 if (vgadev->pdev->bus != conflict->pdev->bus) { __vga_tryget() 270 pci_set_vga_state(conflict->pdev, false, pci_bits, flags); __vga_tryget() 299 pci_set_vga_state(vgadev->pdev, true, pci_bits, flags); __vga_tryget() 358 int vga_get(struct pci_dev *pdev, unsigned int rsrc, int interruptible) vga_get() argument 367 if (pdev == NULL) vga_get() 368 pdev = vga_default_device(); vga_get() 369 if (pdev == NULL) vga_get() 374 vgadev = vgadev_find(pdev); vga_get() 408 int vga_tryget(struct pci_dev *pdev, unsigned int rsrc) vga_tryget() argument 417 if (pdev == NULL) vga_tryget() 418 pdev = vga_default_device(); vga_tryget() 419 if (pdev == NULL) vga_tryget() 422 vgadev = vgadev_find(pdev); vga_tryget() 435 void vga_put(struct pci_dev *pdev, unsigned int rsrc) vga_put() argument 441 if (pdev == NULL) vga_put() 442 pdev = vga_default_device(); vga_put() 443 if (pdev == NULL) vga_put() 446 vgadev = vgadev_find(pdev); vga_put() 476 new_bus = vgadev->pdev->bus; vga_arbiter_check_bridge_sharing() 482 bus = same_bridge_vgadev->pdev->bus; vga_arbiter_check_bridge_sharing() 499 if (bridge == vgadev->pdev->bus->self) vga_arbiter_check_bridge_sharing() 515 static bool vga_arbiter_add_pci_device(struct pci_dev *pdev) vga_arbiter_add_pci_device() argument 524 if ((pdev->class >> 8) != PCI_CLASS_DISPLAY_VGA) vga_arbiter_add_pci_device() 542 if (vgadev_find(pdev) != NULL) { vga_arbiter_add_pci_device() 546 vgadev->pdev = pdev; vga_arbiter_add_pci_device() 557 pci_read_config_word(pdev, PCI_COMMAND, &cmd); vga_arbiter_add_pci_device() 564 bus = pdev->bus; vga_arbiter_add_pci_device() 585 pci_name(pdev)); vga_arbiter_add_pci_device() 586 vga_set_default_device(pdev); vga_arbiter_add_pci_device() 595 pci_name(pdev), vga_arbiter_add_pci_device() 608 static bool vga_arbiter_del_pci_device(struct pci_dev *pdev) vga_arbiter_del_pci_device() argument 615 vgadev = vgadev_find(pdev); vga_arbiter_del_pci_device() 621 if (vga_default == pdev) vga_arbiter_del_pci_device() 633 vga_arb_device_card_gone(pdev); vga_arbiter_del_pci_device() 655 pci_name(vgadev->pdev), vga_update_device_decodes() 679 static void __vga_set_legacy_decoding(struct pci_dev *pdev, unsigned int decodes, bool userspace) __vga_set_legacy_decoding() argument 687 vgadev = vgadev_find(pdev); __vga_set_legacy_decoding() 706 void vga_set_legacy_decoding(struct pci_dev *pdev, unsigned int decodes) vga_set_legacy_decoding() argument 708 __vga_set_legacy_decoding(pdev, decodes, false); vga_set_legacy_decoding() 713 int vga_client_register(struct pci_dev *pdev, void *cookie, vga_client_register() argument 722 vgadev = vgadev_find(pdev); vga_client_register() 798 struct pci_dev *pdev; member in struct:vga_arb_user_card 840 struct pci_dev *pdev; vga_arb_read() local 856 pdev = priv->target; vga_arb_read() 857 if (pdev == NULL || pdev == PCI_INVALID_CARD) { vga_arb_read() 864 vgadev = vgadev_find(pdev); vga_arb_read() 869 if (pdev == priv->target) vga_arb_read() 870 vga_arb_device_card_gone(pdev); vga_arb_read() 879 vga_decode_count, pci_name(pdev), vga_arb_read() 907 struct pci_dev *pdev; vga_arb_write() local 944 pdev = priv->target; vga_arb_write() 950 vga_get_uninterruptible(pdev, io_state); vga_arb_write() 954 if (priv->cards[i].pdev == pdev) { vga_arb_write() 987 pdev = priv->target; vga_arb_write() 993 if (priv->cards[i].pdev == pdev) vga_arb_write() 1012 vga_put(pdev, io_state); vga_arb_write() 1038 pdev = priv->target; vga_arb_write() 1044 if (vga_tryget(pdev, io_state)) { vga_arb_write() 1047 if (priv->cards[i].pdev == pdev) { vga_arb_write() 1071 pdev = pci_dev_get(vga_default_device()); vga_arb_write() 1081 pdev = pci_get_domain_bus_and_slot(domain, bus, devfn); vga_arb_write() 1082 pr_debug("vgaarb: pdev %p\n", pdev); vga_arb_write() 1083 if (!pdev) { vga_arb_write() 1091 vgadev = vgadev_find(pdev); vga_arb_write() 1095 pci_dev_put(pdev); vga_arb_write() 1100 priv->target = pdev; vga_arb_write() 1102 if (priv->cards[i].pdev == pdev) vga_arb_write() 1104 if (priv->cards[i].pdev == NULL) { vga_arb_write() 1105 priv->cards[i].pdev = pdev; vga_arb_write() 1114 pci_dev_put(pdev); vga_arb_write() 1121 pci_dev_put(pdev); vga_arb_write() 1134 pdev = priv->target; vga_arb_write() 1140 __vga_set_legacy_decoding(pdev, io_state, true); vga_arb_write() 1184 priv->cards[0].pdev = priv->target; vga_arb_open() 1208 if (uc->pdev == NULL) vga_arb_release() 1213 vga_put(uc->pdev, VGA_RSRC_LEGACY_IO); vga_arb_release() 1215 vga_put(uc->pdev, VGA_RSRC_LEGACY_MEM); vga_arb_release() 1224 static void vga_arb_device_card_gone(struct pci_dev *pdev) vga_arb_device_card_gone() argument 1260 struct pci_dev *pdev = to_pci_dev(dev); pci_notify() local 1269 notify = vga_arbiter_add_pci_device(pdev); pci_notify() 1271 notify = vga_arbiter_del_pci_device(pdev); pci_notify() 1298 struct pci_dev *pdev; vga_arb_device_init() local 1309 pdev = NULL; vga_arb_device_init() 1310 while ((pdev = vga_arb_device_init() 1312 PCI_ANY_ID, pdev)) != NULL) vga_arb_device_init() 1313 vga_arbiter_add_pci_device(pdev); vga_arb_device_init() 1329 if (!(pci_resource_flags(vgadev->pdev, i) & IORESOURCE_MEM)) vga_arb_device_init() 1332 start = pci_resource_start(vgadev->pdev, i); vga_arb_device_init() 1333 end = pci_resource_end(vgadev->pdev, i); vga_arb_device_init() 1343 pci_name(vgadev->pdev)); vga_arb_device_init() 1344 else if (vgadev->pdev != vga_default_device()) vga_arb_device_init() 1346 pci_name(vgadev->pdev)); vga_arb_device_init() 1347 vga_set_default_device(vgadev->pdev); vga_arb_device_init() 1351 pr_info("vgaarb: bridge control possible %s\n", pci_name(vgadev->pdev)); vga_arb_device_init() 1353 pr_info("vgaarb: no bridge control possible %s\n", pci_name(vgadev->pdev)); vga_arb_device_init()
|
/linux-4.1.27/drivers/net/ethernet/samsung/sxgbe/ |
H A D | sxgbe_platform.c | 30 static int sxgbe_probe_config_dt(struct platform_device *pdev, sxgbe_probe_config_dt() argument 34 struct device_node *np = pdev->dev.of_node; sxgbe_probe_config_dt() 47 plat->mdio_bus_data = devm_kzalloc(&pdev->dev, sxgbe_probe_config_dt() 51 dma_cfg = devm_kzalloc(&pdev->dev, sizeof(*dma_cfg), GFP_KERNEL); sxgbe_probe_config_dt() 63 static int sxgbe_probe_config_dt(struct platform_device *pdev, sxgbe_probe_config_dt() argument 73 * @pdev: platform device pointer 78 static int sxgbe_platform_probe(struct platform_device *pdev) sxgbe_platform_probe() argument 83 struct device *dev = &pdev->dev; sxgbe_platform_probe() 88 struct net_device *ndev = platform_get_drvdata(pdev); sxgbe_platform_probe() 92 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); sxgbe_platform_probe() 97 if (pdev->dev.of_node) { sxgbe_platform_probe() 98 plat_dat = devm_kzalloc(&pdev->dev, sxgbe_platform_probe() 104 ret = sxgbe_probe_config_dt(pdev, plat_dat, &mac); sxgbe_platform_probe() 111 priv = sxgbe_drv_probe(&(pdev->dev), plat_dat, addr); sxgbe_platform_probe() 151 platform_set_drvdata(pdev, priv->dev); sxgbe_platform_probe() 173 * @pdev: platform device pointer 177 static int sxgbe_platform_remove(struct platform_device *pdev) sxgbe_platform_remove() argument 179 struct net_device *ndev = platform_get_drvdata(pdev); sxgbe_platform_remove()
|