Lines Matching refs:spi_sub_ptr

250 	struct pci1xxxx_spi_internal *spi_sub_ptr;  in pci1xxxx_spi_probe()  local
278 spi_sub_ptr = spi_bus->spi_int[iter]; in pci1xxxx_spi_probe()
279 spi_sub_ptr->spi_host = devm_spi_alloc_host(dev, sizeof(struct spi_controller)); in pci1xxxx_spi_probe()
280 if (!spi_sub_ptr->spi_host) in pci1xxxx_spi_probe()
283 spi_sub_ptr->parent = spi_bus; in pci1xxxx_spi_probe()
284 spi_sub_ptr->spi_xfer_in_progress = false; in pci1xxxx_spi_probe()
308 init_completion(&spi_sub_ptr->spi_xfer_done); in pci1xxxx_spi_probe()
311 SPI_MST_EVENT_MASK_REG_OFFSET(spi_sub_ptr->hw_inst)); in pci1xxxx_spi_probe()
314 SPI_MST_EVENT_MASK_REG_OFFSET(spi_sub_ptr->hw_inst)); in pci1xxxx_spi_probe()
315 spi_sub_ptr->irq = pci_irq_vector(pdev, 0); in pci1xxxx_spi_probe()
317 ret = devm_request_irq(&pdev->dev, spi_sub_ptr->irq, in pci1xxxx_spi_probe()
319 pci_name(pdev), spi_sub_ptr); in pci1xxxx_spi_probe()
322 spi_sub_ptr->irq); in pci1xxxx_spi_probe()
337 spi_sub_ptr->hw_inst = start++; in pci1xxxx_spi_probe()
340 init_completion(&spi_sub_ptr->spi_xfer_done); in pci1xxxx_spi_probe()
343 SPI_MST_EVENT_MASK_REG_OFFSET(spi_sub_ptr->hw_inst)); in pci1xxxx_spi_probe()
346 SPI_MST_EVENT_MASK_REG_OFFSET(spi_sub_ptr->hw_inst)); in pci1xxxx_spi_probe()
347 spi_sub_ptr->irq = pci_irq_vector(pdev, iter); in pci1xxxx_spi_probe()
348 ret = devm_request_irq(&pdev->dev, spi_sub_ptr->irq, in pci1xxxx_spi_probe()
350 pci_name(pdev), spi_sub_ptr); in pci1xxxx_spi_probe()
353 spi_sub_ptr->irq); in pci1xxxx_spi_probe()
359 spi_host = spi_sub_ptr->spi_host; in pci1xxxx_spi_probe()
369 spi_controller_set_devdata(spi_host, spi_sub_ptr); in pci1xxxx_spi_probe()
384 struct pci1xxxx_spi_internal *spi_sub_ptr, in store_restore_config() argument
391 SPI_MST_CTL_REG_OFFSET(spi_sub_ptr->hw_inst)); in store_restore_config()
393 spi_sub_ptr->prev_val.dev_sel = (regval >> 25) & 7; in store_restore_config()
395 SPI_PCI_CTRL_REG_OFFSET(spi_sub_ptr->hw_inst)); in store_restore_config()
397 spi_sub_ptr->prev_val.msi_vector_sel = (regval >> 4) & 1; in store_restore_config()
401 regval |= (spi_sub_ptr->prev_val.dev_sel << 25); in store_restore_config()
404 writel((spi_sub_ptr->prev_val.msi_vector_sel << 4), in store_restore_config()
412 struct pci1xxxx_spi_internal *spi_sub_ptr; in pci1xxxx_spi_resume() local
417 spi_sub_ptr = spi_ptr->spi_int[iter]; in pci1xxxx_spi_resume()
418 spi_controller_resume(spi_sub_ptr->spi_host); in pci1xxxx_spi_resume()
423 store_restore_config(spi_ptr, spi_sub_ptr, iter, 0); in pci1xxxx_spi_resume()
432 struct pci1xxxx_spi_internal *spi_sub_ptr; in pci1xxxx_spi_suspend() local
437 spi_sub_ptr = spi_ptr->spi_int[iter]; in pci1xxxx_spi_suspend()
439 while (spi_sub_ptr->spi_xfer_in_progress) in pci1xxxx_spi_suspend()
443 store_restore_config(spi_ptr, spi_sub_ptr, iter, 1); in pci1xxxx_spi_suspend()
444 spi_controller_suspend(spi_sub_ptr->spi_host); in pci1xxxx_spi_suspend()