Lines Matching refs:pn532
52 struct pn532_uart_phy *pn532 = dev->phy; in pn532_uart_send_frame() local
58 pn532->cur_out_buf = out; in pn532_uart_send_frame()
59 if (pn532->send_wakeup) { in pn532_uart_send_frame()
60 err = serdev_device_write(pn532->serdev, in pn532_uart_send_frame()
67 if (pn532->send_wakeup == PN532_SEND_LAST_WAKEUP) in pn532_uart_send_frame()
68 pn532->send_wakeup = PN532_SEND_NO_WAKEUP; in pn532_uart_send_frame()
70 err = serdev_device_write(pn532->serdev, out->data, out->len, in pn532_uart_send_frame()
75 mod_timer(&pn532->cmd_timeout, HZ / 40 + jiffies); in pn532_uart_send_frame()
84 struct pn532_uart_phy *pn532 = dev->phy; in pn532_uart_send_ack() local
87 err = serdev_device_write(pn532->serdev, ack, sizeof(ack), in pn532_uart_send_ack()
105 struct pn532_uart_phy *pn532 = dev->phy; in pn532_dev_up() local
108 ret = serdev_device_open(pn532->serdev); in pn532_dev_up()
112 pn532->send_wakeup = PN532_SEND_LAST_WAKEUP; in pn532_dev_up()
118 struct pn532_uart_phy *pn532 = dev->phy; in pn532_dev_down() local
120 serdev_device_close(pn532->serdev); in pn532_dev_down()
121 pn532->send_wakeup = PN532_SEND_WAKEUP; in pn532_dev_down()
240 struct pn532_uart_phy *pn532; in pn532_uart_probe() local
245 pn532 = kzalloc(sizeof(*pn532), GFP_KERNEL); in pn532_uart_probe()
246 if (!pn532) in pn532_uart_probe()
249 pn532->recv_skb = alloc_skb(PN532_UART_SKB_BUFF_LEN, GFP_KERNEL); in pn532_uart_probe()
250 if (!pn532->recv_skb) in pn532_uart_probe()
253 pn532->serdev = serdev; in pn532_uart_probe()
254 serdev_device_set_drvdata(serdev, pn532); in pn532_uart_probe()
269 pn532->send_wakeup = PN532_SEND_WAKEUP; in pn532_uart_probe()
270 timer_setup(&pn532->cmd_timeout, pn532_cmd_timeout, 0); in pn532_uart_probe()
273 pn532, &uart_phy_ops, NULL, in pn532_uart_probe()
274 &pn532->serdev->dev); in pn532_uart_probe()
280 pn532->priv = priv; in pn532_uart_probe()
281 err = pn533_finalize_setup(pn532->priv); in pn532_uart_probe()
288 pn53x_common_clean(pn532->priv); in pn532_uart_probe()
295 pn53x_common_clean(pn532->priv); in pn532_uart_probe()
299 kfree_skb(pn532->recv_skb); in pn532_uart_probe()
301 kfree(pn532); in pn532_uart_probe()
308 struct pn532_uart_phy *pn532 = serdev_device_get_drvdata(serdev); in pn532_uart_remove() local
310 pn53x_unregister_nfc(pn532->priv); in pn532_uart_remove()
312 pn53x_common_clean(pn532->priv); in pn532_uart_remove()
313 timer_shutdown_sync(&pn532->cmd_timeout); in pn532_uart_remove()
314 kfree_skb(pn532->recv_skb); in pn532_uart_remove()
315 kfree(pn532); in pn532_uart_remove()