Lines Matching refs:hu
46 struct hci_uart hu; member
55 static int mrvl_open(struct hci_uart *hu) in mrvl_open() argument
60 BT_DBG("hu %p", hu); in mrvl_open()
62 if (!hci_uart_has_flow_control(hu)) in mrvl_open()
74 hu->priv = mrvl; in mrvl_open()
76 if (hu->serdev) { in mrvl_open()
77 ret = serdev_device_open(hu->serdev); in mrvl_open()
89 static int mrvl_close(struct hci_uart *hu) in mrvl_close() argument
91 struct mrvl_data *mrvl = hu->priv; in mrvl_close()
93 BT_DBG("hu %p", hu); in mrvl_close()
95 if (hu->serdev) in mrvl_close()
96 serdev_device_close(hu->serdev); in mrvl_close()
103 hu->priv = NULL; in mrvl_close()
107 static int mrvl_flush(struct hci_uart *hu) in mrvl_flush() argument
109 struct mrvl_data *mrvl = hu->priv; in mrvl_flush()
111 BT_DBG("hu %p", hu); in mrvl_flush()
119 static struct sk_buff *mrvl_dequeue(struct hci_uart *hu) in mrvl_dequeue() argument
121 struct mrvl_data *mrvl = hu->priv; in mrvl_dequeue()
136 static int mrvl_enqueue(struct hci_uart *hu, struct sk_buff *skb) in mrvl_enqueue() argument
138 struct mrvl_data *mrvl = hu->priv; in mrvl_enqueue()
144 static void mrvl_send_ack(struct hci_uart *hu, unsigned char type) in mrvl_send_ack() argument
146 struct mrvl_data *mrvl = hu->priv; in mrvl_send_ack()
152 bt_dev_err(hu->hdev, "Unable to alloc ack/nak packet"); in mrvl_send_ack()
158 hci_uart_tx_wakeup(hu); in mrvl_send_ack()
164 struct hci_uart *hu = hci_get_drvdata(hdev); in mrvl_recv_fw_req() local
165 struct mrvl_data *mrvl = hu->priv; in mrvl_recv_fw_req()
170 mrvl_send_ack(hu, MRVL_NAK); in mrvl_recv_fw_req()
174 mrvl_send_ack(hu, MRVL_ACK); in mrvl_recv_fw_req()
196 struct hci_uart *hu = hci_get_drvdata(hdev); in mrvl_recv_chip_ver() local
197 struct mrvl_data *mrvl = hu->priv; in mrvl_recv_chip_ver()
203 mrvl_send_ack(hu, MRVL_NAK); in mrvl_recv_chip_ver()
207 mrvl_send_ack(hu, MRVL_ACK); in mrvl_recv_chip_ver()
250 static int mrvl_recv(struct hci_uart *hu, const void *data, int count) in mrvl_recv() argument
252 struct mrvl_data *mrvl = hu->priv; in mrvl_recv()
254 if (!test_bit(HCI_UART_REGISTERED, &hu->flags)) in mrvl_recv()
257 mrvl->rx_skb = h4_recv_buf(hu->hdev, mrvl->rx_skb, data, count, in mrvl_recv()
262 bt_dev_err(hu->hdev, "Frame reassembly failed (%d)", err); in mrvl_recv()
272 struct hci_uart *hu = hci_get_drvdata(hdev); in mrvl_load_firmware() local
273 struct mrvl_data *mrvl = hu->priv; in mrvl_load_firmware()
347 hci_uart_tx_wakeup(hu); in mrvl_load_firmware()
354 static int mrvl_setup(struct hci_uart *hu) in mrvl_setup() argument
358 hci_uart_set_flow_control(hu, true); in mrvl_setup()
360 err = mrvl_load_firmware(hu->hdev, "mrvl/helper_uart_3000000.bin"); in mrvl_setup()
362 bt_dev_err(hu->hdev, "Unable to download firmware helper"); in mrvl_setup()
367 hci_uart_wait_until_sent(hu); in mrvl_setup()
369 if (hu->serdev) in mrvl_setup()
370 serdev_device_set_baudrate(hu->serdev, 3000000); in mrvl_setup()
372 hci_uart_set_baudrate(hu, 3000000); in mrvl_setup()
374 hci_uart_set_flow_control(hu, false); in mrvl_setup()
376 err = mrvl_load_firmware(hu->hdev, "mrvl/uart8897_bt.bin"); in mrvl_setup()
404 mrvldev->hu.serdev = serdev; in mrvl_serdev_probe()
407 return hci_uart_register_device(&mrvldev->hu, &mrvl_proto); in mrvl_serdev_probe()
414 hci_uart_unregister_device(&mrvldev->hu); in mrvl_serdev_remove()