Lines Matching refs:drv_data
29 struct nfcmrvl_spi_drv_data *drv_data = drv_data_ptr; in nfcmrvl_spi_int_irq_thread_fn() local
36 if (test_and_clear_bit(SPI_WAIT_HANDSHAKE, &drv_data->flags)) { in nfcmrvl_spi_int_irq_thread_fn()
37 complete(&drv_data->handshake_completion); in nfcmrvl_spi_int_irq_thread_fn()
43 skb = nci_spi_read(drv_data->nci_spi); in nfcmrvl_spi_int_irq_thread_fn()
45 nfc_err(&drv_data->spi->dev, "failed to read spi packet"); in nfcmrvl_spi_int_irq_thread_fn()
49 if (nfcmrvl_nci_recv_frame(drv_data->priv, skb) < 0) in nfcmrvl_spi_int_irq_thread_fn()
50 nfc_err(&drv_data->spi->dev, "corrupted RX packet"); in nfcmrvl_spi_int_irq_thread_fn()
68 struct nfcmrvl_spi_drv_data *drv_data = priv->drv_data; in nfcmrvl_spi_nci_send() local
72 reinit_completion(&drv_data->handshake_completion); in nfcmrvl_spi_nci_send()
73 set_bit(SPI_WAIT_HANDSHAKE, &drv_data->flags); in nfcmrvl_spi_nci_send()
82 err = nci_spi_send(drv_data->nci_spi, &drv_data->handshake_completion, in nfcmrvl_spi_nci_send()
93 struct nfcmrvl_spi_drv_data *drv_data = priv->drv_data; in nfcmrvl_spi_nci_update_config() local
96 drv_data->nci_spi->xfer_speed_hz = config->clk; in nfcmrvl_spi_nci_update_config()
131 struct nfcmrvl_spi_drv_data *drv_data; in nfcmrvl_spi_probe() local
134 drv_data = devm_kzalloc(&spi->dev, sizeof(*drv_data), GFP_KERNEL); in nfcmrvl_spi_probe()
135 if (!drv_data) in nfcmrvl_spi_probe()
138 drv_data->spi = spi; in nfcmrvl_spi_probe()
139 drv_data->priv = NULL; in nfcmrvl_spi_probe()
140 spi_set_drvdata(spi, drv_data); in nfcmrvl_spi_probe()
151 ret = devm_request_threaded_irq(&drv_data->spi->dev, pdata->irq, in nfcmrvl_spi_probe()
154 "nfcmrvl_spi_int", drv_data); in nfcmrvl_spi_probe()
156 nfc_err(&drv_data->spi->dev, "Unable to register IRQ handler"); in nfcmrvl_spi_probe()
160 drv_data->priv = nfcmrvl_nci_register_dev(NFCMRVL_PHY_SPI, in nfcmrvl_spi_probe()
161 drv_data, &spi_ops, in nfcmrvl_spi_probe()
162 &drv_data->spi->dev, in nfcmrvl_spi_probe()
164 if (IS_ERR(drv_data->priv)) in nfcmrvl_spi_probe()
165 return PTR_ERR(drv_data->priv); in nfcmrvl_spi_probe()
167 drv_data->priv->support_fw_dnld = true; in nfcmrvl_spi_probe()
169 drv_data->nci_spi = nci_spi_allocate_spi(drv_data->spi, 0, 10, in nfcmrvl_spi_probe()
170 drv_data->priv->ndev); in nfcmrvl_spi_probe()
173 init_completion(&drv_data->handshake_completion); in nfcmrvl_spi_probe()
179 struct nfcmrvl_spi_drv_data *drv_data = spi_get_drvdata(spi); in nfcmrvl_spi_remove() local
181 nfcmrvl_nci_unregister_dev(drv_data->priv); in nfcmrvl_spi_remove()