hu                 33 drivers/bluetooth/hci_ag6xx.c static int ag6xx_open(struct hci_uart *hu)
hu                 37 drivers/bluetooth/hci_ag6xx.c 	BT_DBG("hu %p", hu);
hu                 45 drivers/bluetooth/hci_ag6xx.c 	hu->priv = ag6xx;
hu                 49 drivers/bluetooth/hci_ag6xx.c static int ag6xx_close(struct hci_uart *hu)
hu                 51 drivers/bluetooth/hci_ag6xx.c 	struct ag6xx_data *ag6xx = hu->priv;
hu                 53 drivers/bluetooth/hci_ag6xx.c 	BT_DBG("hu %p", hu);
hu                 59 drivers/bluetooth/hci_ag6xx.c 	hu->priv = NULL;
hu                 63 drivers/bluetooth/hci_ag6xx.c static int ag6xx_flush(struct hci_uart *hu)
hu                 65 drivers/bluetooth/hci_ag6xx.c 	struct ag6xx_data *ag6xx = hu->priv;
hu                 67 drivers/bluetooth/hci_ag6xx.c 	BT_DBG("hu %p", hu);
hu                 73 drivers/bluetooth/hci_ag6xx.c static struct sk_buff *ag6xx_dequeue(struct hci_uart *hu)
hu                 75 drivers/bluetooth/hci_ag6xx.c 	struct ag6xx_data *ag6xx = hu->priv;
hu                 87 drivers/bluetooth/hci_ag6xx.c static int ag6xx_enqueue(struct hci_uart *hu, struct sk_buff *skb)
hu                 89 drivers/bluetooth/hci_ag6xx.c 	struct ag6xx_data *ag6xx = hu->priv;
hu                101 drivers/bluetooth/hci_ag6xx.c static int ag6xx_recv(struct hci_uart *hu, const void *data, int count)
hu                103 drivers/bluetooth/hci_ag6xx.c 	struct ag6xx_data *ag6xx = hu->priv;
hu                105 drivers/bluetooth/hci_ag6xx.c 	if (!test_bit(HCI_UART_REGISTERED, &hu->flags))
hu                108 drivers/bluetooth/hci_ag6xx.c 	ag6xx->rx_skb = h4_recv_buf(hu->hdev, ag6xx->rx_skb, data, count,
hu                113 drivers/bluetooth/hci_ag6xx.c 		bt_dev_err(hu->hdev, "Frame reassembly failed (%d)", err);
hu                151 drivers/bluetooth/hci_ag6xx.c static int ag6xx_setup(struct hci_uart *hu)
hu                153 drivers/bluetooth/hci_ag6xx.c 	struct hci_dev *hdev = hu->hdev;
hu                162 drivers/bluetooth/hci_ag6xx.c 	hu->hdev->set_diag = btintel_set_diag;
hu                163 drivers/bluetooth/hci_ag6xx.c 	hu->hdev->set_bdaddr = btintel_set_bdaddr;
hu                 31 drivers/bluetooth/hci_ath.c 	struct hci_uart *hu;
hu                 75 drivers/bluetooth/hci_ath.c 	struct hci_uart *hu;
hu                 80 drivers/bluetooth/hci_ath.c 	hu = ath->hu;
hu                 81 drivers/bluetooth/hci_ath.c 	tty = hu->tty;
hu                 91 drivers/bluetooth/hci_ath.c 	clear_bit(HCI_UART_SENDING, &hu->tx_state);
hu                 92 drivers/bluetooth/hci_ath.c 	hci_uart_tx_wakeup(hu);
hu                 95 drivers/bluetooth/hci_ath.c static int ath_open(struct hci_uart *hu)
hu                 99 drivers/bluetooth/hci_ath.c 	BT_DBG("hu %p", hu);
hu                101 drivers/bluetooth/hci_ath.c 	if (!hci_uart_has_flow_control(hu))
hu                110 drivers/bluetooth/hci_ath.c 	hu->priv = ath;
hu                111 drivers/bluetooth/hci_ath.c 	ath->hu = hu;
hu                118 drivers/bluetooth/hci_ath.c static int ath_close(struct hci_uart *hu)
hu                120 drivers/bluetooth/hci_ath.c 	struct ath_struct *ath = hu->priv;
hu                122 drivers/bluetooth/hci_ath.c 	BT_DBG("hu %p", hu);
hu                130 drivers/bluetooth/hci_ath.c 	hu->priv = NULL;
hu                136 drivers/bluetooth/hci_ath.c static int ath_flush(struct hci_uart *hu)
hu                138 drivers/bluetooth/hci_ath.c 	struct ath_struct *ath = hu->priv;
hu                140 drivers/bluetooth/hci_ath.c 	BT_DBG("hu %p", hu);
hu                175 drivers/bluetooth/hci_ath.c static int ath_setup(struct hci_uart *hu)
hu                177 drivers/bluetooth/hci_ath.c 	BT_DBG("hu %p", hu);
hu                179 drivers/bluetooth/hci_ath.c 	hu->hdev->set_bdaddr = ath_set_bdaddr;
hu                190 drivers/bluetooth/hci_ath.c static int ath_recv(struct hci_uart *hu, const void *data, int count)
hu                192 drivers/bluetooth/hci_ath.c 	struct ath_struct *ath = hu->priv;
hu                194 drivers/bluetooth/hci_ath.c 	ath->rx_skb = h4_recv_buf(hu->hdev, ath->rx_skb, data, count,
hu                198 drivers/bluetooth/hci_ath.c 		bt_dev_err(hu->hdev, "Frame reassembly failed (%d)", err);
hu                208 drivers/bluetooth/hci_ath.c static int ath_enqueue(struct hci_uart *hu, struct sk_buff *skb)
hu                210 drivers/bluetooth/hci_ath.c 	struct ath_struct *ath = hu->priv;
hu                227 drivers/bluetooth/hci_ath.c 	BT_DBG("hu %p skb %p", hu, skb);
hu                233 drivers/bluetooth/hci_ath.c 	set_bit(HCI_UART_SENDING, &hu->tx_state);
hu                240 drivers/bluetooth/hci_ath.c static struct sk_buff *ath_dequeue(struct hci_uart *hu)
hu                242 drivers/bluetooth/hci_ath.c 	struct ath_struct *ath = hu->priv;
hu                112 drivers/bluetooth/hci_bcm.c 	struct hci_uart		*hu;
hu                133 drivers/bluetooth/hci_bcm.c static inline void host_set_baudrate(struct hci_uart *hu, unsigned int speed)
hu                135 drivers/bluetooth/hci_bcm.c 	if (hu->serdev)
hu                136 drivers/bluetooth/hci_bcm.c 		serdev_device_set_baudrate(hu->serdev, speed);
hu                138 drivers/bluetooth/hci_bcm.c 		hci_uart_set_baudrate(hu, speed);
hu                141 drivers/bluetooth/hci_bcm.c static int bcm_set_baudrate(struct hci_uart *hu, unsigned int speed)
hu                143 drivers/bluetooth/hci_bcm.c 	struct hci_dev *hdev = hu->hdev;
hu                197 drivers/bluetooth/hci_bcm.c 	if (device && device->hu && device->hu->serdev)
hu                352 drivers/bluetooth/hci_bcm.c static int bcm_setup_sleep(struct hci_uart *hu)
hu                354 drivers/bluetooth/hci_bcm.c 	struct bcm_data *bcm = hu->priv;
hu                360 drivers/bluetooth/hci_bcm.c 	skb = __hci_cmd_sync(hu->hdev, 0xfc27, sizeof(sleep_params),
hu                364 drivers/bluetooth/hci_bcm.c 		bt_dev_err(hu->hdev, "Sleep VSC failed (%d)", err);
hu                369 drivers/bluetooth/hci_bcm.c 	bt_dev_dbg(hu->hdev, "Set Sleep Parameters VSC succeeded");
hu                375 drivers/bluetooth/hci_bcm.c static inline int bcm_setup_sleep(struct hci_uart *hu) { return 0; }
hu                380 drivers/bluetooth/hci_bcm.c 	struct hci_uart *hu = hci_get_drvdata(hdev);
hu                381 drivers/bluetooth/hci_bcm.c 	struct bcm_data *bcm = hu->priv;
hu                396 drivers/bluetooth/hci_bcm.c 	hci_uart_tx_wakeup(hu);
hu                401 drivers/bluetooth/hci_bcm.c static int bcm_open(struct hci_uart *hu)
hu                407 drivers/bluetooth/hci_bcm.c 	bt_dev_dbg(hu->hdev, "hu %p", hu);
hu                409 drivers/bluetooth/hci_bcm.c 	if (!hci_uart_has_flow_control(hu))
hu                418 drivers/bluetooth/hci_bcm.c 	hu->priv = bcm;
hu                422 drivers/bluetooth/hci_bcm.c 	if (hu->serdev) {
hu                423 drivers/bluetooth/hci_bcm.c 		bcm->dev = serdev_device_get_drvdata(hu->serdev);
hu                427 drivers/bluetooth/hci_bcm.c 	if (!hu->tty->dev)
hu                437 drivers/bluetooth/hci_bcm.c 		if (hu->tty->dev->parent == dev->dev->parent) {
hu                440 drivers/bluetooth/hci_bcm.c 			dev->hu = hu;
hu                448 drivers/bluetooth/hci_bcm.c 		hu->init_speed = bcm->dev->init_speed;
hu                449 drivers/bluetooth/hci_bcm.c 		hu->oper_speed = bcm->dev->oper_speed;
hu                460 drivers/bluetooth/hci_bcm.c 	if (!hu->serdev)
hu                461 drivers/bluetooth/hci_bcm.c 		bcm->dev->hu = NULL;
hu                464 drivers/bluetooth/hci_bcm.c 	hu->priv = NULL;
hu                469 drivers/bluetooth/hci_bcm.c static int bcm_close(struct hci_uart *hu)
hu                471 drivers/bluetooth/hci_bcm.c 	struct bcm_data *bcm = hu->priv;
hu                475 drivers/bluetooth/hci_bcm.c 	bt_dev_dbg(hu->hdev, "hu %p", hu);
hu                480 drivers/bluetooth/hci_bcm.c 	if (hu->serdev) {
hu                481 drivers/bluetooth/hci_bcm.c 		bdev = serdev_device_get_drvdata(hu->serdev);
hu                485 drivers/bluetooth/hci_bcm.c 		bdev->hu = NULL;
hu                498 drivers/bluetooth/hci_bcm.c 			bt_dev_err(hu->hdev, "Failed to power down");
hu                508 drivers/bluetooth/hci_bcm.c 	hu->priv = NULL;
hu                512 drivers/bluetooth/hci_bcm.c static int bcm_flush(struct hci_uart *hu)
hu                514 drivers/bluetooth/hci_bcm.c 	struct bcm_data *bcm = hu->priv;
hu                516 drivers/bluetooth/hci_bcm.c 	bt_dev_dbg(hu->hdev, "hu %p", hu);
hu                523 drivers/bluetooth/hci_bcm.c static int bcm_setup(struct hci_uart *hu)
hu                525 drivers/bluetooth/hci_bcm.c 	struct bcm_data *bcm = hu->priv;
hu                531 drivers/bluetooth/hci_bcm.c 	bt_dev_dbg(hu->hdev, "hu %p", hu);
hu                533 drivers/bluetooth/hci_bcm.c 	hu->hdev->set_diag = bcm_set_diag;
hu                534 drivers/bluetooth/hci_bcm.c 	hu->hdev->set_bdaddr = btbcm_set_bdaddr;
hu                536 drivers/bluetooth/hci_bcm.c 	err = btbcm_initialize(hu->hdev, fw_name, sizeof(fw_name), false);
hu                540 drivers/bluetooth/hci_bcm.c 	err = request_firmware(&fw, fw_name, &hu->hdev->dev);
hu                542 drivers/bluetooth/hci_bcm.c 		bt_dev_info(hu->hdev, "BCM: Patch %s not found", fw_name);
hu                546 drivers/bluetooth/hci_bcm.c 	err = btbcm_patchram(hu->hdev, fw);
hu                548 drivers/bluetooth/hci_bcm.c 		bt_dev_info(hu->hdev, "BCM: Patch failed (%d)", err);
hu                553 drivers/bluetooth/hci_bcm.c 	if (hu->init_speed)
hu                554 drivers/bluetooth/hci_bcm.c 		speed = hu->init_speed;
hu                555 drivers/bluetooth/hci_bcm.c 	else if (hu->proto->init_speed)
hu                556 drivers/bluetooth/hci_bcm.c 		speed = hu->proto->init_speed;
hu                561 drivers/bluetooth/hci_bcm.c 		host_set_baudrate(hu, speed);
hu                564 drivers/bluetooth/hci_bcm.c 	if (hu->oper_speed)
hu                565 drivers/bluetooth/hci_bcm.c 		speed = hu->oper_speed;
hu                566 drivers/bluetooth/hci_bcm.c 	else if (hu->proto->oper_speed)
hu                567 drivers/bluetooth/hci_bcm.c 		speed = hu->proto->oper_speed;
hu                572 drivers/bluetooth/hci_bcm.c 		err = bcm_set_baudrate(hu, speed);
hu                574 drivers/bluetooth/hci_bcm.c 			host_set_baudrate(hu, speed);
hu                580 drivers/bluetooth/hci_bcm.c 	err = btbcm_finalize(hu->hdev);
hu                585 drivers/bluetooth/hci_bcm.c 		err = bcm_setup_sleep(hu);
hu                628 drivers/bluetooth/hci_bcm.c static int bcm_recv(struct hci_uart *hu, const void *data, int count)
hu                630 drivers/bluetooth/hci_bcm.c 	struct bcm_data *bcm = hu->priv;
hu                632 drivers/bluetooth/hci_bcm.c 	if (!test_bit(HCI_UART_REGISTERED, &hu->flags))
hu                635 drivers/bluetooth/hci_bcm.c 	bcm->rx_skb = h4_recv_buf(hu->hdev, bcm->rx_skb, data, count,
hu                639 drivers/bluetooth/hci_bcm.c 		bt_dev_err(hu->hdev, "Frame reassembly failed (%d)", err);
hu                656 drivers/bluetooth/hci_bcm.c static int bcm_enqueue(struct hci_uart *hu, struct sk_buff *skb)
hu                658 drivers/bluetooth/hci_bcm.c 	struct bcm_data *bcm = hu->priv;
hu                660 drivers/bluetooth/hci_bcm.c 	bt_dev_dbg(hu->hdev, "hu %p skb %p", hu, skb);
hu                669 drivers/bluetooth/hci_bcm.c static struct sk_buff *bcm_dequeue(struct hci_uart *hu)
hu                671 drivers/bluetooth/hci_bcm.c 	struct bcm_data *bcm = hu->priv;
hu                703 drivers/bluetooth/hci_bcm.c 	if (!bdev->is_suspended && bdev->hu) {
hu                704 drivers/bluetooth/hci_bcm.c 		hci_uart_set_flow_control(bdev->hu, true);
hu                713 drivers/bluetooth/hci_bcm.c 		if (bdev->is_suspended && bdev->hu) {
hu                715 drivers/bluetooth/hci_bcm.c 			hci_uart_set_flow_control(bdev->hu, false);
hu                743 drivers/bluetooth/hci_bcm.c 	if (bdev->is_suspended && bdev->hu) {
hu                746 drivers/bluetooth/hci_bcm.c 		hci_uart_set_flow_control(bdev->hu, false);
hu                770 drivers/bluetooth/hci_bcm.c 	if (!bdev->hu)
hu                804 drivers/bluetooth/hci_bcm.c 	if (!bdev->hu)
hu               1383 drivers/bluetooth/hci_bcm.c 	bcmdev->hu = &bcmdev->serdev_hu;
hu                 53 drivers/bluetooth/hci_bcsp.c 	struct	hci_uart *hu;
hu                134 drivers/bluetooth/hci_bcsp.c static int bcsp_enqueue(struct hci_uart *hu, struct sk_buff *skb)
hu                136 drivers/bluetooth/hci_bcsp.c 	struct bcsp_struct *bcsp = hu->priv;
hu                271 drivers/bluetooth/hci_bcsp.c static struct sk_buff *bcsp_dequeue(struct hci_uart *hu)
hu                273 drivers/bluetooth/hci_bcsp.c 	struct bcsp_struct *bcsp = hu->priv;
hu                341 drivers/bluetooth/hci_bcsp.c static int bcsp_flush(struct hci_uart *hu)
hu                343 drivers/bluetooth/hci_bcsp.c 	BT_DBG("hu %p", hu);
hu                397 drivers/bluetooth/hci_bcsp.c static void bcsp_handle_le_pkt(struct hci_uart *hu)
hu                399 drivers/bluetooth/hci_bcsp.c 	struct bcsp_struct *bcsp = hu->priv;
hu                416 drivers/bluetooth/hci_bcsp.c 		hci_uart_tx_wakeup(hu);
hu                474 drivers/bluetooth/hci_bcsp.c static void bcsp_complete_rx_pkt(struct hci_uart *hu)
hu                476 drivers/bluetooth/hci_bcsp.c 	struct bcsp_struct *bcsp = hu->priv;
hu                501 drivers/bluetooth/hci_bcsp.c 		hci_uart_tx_wakeup(hu);
hu                526 drivers/bluetooth/hci_bcsp.c 			bcsp_handle_le_pkt(hu);
hu                548 drivers/bluetooth/hci_bcsp.c 				hci_recv_frame(hu->hdev, bcsp->rx_skb);
hu                562 drivers/bluetooth/hci_bcsp.c 		hci_recv_frame(hu->hdev, bcsp->rx_skb);
hu                580 drivers/bluetooth/hci_bcsp.c static int bcsp_recv(struct hci_uart *hu, const void *data, int count)
hu                582 drivers/bluetooth/hci_bcsp.c 	struct bcsp_struct *bcsp = hu->priv;
hu                586 drivers/bluetooth/hci_bcsp.c 	       hu, count, bcsp->rx_state, bcsp->rx_count);
hu                625 drivers/bluetooth/hci_bcsp.c 				bcsp_complete_rx_pkt(hu);
hu                641 drivers/bluetooth/hci_bcsp.c 			bcsp_complete_rx_pkt(hu);
hu                692 drivers/bluetooth/hci_bcsp.c 	struct hci_uart *hu = bcsp->hu;
hu                696 drivers/bluetooth/hci_bcsp.c 	BT_DBG("hu %p retransmitting %u pkts", hu, bcsp->unack.qlen);
hu                707 drivers/bluetooth/hci_bcsp.c 	hci_uart_tx_wakeup(hu);
hu                710 drivers/bluetooth/hci_bcsp.c static int bcsp_open(struct hci_uart *hu)
hu                714 drivers/bluetooth/hci_bcsp.c 	BT_DBG("hu %p", hu);
hu                720 drivers/bluetooth/hci_bcsp.c 	hu->priv = bcsp;
hu                721 drivers/bluetooth/hci_bcsp.c 	bcsp->hu = hu;
hu                736 drivers/bluetooth/hci_bcsp.c static int bcsp_close(struct hci_uart *hu)
hu                738 drivers/bluetooth/hci_bcsp.c 	struct bcsp_struct *bcsp = hu->priv;
hu                742 drivers/bluetooth/hci_bcsp.c 	hu->priv = NULL;
hu                744 drivers/bluetooth/hci_bcsp.c 	BT_DBG("hu %p", hu);
hu                 41 drivers/bluetooth/hci_h4.c static int h4_open(struct hci_uart *hu)
hu                 45 drivers/bluetooth/hci_h4.c 	BT_DBG("hu %p", hu);
hu                 53 drivers/bluetooth/hci_h4.c 	hu->priv = h4;
hu                 58 drivers/bluetooth/hci_h4.c static int h4_flush(struct hci_uart *hu)
hu                 60 drivers/bluetooth/hci_h4.c 	struct h4_struct *h4 = hu->priv;
hu                 62 drivers/bluetooth/hci_h4.c 	BT_DBG("hu %p", hu);
hu                 70 drivers/bluetooth/hci_h4.c static int h4_close(struct hci_uart *hu)
hu                 72 drivers/bluetooth/hci_h4.c 	struct h4_struct *h4 = hu->priv;
hu                 74 drivers/bluetooth/hci_h4.c 	hu->priv = NULL;
hu                 76 drivers/bluetooth/hci_h4.c 	BT_DBG("hu %p", hu);
hu                 82 drivers/bluetooth/hci_h4.c 	hu->priv = NULL;
hu                 89 drivers/bluetooth/hci_h4.c static int h4_enqueue(struct hci_uart *hu, struct sk_buff *skb)
hu                 91 drivers/bluetooth/hci_h4.c 	struct h4_struct *h4 = hu->priv;
hu                 93 drivers/bluetooth/hci_h4.c 	BT_DBG("hu %p skb %p", hu, skb);
hu                109 drivers/bluetooth/hci_h4.c static int h4_recv(struct hci_uart *hu, const void *data, int count)
hu                111 drivers/bluetooth/hci_h4.c 	struct h4_struct *h4 = hu->priv;
hu                113 drivers/bluetooth/hci_h4.c 	if (!test_bit(HCI_UART_REGISTERED, &hu->flags))
hu                116 drivers/bluetooth/hci_h4.c 	h4->rx_skb = h4_recv_buf(hu->hdev, h4->rx_skb, data, count,
hu                120 drivers/bluetooth/hci_h4.c 		bt_dev_err(hu->hdev, "Frame reassembly failed (%d)", err);
hu                128 drivers/bluetooth/hci_h4.c static struct sk_buff *h4_dequeue(struct hci_uart *hu)
hu                130 drivers/bluetooth/hci_h4.c 	struct h4_struct *h4 = hu->priv;
hu                159 drivers/bluetooth/hci_h4.c 	struct hci_uart *hu = hci_get_drvdata(hdev);
hu                160 drivers/bluetooth/hci_h4.c 	u8 alignment = hu->alignment ? hu->alignment : 1;
hu                170 drivers/bluetooth/hci_h4.c 		for (; hu->padding && count > 0; hu->padding--) {
hu                256 drivers/bluetooth/hci_h4.c 				hu->padding = (skb->len - 1) % alignment;
hu                257 drivers/bluetooth/hci_h4.c 				hu->padding = (alignment - hu->padding) % alignment;
hu                264 drivers/bluetooth/hci_h4.c 			hu->padding = (skb->len - 1) % alignment;
hu                265 drivers/bluetooth/hci_h4.c 			hu->padding = (alignment - hu->padding) % alignment;
hu                 71 drivers/bluetooth/hci_h5.c 	int			(*rx_func)(struct hci_uart *hu, u8 c);
hu                 74 drivers/bluetooth/hci_h5.c 	struct hci_uart		*hu;		/* Parent HCI UART */
hu                110 drivers/bluetooth/hci_h5.c static void h5_link_control(struct hci_uart *hu, const void *data, size_t len)
hu                112 drivers/bluetooth/hci_h5.c 	struct h5 *h5 = hu->priv;
hu                137 drivers/bluetooth/hci_h5.c 	struct hci_uart *hu = h5->hu;
hu                141 drivers/bluetooth/hci_h5.c 	BT_DBG("%s", hu->hdev->name);
hu                144 drivers/bluetooth/hci_h5.c 		h5_link_control(hu, sync_req, sizeof(sync_req));
hu                148 drivers/bluetooth/hci_h5.c 		h5_link_control(hu, conf_req, sizeof(conf_req));
hu                161 drivers/bluetooth/hci_h5.c 	BT_DBG("hu %p retransmitting %u pkts", hu, h5->unack.qlen);
hu                173 drivers/bluetooth/hci_h5.c 	hci_uart_tx_wakeup(hu);
hu                176 drivers/bluetooth/hci_h5.c static void h5_peer_reset(struct hci_uart *hu)
hu                178 drivers/bluetooth/hci_h5.c 	struct h5 *h5 = hu->priv;
hu                194 drivers/bluetooth/hci_h5.c 	hci_reset_dev(hu->hdev);
hu                197 drivers/bluetooth/hci_h5.c static int h5_open(struct hci_uart *hu)
hu                202 drivers/bluetooth/hci_h5.c 	BT_DBG("hu %p", hu);
hu                204 drivers/bluetooth/hci_h5.c 	if (hu->serdev) {
hu                205 drivers/bluetooth/hci_h5.c 		h5 = serdev_device_get_drvdata(hu->serdev);
hu                212 drivers/bluetooth/hci_h5.c 	hu->priv = h5;
hu                213 drivers/bluetooth/hci_h5.c 	h5->hu = hu;
hu                228 drivers/bluetooth/hci_h5.c 	set_bit(HCI_UART_INIT_PENDING, &hu->hdev_flags);
hu                231 drivers/bluetooth/hci_h5.c 	h5_link_control(hu, sync, sizeof(sync));
hu                237 drivers/bluetooth/hci_h5.c static int h5_close(struct hci_uart *hu)
hu                239 drivers/bluetooth/hci_h5.c 	struct h5 *h5 = hu->priv;
hu                250 drivers/bluetooth/hci_h5.c 	if (!hu->serdev)
hu                256 drivers/bluetooth/hci_h5.c static int h5_setup(struct hci_uart *hu)
hu                258 drivers/bluetooth/hci_h5.c 	struct h5 *h5 = hu->priv;
hu                308 drivers/bluetooth/hci_h5.c static void h5_handle_internal_rx(struct hci_uart *hu)
hu                310 drivers/bluetooth/hci_h5.c 	struct h5 *h5 = hu->priv;
hu                321 drivers/bluetooth/hci_h5.c 	BT_DBG("%s", hu->hdev->name);
hu                333 drivers/bluetooth/hci_h5.c 			h5_peer_reset(hu);
hu                334 drivers/bluetooth/hci_h5.c 		h5_link_control(hu, sync_rsp, 2);
hu                337 drivers/bluetooth/hci_h5.c 			h5_peer_reset(hu);
hu                339 drivers/bluetooth/hci_h5.c 		h5_link_control(hu, conf_req, 3);
hu                341 drivers/bluetooth/hci_h5.c 		h5_link_control(hu, conf_rsp, 2);
hu                342 drivers/bluetooth/hci_h5.c 		h5_link_control(hu, conf_req, 3);
hu                348 drivers/bluetooth/hci_h5.c 		hci_uart_init_ready(hu);
hu                359 drivers/bluetooth/hci_h5.c 		h5_link_control(hu, woken_req, 2);
hu                366 drivers/bluetooth/hci_h5.c 	hci_uart_tx_wakeup(hu);
hu                369 drivers/bluetooth/hci_h5.c static void h5_complete_rx_pkt(struct hci_uart *hu)
hu                371 drivers/bluetooth/hci_h5.c 	struct h5 *h5 = hu->priv;
hu                377 drivers/bluetooth/hci_h5.c 		hci_uart_tx_wakeup(hu);
hu                393 drivers/bluetooth/hci_h5.c 		hci_recv_frame(hu->hdev, h5->rx_skb);
hu                399 drivers/bluetooth/hci_h5.c 		h5_handle_internal_rx(hu);
hu                406 drivers/bluetooth/hci_h5.c static int h5_rx_crc(struct hci_uart *hu, unsigned char c)
hu                408 drivers/bluetooth/hci_h5.c 	h5_complete_rx_pkt(hu);
hu                413 drivers/bluetooth/hci_h5.c static int h5_rx_payload(struct hci_uart *hu, unsigned char c)
hu                415 drivers/bluetooth/hci_h5.c 	struct h5 *h5 = hu->priv;
hu                422 drivers/bluetooth/hci_h5.c 		h5_complete_rx_pkt(hu);
hu                428 drivers/bluetooth/hci_h5.c static int h5_rx_3wire_hdr(struct hci_uart *hu, unsigned char c)
hu                430 drivers/bluetooth/hci_h5.c 	struct h5 *h5 = hu->priv;
hu                434 drivers/bluetooth/hci_h5.c 	       hu->hdev->name, H5_HDR_SEQ(hdr), H5_HDR_ACK(hdr),
hu                464 drivers/bluetooth/hci_h5.c static int h5_rx_pkt_start(struct hci_uart *hu, unsigned char c)
hu                466 drivers/bluetooth/hci_h5.c 	struct h5 *h5 = hu->priv;
hu                481 drivers/bluetooth/hci_h5.c 	h5->rx_skb->dev = (void *)hu->hdev;
hu                486 drivers/bluetooth/hci_h5.c static int h5_rx_delimiter(struct hci_uart *hu, unsigned char c)
hu                488 drivers/bluetooth/hci_h5.c 	struct h5 *h5 = hu->priv;
hu                539 drivers/bluetooth/hci_h5.c static int h5_recv(struct hci_uart *hu, const void *data, int count)
hu                541 drivers/bluetooth/hci_h5.c 	struct h5 *h5 = hu->priv;
hu                544 drivers/bluetooth/hci_h5.c 	BT_DBG("%s pending %zu count %d", hu->hdev->name, h5->rx_pending,
hu                563 drivers/bluetooth/hci_h5.c 		processed = h5->rx_func(hu, *ptr);
hu                574 drivers/bluetooth/hci_h5.c static int h5_enqueue(struct hci_uart *hu, struct sk_buff *skb)
hu                576 drivers/bluetooth/hci_h5.c 	struct h5 *h5 = hu->priv;
hu                647 drivers/bluetooth/hci_h5.c static struct sk_buff *h5_prepare_pkt(struct hci_uart *hu, u8 pkt_type,
hu                650 drivers/bluetooth/hci_h5.c 	struct h5 *h5 = hu->priv;
hu                689 drivers/bluetooth/hci_h5.c 	       hu->hdev->name, H5_HDR_SEQ(hdr), H5_HDR_ACK(hdr),
hu                704 drivers/bluetooth/hci_h5.c static struct sk_buff *h5_dequeue(struct hci_uart *hu)
hu                706 drivers/bluetooth/hci_h5.c 	struct h5 *h5 = hu->priv;
hu                720 drivers/bluetooth/hci_h5.c 		return h5_prepare_pkt(hu, HCI_3WIRE_LINK_PKT, wakeup_req, 2);
hu                725 drivers/bluetooth/hci_h5.c 		nskb = h5_prepare_pkt(hu, hci_skb_pkt_type(skb),
hu                743 drivers/bluetooth/hci_h5.c 		nskb = h5_prepare_pkt(hu, hci_skb_pkt_type(skb),
hu                760 drivers/bluetooth/hci_h5.c 		return h5_prepare_pkt(hu, HCI_3WIRE_ACK_PKT, NULL, 0);
hu                765 drivers/bluetooth/hci_h5.c static int h5_flush(struct hci_uart *hu)
hu                767 drivers/bluetooth/hci_h5.c 	BT_DBG("hu %p", hu);
hu                795 drivers/bluetooth/hci_h5.c 	h5->hu = &h5->serdev_hu;
hu                864 drivers/bluetooth/hci_h5.c 	btrtl_dev = btrtl_initialize(h5->hu->hdev, h5->id);
hu                868 drivers/bluetooth/hci_h5.c 	err = btrtl_get_uart_settings(h5->hu->hdev, btrtl_dev,
hu                875 drivers/bluetooth/hci_h5.c 	skb = __hci_cmd_sync(h5->hu->hdev, 0xfc17, sizeof(baudrate_data),
hu                878 drivers/bluetooth/hci_h5.c 		rtl_dev_err(h5->hu->hdev, "set baud rate command failed\n");
hu                887 drivers/bluetooth/hci_h5.c 	serdev_device_set_baudrate(h5->hu->serdev, controller_baudrate);
hu                888 drivers/bluetooth/hci_h5.c 	serdev_device_set_flow_control(h5->hu->serdev, flow_control);
hu                890 drivers/bluetooth/hci_h5.c 	err = btrtl_download_firmware(h5->hu->hdev, btrtl_dev);
hu                903 drivers/bluetooth/hci_h5.c 	serdev_device_set_flow_control(h5->hu->serdev, false);
hu                904 drivers/bluetooth/hci_h5.c 	serdev_device_set_parity(h5->hu->serdev, SERDEV_PARITY_EVEN);
hu                905 drivers/bluetooth/hci_h5.c 	serdev_device_set_baudrate(h5->hu->serdev, 115200);
hu                927 drivers/bluetooth/hci_h5.c 	serdev_device_set_flow_control(h5->hu->serdev, false);
hu                964 drivers/bluetooth/hci_h5.c 	reprobe->dev = get_device(&h5->hu->serdev->dev);
hu                 59 drivers/bluetooth/hci_intel.c 	struct hci_uart *hu;
hu                 71 drivers/bluetooth/hci_intel.c 	struct hci_uart *hu;
hu                107 drivers/bluetooth/hci_intel.c static int intel_wait_booting(struct hci_uart *hu)
hu                109 drivers/bluetooth/hci_intel.c 	struct intel_data *intel = hu->priv;
hu                117 drivers/bluetooth/hci_intel.c 		bt_dev_err(hu->hdev, "Device boot interrupted");
hu                122 drivers/bluetooth/hci_intel.c 		bt_dev_err(hu->hdev, "Device boot timeout");
hu                130 drivers/bluetooth/hci_intel.c static int intel_wait_lpm_transaction(struct hci_uart *hu)
hu                132 drivers/bluetooth/hci_intel.c 	struct intel_data *intel = hu->priv;
hu                140 drivers/bluetooth/hci_intel.c 		bt_dev_err(hu->hdev, "LPM transaction interrupted");
hu                145 drivers/bluetooth/hci_intel.c 		bt_dev_err(hu->hdev, "LPM transaction timeout");
hu                152 drivers/bluetooth/hci_intel.c static int intel_lpm_suspend(struct hci_uart *hu)
hu                155 drivers/bluetooth/hci_intel.c 	struct intel_data *intel = hu->priv;
hu                165 drivers/bluetooth/hci_intel.c 	bt_dev_dbg(hu->hdev, "Suspending");
hu                169 drivers/bluetooth/hci_intel.c 		bt_dev_err(hu->hdev, "Failed to alloc memory for LPM packet");
hu                180 drivers/bluetooth/hci_intel.c 	hci_uart_tx_wakeup(hu);
hu                182 drivers/bluetooth/hci_intel.c 	intel_wait_lpm_transaction(hu);
hu                188 drivers/bluetooth/hci_intel.c 		bt_dev_err(hu->hdev, "Device suspend error");
hu                192 drivers/bluetooth/hci_intel.c 	bt_dev_dbg(hu->hdev, "Suspended");
hu                194 drivers/bluetooth/hci_intel.c 	hci_uart_set_flow_control(hu, true);
hu                199 drivers/bluetooth/hci_intel.c static int intel_lpm_resume(struct hci_uart *hu)
hu                201 drivers/bluetooth/hci_intel.c 	struct intel_data *intel = hu->priv;
hu                208 drivers/bluetooth/hci_intel.c 	bt_dev_dbg(hu->hdev, "Resuming");
hu                210 drivers/bluetooth/hci_intel.c 	hci_uart_set_flow_control(hu, false);
hu                214 drivers/bluetooth/hci_intel.c 		bt_dev_err(hu->hdev, "Failed to alloc memory for LPM packet");
hu                224 drivers/bluetooth/hci_intel.c 	hci_uart_tx_wakeup(hu);
hu                226 drivers/bluetooth/hci_intel.c 	intel_wait_lpm_transaction(hu);
hu                232 drivers/bluetooth/hci_intel.c 		bt_dev_err(hu->hdev, "Device resume error");
hu                236 drivers/bluetooth/hci_intel.c 	bt_dev_dbg(hu->hdev, "Resumed");
hu                242 drivers/bluetooth/hci_intel.c static int intel_lpm_host_wake(struct hci_uart *hu)
hu                245 drivers/bluetooth/hci_intel.c 	struct intel_data *intel = hu->priv;
hu                248 drivers/bluetooth/hci_intel.c 	hci_uart_set_flow_control(hu, false);
hu                254 drivers/bluetooth/hci_intel.c 		bt_dev_err(hu->hdev, "Failed to alloc memory for LPM packet");
hu                263 drivers/bluetooth/hci_intel.c 	hci_uart_tx_wakeup(hu);
hu                265 drivers/bluetooth/hci_intel.c 	bt_dev_dbg(hu->hdev, "Resumed by controller");
hu                277 drivers/bluetooth/hci_intel.c 	if (idev->hu)
hu                278 drivers/bluetooth/hci_intel.c 		intel_lpm_host_wake(idev->hu);
hu                289 drivers/bluetooth/hci_intel.c static int intel_set_power(struct hci_uart *hu, bool powered)
hu                294 drivers/bluetooth/hci_intel.c 	if (!hu->tty->dev)
hu                306 drivers/bluetooth/hci_intel.c 		if (hu->tty->dev->parent != idev->pdev->dev.parent)
hu                315 drivers/bluetooth/hci_intel.c 			hu, dev_name(&idev->pdev->dev), powered);
hu                325 drivers/bluetooth/hci_intel.c 		idev->hu = powered ? hu : NULL;
hu                339 drivers/bluetooth/hci_intel.c 				       hu, idev->irq);
hu                369 drivers/bluetooth/hci_intel.c 	if (!intel->hu->tty->dev)
hu                378 drivers/bluetooth/hci_intel.c 		if (intel->hu->tty->dev->parent == idev->pdev->dev.parent) {
hu                388 drivers/bluetooth/hci_intel.c static int intel_open(struct hci_uart *hu)
hu                392 drivers/bluetooth/hci_intel.c 	BT_DBG("hu %p", hu);
hu                394 drivers/bluetooth/hci_intel.c 	if (!hci_uart_has_flow_control(hu))
hu                404 drivers/bluetooth/hci_intel.c 	intel->hu = hu;
hu                406 drivers/bluetooth/hci_intel.c 	hu->priv = intel;
hu                408 drivers/bluetooth/hci_intel.c 	if (!intel_set_power(hu, true))
hu                414 drivers/bluetooth/hci_intel.c static int intel_close(struct hci_uart *hu)
hu                416 drivers/bluetooth/hci_intel.c 	struct intel_data *intel = hu->priv;
hu                418 drivers/bluetooth/hci_intel.c 	BT_DBG("hu %p", hu);
hu                422 drivers/bluetooth/hci_intel.c 	intel_set_power(hu, false);
hu                428 drivers/bluetooth/hci_intel.c 	hu->priv = NULL;
hu                432 drivers/bluetooth/hci_intel.c static int intel_flush(struct hci_uart *hu)
hu                434 drivers/bluetooth/hci_intel.c 	struct intel_data *intel = hu->priv;
hu                436 drivers/bluetooth/hci_intel.c 	BT_DBG("hu %p", hu);
hu                468 drivers/bluetooth/hci_intel.c static int intel_set_baudrate(struct hci_uart *hu, unsigned int speed)
hu                470 drivers/bluetooth/hci_intel.c 	struct intel_data *intel = hu->priv;
hu                471 drivers/bluetooth/hci_intel.c 	struct hci_dev *hdev = hu->hdev;
hu                479 drivers/bluetooth/hci_intel.c 	err = intel_wait_booting(hu);
hu                515 drivers/bluetooth/hci_intel.c 	hci_uart_set_flow_control(hu, true);
hu                518 drivers/bluetooth/hci_intel.c 	hci_uart_tx_wakeup(hu);
hu                523 drivers/bluetooth/hci_intel.c 	hci_uart_set_baudrate(hu, speed);
hu                524 drivers/bluetooth/hci_intel.c 	hci_uart_set_flow_control(hu, false);
hu                529 drivers/bluetooth/hci_intel.c static int intel_setup(struct hci_uart *hu)
hu                531 drivers/bluetooth/hci_intel.c 	struct intel_data *intel = hu->priv;
hu                532 drivers/bluetooth/hci_intel.c 	struct hci_dev *hdev = hu->hdev;
hu                548 drivers/bluetooth/hci_intel.c 	hu->hdev->set_diag = btintel_set_diag;
hu                549 drivers/bluetooth/hci_intel.c 	hu->hdev->set_bdaddr = btintel_set_bdaddr;
hu                559 drivers/bluetooth/hci_intel.c 	if (hu->init_speed)
hu                560 drivers/bluetooth/hci_intel.c 		init_speed = hu->init_speed;
hu                562 drivers/bluetooth/hci_intel.c 		init_speed = hu->proto->init_speed;
hu                564 drivers/bluetooth/hci_intel.c 	if (hu->oper_speed)
hu                565 drivers/bluetooth/hci_intel.c 		oper_speed = hu->oper_speed;
hu                567 drivers/bluetooth/hci_intel.c 		oper_speed = hu->proto->oper_speed;
hu                573 drivers/bluetooth/hci_intel.c 	err = intel_wait_booting(hu);
hu                804 drivers/bluetooth/hci_intel.c 		err = intel_set_baudrate(hu, init_speed);
hu                826 drivers/bluetooth/hci_intel.c 	err = intel_wait_booting(hu);
hu                845 drivers/bluetooth/hci_intel.c 		if (!hu->tty->dev)
hu                847 drivers/bluetooth/hci_intel.c 		if (hu->tty->dev->parent == dev->pdev->dev.parent) {
hu                866 drivers/bluetooth/hci_intel.c 		err = intel_set_baudrate(hu, oper_speed);
hu                880 drivers/bluetooth/hci_intel.c 	struct hci_uart *hu = hci_get_drvdata(hdev);
hu                881 drivers/bluetooth/hci_intel.c 	struct intel_data *intel = hu->priv;
hu                918 drivers/bluetooth/hci_intel.c 	struct hci_uart *hu = hci_get_drvdata(hdev);
hu                919 drivers/bluetooth/hci_intel.c 	struct intel_data *intel = hu->priv;
hu                934 drivers/bluetooth/hci_intel.c 	struct hci_uart *hu = hci_get_drvdata(hdev);
hu                935 drivers/bluetooth/hci_intel.c 	struct intel_data *intel = hu->priv;
hu                940 drivers/bluetooth/hci_intel.c 			bt_dev_err(hu->hdev, "Invalid LPM notification packet");
hu                979 drivers/bluetooth/hci_intel.c static int intel_recv(struct hci_uart *hu, const void *data, int count)
hu                981 drivers/bluetooth/hci_intel.c 	struct intel_data *intel = hu->priv;
hu                983 drivers/bluetooth/hci_intel.c 	if (!test_bit(HCI_UART_REGISTERED, &hu->flags))
hu                986 drivers/bluetooth/hci_intel.c 	intel->rx_skb = h4_recv_buf(hu->hdev, intel->rx_skb, data, count,
hu                991 drivers/bluetooth/hci_intel.c 		bt_dev_err(hu->hdev, "Frame reassembly failed (%d)", err);
hu                999 drivers/bluetooth/hci_intel.c static int intel_enqueue(struct hci_uart *hu, struct sk_buff *skb)
hu               1001 drivers/bluetooth/hci_intel.c 	struct intel_data *intel = hu->priv;
hu               1004 drivers/bluetooth/hci_intel.c 	BT_DBG("hu %p skb %p", hu, skb);
hu               1006 drivers/bluetooth/hci_intel.c 	if (!hu->tty->dev)
hu               1017 drivers/bluetooth/hci_intel.c 		if (hu->tty->dev->parent == idev->pdev->dev.parent) {
hu               1031 drivers/bluetooth/hci_intel.c static struct sk_buff *intel_dequeue(struct hci_uart *hu)
hu               1033 drivers/bluetooth/hci_intel.c 	struct intel_data *intel = hu->priv;
hu               1051 drivers/bluetooth/hci_intel.c 			inject_cmd_complete(hu->hdev, opcode);
hu               1090 drivers/bluetooth/hci_intel.c 	if (idev->hu)
hu               1091 drivers/bluetooth/hci_intel.c 		intel_lpm_suspend(idev->hu);
hu               1102 drivers/bluetooth/hci_intel.c 	if (idev->hu)
hu               1103 drivers/bluetooth/hci_intel.c 		intel_lpm_resume(idev->hu);
hu                 78 drivers/bluetooth/hci_ldisc.c static inline void hci_uart_tx_complete(struct hci_uart *hu, int pkt_type)
hu                 80 drivers/bluetooth/hci_ldisc.c 	struct hci_dev *hdev = hu->hdev;
hu                 98 drivers/bluetooth/hci_ldisc.c static inline struct sk_buff *hci_uart_dequeue(struct hci_uart *hu)
hu                100 drivers/bluetooth/hci_ldisc.c 	struct sk_buff *skb = hu->tx_skb;
hu                103 drivers/bluetooth/hci_ldisc.c 		percpu_down_read(&hu->proto_lock);
hu                105 drivers/bluetooth/hci_ldisc.c 		if (test_bit(HCI_UART_PROTO_READY, &hu->flags))
hu                106 drivers/bluetooth/hci_ldisc.c 			skb = hu->proto->dequeue(hu);
hu                108 drivers/bluetooth/hci_ldisc.c 		percpu_up_read(&hu->proto_lock);
hu                110 drivers/bluetooth/hci_ldisc.c 		hu->tx_skb = NULL;
hu                116 drivers/bluetooth/hci_ldisc.c int hci_uart_tx_wakeup(struct hci_uart *hu)
hu                124 drivers/bluetooth/hci_ldisc.c 	if (!percpu_down_read_trylock(&hu->proto_lock))
hu                127 drivers/bluetooth/hci_ldisc.c 	if (!test_bit(HCI_UART_PROTO_READY, &hu->flags))
hu                130 drivers/bluetooth/hci_ldisc.c 	if (test_and_set_bit(HCI_UART_SENDING, &hu->tx_state)) {
hu                131 drivers/bluetooth/hci_ldisc.c 		set_bit(HCI_UART_TX_WAKEUP, &hu->tx_state);
hu                137 drivers/bluetooth/hci_ldisc.c 	schedule_work(&hu->write_work);
hu                140 drivers/bluetooth/hci_ldisc.c 	percpu_up_read(&hu->proto_lock);
hu                148 drivers/bluetooth/hci_ldisc.c 	struct hci_uart *hu = container_of(work, struct hci_uart, write_work);
hu                149 drivers/bluetooth/hci_ldisc.c 	struct tty_struct *tty = hu->tty;
hu                150 drivers/bluetooth/hci_ldisc.c 	struct hci_dev *hdev = hu->hdev;
hu                158 drivers/bluetooth/hci_ldisc.c 	clear_bit(HCI_UART_TX_WAKEUP, &hu->tx_state);
hu                160 drivers/bluetooth/hci_ldisc.c 	while ((skb = hci_uart_dequeue(hu))) {
hu                169 drivers/bluetooth/hci_ldisc.c 			hu->tx_skb = skb;
hu                173 drivers/bluetooth/hci_ldisc.c 		hci_uart_tx_complete(hu, hci_skb_pkt_type(skb));
hu                177 drivers/bluetooth/hci_ldisc.c 	if (test_bit(HCI_UART_TX_WAKEUP, &hu->tx_state))
hu                180 drivers/bluetooth/hci_ldisc.c 	clear_bit(HCI_UART_SENDING, &hu->tx_state);
hu                181 drivers/bluetooth/hci_ldisc.c 	wake_up_bit(&hu->tx_state, HCI_UART_SENDING);
hu                186 drivers/bluetooth/hci_ldisc.c 	struct hci_uart *hu = container_of(work, struct hci_uart, init_ready);
hu                190 drivers/bluetooth/hci_ldisc.c 	if (!test_and_clear_bit(HCI_UART_INIT_PENDING, &hu->hdev_flags))
hu                193 drivers/bluetooth/hci_ldisc.c 	err = hci_register_dev(hu->hdev);
hu                196 drivers/bluetooth/hci_ldisc.c 		clear_bit(HCI_UART_PROTO_READY, &hu->flags);
hu                197 drivers/bluetooth/hci_ldisc.c 		hu->proto->close(hu);
hu                198 drivers/bluetooth/hci_ldisc.c 		hdev = hu->hdev;
hu                199 drivers/bluetooth/hci_ldisc.c 		hu->hdev = NULL;
hu                204 drivers/bluetooth/hci_ldisc.c 	set_bit(HCI_UART_REGISTERED, &hu->flags);
hu                207 drivers/bluetooth/hci_ldisc.c int hci_uart_init_ready(struct hci_uart *hu)
hu                209 drivers/bluetooth/hci_ldisc.c 	if (!test_bit(HCI_UART_INIT_PENDING, &hu->hdev_flags))
hu                212 drivers/bluetooth/hci_ldisc.c 	schedule_work(&hu->init_ready);
hu                217 drivers/bluetooth/hci_ldisc.c int hci_uart_wait_until_sent(struct hci_uart *hu)
hu                219 drivers/bluetooth/hci_ldisc.c 	return wait_on_bit_timeout(&hu->tx_state, HCI_UART_SENDING,
hu                228 drivers/bluetooth/hci_ldisc.c 	struct hci_uart *hu  = hci_get_drvdata(hdev);
hu                229 drivers/bluetooth/hci_ldisc.c 	struct tty_struct *tty = hu->tty;
hu                233 drivers/bluetooth/hci_ldisc.c 	if (hu->tx_skb) {
hu                234 drivers/bluetooth/hci_ldisc.c 		kfree_skb(hu->tx_skb); hu->tx_skb = NULL;
hu                241 drivers/bluetooth/hci_ldisc.c 	percpu_down_read(&hu->proto_lock);
hu                243 drivers/bluetooth/hci_ldisc.c 	if (test_bit(HCI_UART_PROTO_READY, &hu->flags))
hu                244 drivers/bluetooth/hci_ldisc.c 		hu->proto->flush(hu);
hu                246 drivers/bluetooth/hci_ldisc.c 	percpu_up_read(&hu->proto_lock);
hu                275 drivers/bluetooth/hci_ldisc.c 	struct hci_uart *hu = hci_get_drvdata(hdev);
hu                280 drivers/bluetooth/hci_ldisc.c 	percpu_down_read(&hu->proto_lock);
hu                282 drivers/bluetooth/hci_ldisc.c 	if (!test_bit(HCI_UART_PROTO_READY, &hu->flags)) {
hu                283 drivers/bluetooth/hci_ldisc.c 		percpu_up_read(&hu->proto_lock);
hu                287 drivers/bluetooth/hci_ldisc.c 	hu->proto->enqueue(hu, skb);
hu                288 drivers/bluetooth/hci_ldisc.c 	percpu_up_read(&hu->proto_lock);
hu                290 drivers/bluetooth/hci_ldisc.c 	hci_uart_tx_wakeup(hu);
hu                296 drivers/bluetooth/hci_ldisc.c bool hci_uart_has_flow_control(struct hci_uart *hu)
hu                299 drivers/bluetooth/hci_ldisc.c 	if (hu->serdev)
hu                302 drivers/bluetooth/hci_ldisc.c 	if (hu->tty->driver->ops->tiocmget && hu->tty->driver->ops->tiocmset)
hu                309 drivers/bluetooth/hci_ldisc.c void hci_uart_set_flow_control(struct hci_uart *hu, bool enable)
hu                311 drivers/bluetooth/hci_ldisc.c 	struct tty_struct *tty = hu->tty;
hu                317 drivers/bluetooth/hci_ldisc.c 	if (hu->serdev) {
hu                318 drivers/bluetooth/hci_ldisc.c 		serdev_device_set_flow_control(hu->serdev, !enable);
hu                319 drivers/bluetooth/hci_ldisc.c 		serdev_device_set_rts(hu->serdev, !enable);
hu                367 drivers/bluetooth/hci_ldisc.c void hci_uart_set_speeds(struct hci_uart *hu, unsigned int init_speed,
hu                370 drivers/bluetooth/hci_ldisc.c 	hu->init_speed = init_speed;
hu                371 drivers/bluetooth/hci_ldisc.c 	hu->oper_speed = oper_speed;
hu                374 drivers/bluetooth/hci_ldisc.c void hci_uart_set_baudrate(struct hci_uart *hu, unsigned int speed)
hu                376 drivers/bluetooth/hci_ldisc.c 	struct tty_struct *tty = hu->tty;
hu                386 drivers/bluetooth/hci_ldisc.c 	BT_DBG("%s: New tty speeds: %d/%d", hu->hdev->name,
hu                392 drivers/bluetooth/hci_ldisc.c 	struct hci_uart *hu = hci_get_drvdata(hdev);
hu                399 drivers/bluetooth/hci_ldisc.c 	if (hu->init_speed)
hu                400 drivers/bluetooth/hci_ldisc.c 		speed = hu->init_speed;
hu                401 drivers/bluetooth/hci_ldisc.c 	else if (hu->proto->init_speed)
hu                402 drivers/bluetooth/hci_ldisc.c 		speed = hu->proto->init_speed;
hu                407 drivers/bluetooth/hci_ldisc.c 		hci_uart_set_baudrate(hu, speed);
hu                410 drivers/bluetooth/hci_ldisc.c 	if (hu->oper_speed)
hu                411 drivers/bluetooth/hci_ldisc.c 		speed = hu->oper_speed;
hu                412 drivers/bluetooth/hci_ldisc.c 	else if (hu->proto->oper_speed)
hu                413 drivers/bluetooth/hci_ldisc.c 		speed = hu->proto->oper_speed;
hu                417 drivers/bluetooth/hci_ldisc.c 	if (hu->proto->set_baudrate && speed) {
hu                418 drivers/bluetooth/hci_ldisc.c 		err = hu->proto->set_baudrate(hu, speed);
hu                420 drivers/bluetooth/hci_ldisc.c 			hci_uart_set_baudrate(hu, speed);
hu                423 drivers/bluetooth/hci_ldisc.c 	if (hu->proto->setup)
hu                424 drivers/bluetooth/hci_ldisc.c 		return hu->proto->setup(hu);
hu                426 drivers/bluetooth/hci_ldisc.c 	if (!test_bit(HCI_UART_VND_DETECT, &hu->hdev_flags))
hu                479 drivers/bluetooth/hci_ldisc.c 	struct hci_uart *hu;
hu                489 drivers/bluetooth/hci_ldisc.c 	hu = kzalloc(sizeof(struct hci_uart), GFP_KERNEL);
hu                490 drivers/bluetooth/hci_ldisc.c 	if (!hu) {
hu                495 drivers/bluetooth/hci_ldisc.c 	tty->disc_data = hu;
hu                496 drivers/bluetooth/hci_ldisc.c 	hu->tty = tty;
hu                500 drivers/bluetooth/hci_ldisc.c 	hu->alignment = 1;
hu                501 drivers/bluetooth/hci_ldisc.c 	hu->padding = 0;
hu                503 drivers/bluetooth/hci_ldisc.c 	INIT_WORK(&hu->init_ready, hci_uart_init_work);
hu                504 drivers/bluetooth/hci_ldisc.c 	INIT_WORK(&hu->write_work, hci_uart_write_work);
hu                506 drivers/bluetooth/hci_ldisc.c 	percpu_init_rwsem(&hu->proto_lock);
hu                521 drivers/bluetooth/hci_ldisc.c 	struct hci_uart *hu = tty->disc_data;
hu                529 drivers/bluetooth/hci_ldisc.c 	if (!hu)
hu                532 drivers/bluetooth/hci_ldisc.c 	hdev = hu->hdev;
hu                536 drivers/bluetooth/hci_ldisc.c 	if (test_bit(HCI_UART_PROTO_READY, &hu->flags)) {
hu                537 drivers/bluetooth/hci_ldisc.c 		percpu_down_write(&hu->proto_lock);
hu                538 drivers/bluetooth/hci_ldisc.c 		clear_bit(HCI_UART_PROTO_READY, &hu->flags);
hu                539 drivers/bluetooth/hci_ldisc.c 		percpu_up_write(&hu->proto_lock);
hu                541 drivers/bluetooth/hci_ldisc.c 		cancel_work_sync(&hu->write_work);
hu                544 drivers/bluetooth/hci_ldisc.c 			if (test_bit(HCI_UART_REGISTERED, &hu->flags))
hu                548 drivers/bluetooth/hci_ldisc.c 		hu->proto->close(hu);
hu                550 drivers/bluetooth/hci_ldisc.c 	clear_bit(HCI_UART_PROTO_SET, &hu->flags);
hu                552 drivers/bluetooth/hci_ldisc.c 	percpu_free_rwsem(&hu->proto_lock);
hu                554 drivers/bluetooth/hci_ldisc.c 	kfree(hu);
hu                567 drivers/bluetooth/hci_ldisc.c 	struct hci_uart *hu = tty->disc_data;
hu                571 drivers/bluetooth/hci_ldisc.c 	if (!hu)
hu                576 drivers/bluetooth/hci_ldisc.c 	if (tty != hu->tty)
hu                579 drivers/bluetooth/hci_ldisc.c 	if (test_bit(HCI_UART_PROTO_READY, &hu->flags))
hu                580 drivers/bluetooth/hci_ldisc.c 		hci_uart_tx_wakeup(hu);
hu                598 drivers/bluetooth/hci_ldisc.c 	struct hci_uart *hu = tty->disc_data;
hu                600 drivers/bluetooth/hci_ldisc.c 	if (!hu || tty != hu->tty)
hu                603 drivers/bluetooth/hci_ldisc.c 	percpu_down_read(&hu->proto_lock);
hu                605 drivers/bluetooth/hci_ldisc.c 	if (!test_bit(HCI_UART_PROTO_READY, &hu->flags)) {
hu                606 drivers/bluetooth/hci_ldisc.c 		percpu_up_read(&hu->proto_lock);
hu                613 drivers/bluetooth/hci_ldisc.c 	hu->proto->recv(hu, data, count);
hu                614 drivers/bluetooth/hci_ldisc.c 	percpu_up_read(&hu->proto_lock);
hu                616 drivers/bluetooth/hci_ldisc.c 	if (hu->hdev)
hu                617 drivers/bluetooth/hci_ldisc.c 		hu->hdev->stat.byte_rx += count;
hu                622 drivers/bluetooth/hci_ldisc.c static int hci_uart_register_dev(struct hci_uart *hu)
hu                636 drivers/bluetooth/hci_ldisc.c 	hu->hdev = hdev;
hu                639 drivers/bluetooth/hci_ldisc.c 	hci_set_drvdata(hdev, hu);
hu                645 drivers/bluetooth/hci_ldisc.c 	if (hu->proto->setup)
hu                646 drivers/bluetooth/hci_ldisc.c 		hdev->manufacturer = hu->proto->manufacturer;
hu                653 drivers/bluetooth/hci_ldisc.c 	SET_HCIDEV_DEV(hdev, hu->tty->dev);
hu                655 drivers/bluetooth/hci_ldisc.c 	if (test_bit(HCI_UART_RAW_DEVICE, &hu->hdev_flags))
hu                658 drivers/bluetooth/hci_ldisc.c 	if (test_bit(HCI_UART_EXT_CONFIG, &hu->hdev_flags))
hu                661 drivers/bluetooth/hci_ldisc.c 	if (!test_bit(HCI_UART_RESET_ON_INIT, &hu->hdev_flags))
hu                664 drivers/bluetooth/hci_ldisc.c 	if (test_bit(HCI_UART_CREATE_AMP, &hu->hdev_flags))
hu                672 drivers/bluetooth/hci_ldisc.c 	err = hu->proto->open(hu);
hu                674 drivers/bluetooth/hci_ldisc.c 		hu->hdev = NULL;
hu                679 drivers/bluetooth/hci_ldisc.c 	if (test_bit(HCI_UART_INIT_PENDING, &hu->hdev_flags))
hu                684 drivers/bluetooth/hci_ldisc.c 		hu->proto->close(hu);
hu                685 drivers/bluetooth/hci_ldisc.c 		hu->hdev = NULL;
hu                690 drivers/bluetooth/hci_ldisc.c 	set_bit(HCI_UART_REGISTERED, &hu->flags);
hu                695 drivers/bluetooth/hci_ldisc.c static int hci_uart_set_proto(struct hci_uart *hu, int id)
hu                704 drivers/bluetooth/hci_ldisc.c 	hu->proto = p;
hu                706 drivers/bluetooth/hci_ldisc.c 	err = hci_uart_register_dev(hu);
hu                711 drivers/bluetooth/hci_ldisc.c 	set_bit(HCI_UART_PROTO_READY, &hu->flags);
hu                715 drivers/bluetooth/hci_ldisc.c static int hci_uart_set_flags(struct hci_uart *hu, unsigned long flags)
hu                727 drivers/bluetooth/hci_ldisc.c 	hu->hdev_flags = flags;
hu                748 drivers/bluetooth/hci_ldisc.c 	struct hci_uart *hu = tty->disc_data;
hu                754 drivers/bluetooth/hci_ldisc.c 	if (!hu)
hu                759 drivers/bluetooth/hci_ldisc.c 		if (!test_and_set_bit(HCI_UART_PROTO_SET, &hu->flags)) {
hu                760 drivers/bluetooth/hci_ldisc.c 			err = hci_uart_set_proto(hu, arg);
hu                762 drivers/bluetooth/hci_ldisc.c 				clear_bit(HCI_UART_PROTO_SET, &hu->flags);
hu                768 drivers/bluetooth/hci_ldisc.c 		if (test_bit(HCI_UART_PROTO_SET, &hu->flags))
hu                769 drivers/bluetooth/hci_ldisc.c 			err = hu->proto->id;
hu                775 drivers/bluetooth/hci_ldisc.c 		if (test_bit(HCI_UART_REGISTERED, &hu->flags))
hu                776 drivers/bluetooth/hci_ldisc.c 			err = hu->hdev->id;
hu                782 drivers/bluetooth/hci_ldisc.c 		if (test_bit(HCI_UART_PROTO_SET, &hu->flags))
hu                785 drivers/bluetooth/hci_ldisc.c 			err = hci_uart_set_flags(hu, arg);
hu                789 drivers/bluetooth/hci_ldisc.c 		err = hu->hdev_flags;
hu                 66 drivers/bluetooth/hci_ll.c 	struct hci_uart hu;
hu                 85 drivers/bluetooth/hci_ll.c static int send_hcill_cmd(u8 cmd, struct hci_uart *hu)
hu                 89 drivers/bluetooth/hci_ll.c 	struct ll_struct *ll = hu->priv;
hu                 91 drivers/bluetooth/hci_ll.c 	BT_DBG("hu %p cmd 0x%x", hu, cmd);
hu                111 drivers/bluetooth/hci_ll.c static int ll_open(struct hci_uart *hu)
hu                115 drivers/bluetooth/hci_ll.c 	BT_DBG("hu %p", hu);
hu                127 drivers/bluetooth/hci_ll.c 	hu->priv = ll;
hu                129 drivers/bluetooth/hci_ll.c 	if (hu->serdev) {
hu                130 drivers/bluetooth/hci_ll.c 		struct ll_device *lldev = serdev_device_get_drvdata(hu->serdev);
hu                140 drivers/bluetooth/hci_ll.c static int ll_flush(struct hci_uart *hu)
hu                142 drivers/bluetooth/hci_ll.c 	struct ll_struct *ll = hu->priv;
hu                144 drivers/bluetooth/hci_ll.c 	BT_DBG("hu %p", hu);
hu                153 drivers/bluetooth/hci_ll.c static int ll_close(struct hci_uart *hu)
hu                155 drivers/bluetooth/hci_ll.c 	struct ll_struct *ll = hu->priv;
hu                157 drivers/bluetooth/hci_ll.c 	BT_DBG("hu %p", hu);
hu                164 drivers/bluetooth/hci_ll.c 	if (hu->serdev) {
hu                165 drivers/bluetooth/hci_ll.c 		struct ll_device *lldev = serdev_device_get_drvdata(hu->serdev);
hu                172 drivers/bluetooth/hci_ll.c 	hu->priv = NULL;
hu                199 drivers/bluetooth/hci_ll.c static void ll_device_want_to_wakeup(struct hci_uart *hu)
hu                202 drivers/bluetooth/hci_ll.c 	struct ll_struct *ll = hu->priv;
hu                204 drivers/bluetooth/hci_ll.c 	BT_DBG("hu %p", hu);
hu                225 drivers/bluetooth/hci_ll.c 		if (send_hcill_cmd(HCILL_WAKE_UP_ACK, hu) < 0) {
hu                244 drivers/bluetooth/hci_ll.c 	hci_uart_tx_wakeup(hu);
hu                250 drivers/bluetooth/hci_ll.c static void ll_device_want_to_sleep(struct hci_uart *hu)
hu                253 drivers/bluetooth/hci_ll.c 	struct ll_struct *ll = hu->priv;
hu                255 drivers/bluetooth/hci_ll.c 	BT_DBG("hu %p", hu);
hu                266 drivers/bluetooth/hci_ll.c 	if (send_hcill_cmd(HCILL_GO_TO_SLEEP_ACK, hu) < 0) {
hu                278 drivers/bluetooth/hci_ll.c 	hci_uart_tx_wakeup(hu);
hu                284 drivers/bluetooth/hci_ll.c static void ll_device_woke_up(struct hci_uart *hu)
hu                287 drivers/bluetooth/hci_ll.c 	struct ll_struct *ll = hu->priv;
hu                289 drivers/bluetooth/hci_ll.c 	BT_DBG("hu %p", hu);
hu                305 drivers/bluetooth/hci_ll.c 	hci_uart_tx_wakeup(hu);
hu                310 drivers/bluetooth/hci_ll.c static int ll_enqueue(struct hci_uart *hu, struct sk_buff *skb)
hu                313 drivers/bluetooth/hci_ll.c 	struct ll_struct *ll = hu->priv;
hu                315 drivers/bluetooth/hci_ll.c 	BT_DBG("hu %p skb %p", hu, skb);
hu                334 drivers/bluetooth/hci_ll.c 		if (send_hcill_cmd(HCILL_WAKE_UP_IND, hu) < 0) {
hu                359 drivers/bluetooth/hci_ll.c 	struct hci_uart *hu = hci_get_drvdata(hdev);
hu                360 drivers/bluetooth/hci_ll.c 	struct ll_struct *ll = hu->priv;
hu                365 drivers/bluetooth/hci_ll.c 		ll_device_want_to_sleep(hu);
hu                374 drivers/bluetooth/hci_ll.c 		ll_device_want_to_wakeup(hu);
hu                378 drivers/bluetooth/hci_ll.c 		ll_device_woke_up(hu);
hu                425 drivers/bluetooth/hci_ll.c static int ll_recv(struct hci_uart *hu, const void *data, int count)
hu                427 drivers/bluetooth/hci_ll.c 	struct ll_struct *ll = hu->priv;
hu                429 drivers/bluetooth/hci_ll.c 	if (!test_bit(HCI_UART_REGISTERED, &hu->flags))
hu                432 drivers/bluetooth/hci_ll.c 	ll->rx_skb = h4_recv_buf(hu->hdev, ll->rx_skb, data, count,
hu                436 drivers/bluetooth/hci_ll.c 		bt_dev_err(hu->hdev, "Frame reassembly failed (%d)", err);
hu                444 drivers/bluetooth/hci_ll.c static struct sk_buff *ll_dequeue(struct hci_uart *hu)
hu                446 drivers/bluetooth/hci_ll.c 	struct ll_struct *ll = hu->priv;
hu                495 drivers/bluetooth/hci_ll.c 		bt_dev_warn(lldev->hu.hdev,
hu                500 drivers/bluetooth/hci_ll.c 		bt_dev_dbg(lldev->hu.hdev, "command type %d", cmd->prefix);
hu                502 drivers/bluetooth/hci_ll.c 	skb = __hci_cmd_sync(lldev->hu.hdev, cmd->opcode, cmd->plen,
hu                505 drivers/bluetooth/hci_ll.c 		bt_dev_err(lldev->hu.hdev, "send command failed");
hu                526 drivers/bluetooth/hci_ll.c 	version = read_local_version(lldev->hu.hdev);
hu                542 drivers/bluetooth/hci_ll.c 		bt_dev_err(lldev->hu.hdev, "request_firmware failed(errno %d) for %s",
hu                555 drivers/bluetooth/hci_ll.c 		bt_dev_dbg(lldev->hu.hdev, " action size %d, type %d ",
hu                563 drivers/bluetooth/hci_ll.c 			bt_dev_dbg(lldev->hu.hdev, "S");
hu                571 drivers/bluetooth/hci_ll.c 			bt_dev_dbg(lldev->hu.hdev, "W");
hu                574 drivers/bluetooth/hci_ll.c 			bt_dev_info(lldev->hu.hdev, "sleep command in scr");
hu                608 drivers/bluetooth/hci_ll.c static int ll_setup(struct hci_uart *hu)
hu                612 drivers/bluetooth/hci_ll.c 	struct serdev_device *serdev = hu->serdev;
hu                620 drivers/bluetooth/hci_ll.c 	hu->hdev->set_bdaddr = ll_set_bdaddr;
hu                631 drivers/bluetooth/hci_ll.c 			bt_dev_err(hu->hdev, "Failed to get CTS");
hu                640 drivers/bluetooth/hci_ll.c 		bt_dev_err(hu->hdev, "download firmware failed, retrying...");
hu                651 drivers/bluetooth/hci_ll.c 		set_bit(HCI_QUIRK_INVALID_BDADDR, &hu->hdev->quirks);
hu                653 drivers/bluetooth/hci_ll.c 		err = ll_set_bdaddr(hu->hdev, &lldev->bdaddr);
hu                655 drivers/bluetooth/hci_ll.c 			set_bit(HCI_QUIRK_INVALID_BDADDR, &hu->hdev->quirks);
hu                659 drivers/bluetooth/hci_ll.c 	if (hu->oper_speed)
hu                660 drivers/bluetooth/hci_ll.c 		speed = hu->oper_speed;
hu                661 drivers/bluetooth/hci_ll.c 	else if (hu->proto->oper_speed)
hu                662 drivers/bluetooth/hci_ll.c 		speed = hu->proto->oper_speed;
hu                670 drivers/bluetooth/hci_ll.c 		skb = __hci_cmd_sync(hu->hdev, HCI_VS_UPDATE_UART_HCI_BAUDRATE,
hu                686 drivers/bluetooth/hci_ll.c 	struct hci_uart *hu;
hu                694 drivers/bluetooth/hci_ll.c 	hu = &lldev->hu;
hu                697 drivers/bluetooth/hci_ll.c 	lldev->serdev = hu->serdev = serdev;
hu                710 drivers/bluetooth/hci_ll.c 	hci_uart_set_speeds(hu, 115200, max_speed);
hu                758 drivers/bluetooth/hci_ll.c 	return hci_uart_register_device(hu, &llp);
hu                765 drivers/bluetooth/hci_ll.c 	hci_uart_unregister_device(&lldev->hu);
hu                 46 drivers/bluetooth/hci_mrvl.c 	struct hci_uart hu;
hu                 55 drivers/bluetooth/hci_mrvl.c static int mrvl_open(struct hci_uart *hu)
hu                 60 drivers/bluetooth/hci_mrvl.c 	BT_DBG("hu %p", hu);
hu                 62 drivers/bluetooth/hci_mrvl.c 	if (!hci_uart_has_flow_control(hu))
hu                 74 drivers/bluetooth/hci_mrvl.c 	hu->priv = mrvl;
hu                 76 drivers/bluetooth/hci_mrvl.c 	if (hu->serdev) {
hu                 77 drivers/bluetooth/hci_mrvl.c 		ret = serdev_device_open(hu->serdev);
hu                 89 drivers/bluetooth/hci_mrvl.c static int mrvl_close(struct hci_uart *hu)
hu                 91 drivers/bluetooth/hci_mrvl.c 	struct mrvl_data *mrvl = hu->priv;
hu                 93 drivers/bluetooth/hci_mrvl.c 	BT_DBG("hu %p", hu);
hu                 95 drivers/bluetooth/hci_mrvl.c 	if (hu->serdev)
hu                 96 drivers/bluetooth/hci_mrvl.c 		serdev_device_close(hu->serdev);
hu                103 drivers/bluetooth/hci_mrvl.c 	hu->priv = NULL;
hu                107 drivers/bluetooth/hci_mrvl.c static int mrvl_flush(struct hci_uart *hu)
hu                109 drivers/bluetooth/hci_mrvl.c 	struct mrvl_data *mrvl = hu->priv;
hu                111 drivers/bluetooth/hci_mrvl.c 	BT_DBG("hu %p", hu);
hu                119 drivers/bluetooth/hci_mrvl.c static struct sk_buff *mrvl_dequeue(struct hci_uart *hu)
hu                121 drivers/bluetooth/hci_mrvl.c 	struct mrvl_data *mrvl = hu->priv;
hu                136 drivers/bluetooth/hci_mrvl.c static int mrvl_enqueue(struct hci_uart *hu, struct sk_buff *skb)
hu                138 drivers/bluetooth/hci_mrvl.c 	struct mrvl_data *mrvl = hu->priv;
hu                144 drivers/bluetooth/hci_mrvl.c static void mrvl_send_ack(struct hci_uart *hu, unsigned char type)
hu                146 drivers/bluetooth/hci_mrvl.c 	struct mrvl_data *mrvl = hu->priv;
hu                152 drivers/bluetooth/hci_mrvl.c 		bt_dev_err(hu->hdev, "Unable to alloc ack/nak packet");
hu                158 drivers/bluetooth/hci_mrvl.c 	hci_uart_tx_wakeup(hu);
hu                164 drivers/bluetooth/hci_mrvl.c 	struct hci_uart *hu = hci_get_drvdata(hdev);
hu                165 drivers/bluetooth/hci_mrvl.c 	struct mrvl_data *mrvl = hu->priv;
hu                170 drivers/bluetooth/hci_mrvl.c 		mrvl_send_ack(hu, MRVL_NAK);
hu                174 drivers/bluetooth/hci_mrvl.c 	mrvl_send_ack(hu, MRVL_ACK);
hu                196 drivers/bluetooth/hci_mrvl.c 	struct hci_uart *hu = hci_get_drvdata(hdev);
hu                197 drivers/bluetooth/hci_mrvl.c 	struct mrvl_data *mrvl = hu->priv;
hu                203 drivers/bluetooth/hci_mrvl.c 		mrvl_send_ack(hu, MRVL_NAK);
hu                207 drivers/bluetooth/hci_mrvl.c 	mrvl_send_ack(hu, MRVL_ACK);
hu                250 drivers/bluetooth/hci_mrvl.c static int mrvl_recv(struct hci_uart *hu, const void *data, int count)
hu                252 drivers/bluetooth/hci_mrvl.c 	struct mrvl_data *mrvl = hu->priv;
hu                254 drivers/bluetooth/hci_mrvl.c 	if (!test_bit(HCI_UART_REGISTERED, &hu->flags))
hu                257 drivers/bluetooth/hci_mrvl.c 	mrvl->rx_skb = h4_recv_buf(hu->hdev, mrvl->rx_skb, data, count,
hu                262 drivers/bluetooth/hci_mrvl.c 		bt_dev_err(hu->hdev, "Frame reassembly failed (%d)", err);
hu                272 drivers/bluetooth/hci_mrvl.c 	struct hci_uart *hu = hci_get_drvdata(hdev);
hu                273 drivers/bluetooth/hci_mrvl.c 	struct mrvl_data *mrvl = hu->priv;
hu                347 drivers/bluetooth/hci_mrvl.c 		hci_uart_tx_wakeup(hu);
hu                354 drivers/bluetooth/hci_mrvl.c static int mrvl_setup(struct hci_uart *hu)
hu                358 drivers/bluetooth/hci_mrvl.c 	hci_uart_set_flow_control(hu, true);
hu                360 drivers/bluetooth/hci_mrvl.c 	err = mrvl_load_firmware(hu->hdev, "mrvl/helper_uart_3000000.bin");
hu                362 drivers/bluetooth/hci_mrvl.c 		bt_dev_err(hu->hdev, "Unable to download firmware helper");
hu                367 drivers/bluetooth/hci_mrvl.c 	hci_uart_wait_until_sent(hu);
hu                369 drivers/bluetooth/hci_mrvl.c 	if (hu->serdev)
hu                370 drivers/bluetooth/hci_mrvl.c 		serdev_device_set_baudrate(hu->serdev, 3000000);
hu                372 drivers/bluetooth/hci_mrvl.c 		hci_uart_set_baudrate(hu, 3000000);
hu                374 drivers/bluetooth/hci_mrvl.c 	hci_uart_set_flow_control(hu, false);
hu                376 drivers/bluetooth/hci_mrvl.c 	err = mrvl_load_firmware(hu->hdev, "mrvl/uart8897_bt.bin");
hu                404 drivers/bluetooth/hci_mrvl.c 	mrvldev->hu.serdev = serdev;
hu                407 drivers/bluetooth/hci_mrvl.c 	return hci_uart_register_device(&mrvldev->hu, &mrvl_proto);
hu                414 drivers/bluetooth/hci_mrvl.c 	hci_uart_unregister_device(&mrvldev->hu);
hu                125 drivers/bluetooth/hci_nokia.c 	struct hci_uart hu;
hu                149 drivers/bluetooth/hci_nokia.c static int nokia_enqueue(struct hci_uart *hu, struct sk_buff *skb);
hu                181 drivers/bluetooth/hci_nokia.c static int nokia_reset(struct hci_uart *hu)
hu                183 drivers/bluetooth/hci_nokia.c 	struct nokia_bt_dev *btdev = hu->priv;
hu                221 drivers/bluetooth/hci_nokia.c static int nokia_send_alive_packet(struct hci_uart *hu)
hu                223 drivers/bluetooth/hci_nokia.c 	struct nokia_bt_dev *btdev = hu->priv;
hu                245 drivers/bluetooth/hci_nokia.c 	nokia_enqueue(hu, skb);
hu                246 drivers/bluetooth/hci_nokia.c 	hci_uart_tx_wakeup(hu);
hu                261 drivers/bluetooth/hci_nokia.c static int nokia_send_negotiation(struct hci_uart *hu)
hu                263 drivers/bluetooth/hci_nokia.c 	struct nokia_bt_dev *btdev = hu->priv;
hu                293 drivers/bluetooth/hci_nokia.c 	nokia_enqueue(hu, skb);
hu                294 drivers/bluetooth/hci_nokia.c 	hci_uart_tx_wakeup(hu);
hu                324 drivers/bluetooth/hci_nokia.c static int nokia_setup_fw(struct hci_uart *hu)
hu                326 drivers/bluetooth/hci_nokia.c 	struct nokia_bt_dev *btdev = hu->priv;
hu                348 drivers/bluetooth/hci_nokia.c 			hu->hdev->name, err);
hu                367 drivers/bluetooth/hci_nokia.c 			skb = __hci_cmd_sync(hu->hdev, opcode, cmd->plen,
hu                373 drivers/bluetooth/hci_nokia.c 				       hu->hdev->name, opcode, err);
hu                393 drivers/bluetooth/hci_nokia.c static int nokia_setup(struct hci_uart *hu)
hu                395 drivers/bluetooth/hci_nokia.c 	struct nokia_bt_dev *btdev = hu->priv;
hu                414 drivers/bluetooth/hci_nokia.c 	err = nokia_reset(hu);
hu                421 drivers/bluetooth/hci_nokia.c 	err = nokia_send_negotiation(hu);
hu                428 drivers/bluetooth/hci_nokia.c 	err = nokia_send_alive_packet(hu);
hu                435 drivers/bluetooth/hci_nokia.c 	err = nokia_setup_fw(hu);
hu                446 drivers/bluetooth/hci_nokia.c 		hu->hdev->set_bdaddr = btbcm_set_bdaddr;
hu                447 drivers/bluetooth/hci_nokia.c 		set_bit(HCI_QUIRK_INVALID_BDADDR, &hu->hdev->quirks);
hu                465 drivers/bluetooth/hci_nokia.c static int nokia_open(struct hci_uart *hu)
hu                467 drivers/bluetooth/hci_nokia.c 	struct device *dev = &hu->serdev->dev;
hu                476 drivers/bluetooth/hci_nokia.c static int nokia_flush(struct hci_uart *hu)
hu                478 drivers/bluetooth/hci_nokia.c 	struct nokia_bt_dev *btdev = hu->priv;
hu                487 drivers/bluetooth/hci_nokia.c static int nokia_close(struct hci_uart *hu)
hu                489 drivers/bluetooth/hci_nokia.c 	struct nokia_bt_dev *btdev = hu->priv;
hu                510 drivers/bluetooth/hci_nokia.c static int nokia_enqueue(struct hci_uart *hu, struct sk_buff *skb)
hu                512 drivers/bluetooth/hci_nokia.c 	struct nokia_bt_dev *btdev = hu->priv;
hu                534 drivers/bluetooth/hci_nokia.c 	struct hci_uart *hu = hci_get_drvdata(hdev);
hu                535 drivers/bluetooth/hci_nokia.c 	struct nokia_bt_dev *btdev = hu->priv;
hu                571 drivers/bluetooth/hci_nokia.c 	struct hci_uart *hu = hci_get_drvdata(hdev);
hu                572 drivers/bluetooth/hci_nokia.c 	struct nokia_bt_dev *btdev = hu->priv;
hu                623 drivers/bluetooth/hci_nokia.c static int nokia_recv(struct hci_uart *hu, const void *data, int count)
hu                625 drivers/bluetooth/hci_nokia.c 	struct nokia_bt_dev *btdev = hu->priv;
hu                629 drivers/bluetooth/hci_nokia.c 	if (!test_bit(HCI_UART_REGISTERED, &hu->flags))
hu                632 drivers/bluetooth/hci_nokia.c 	btdev->rx_skb = h4_recv_buf(hu->hdev, btdev->rx_skb, data, count,
hu                644 drivers/bluetooth/hci_nokia.c static struct sk_buff *nokia_dequeue(struct hci_uart *hu)
hu                646 drivers/bluetooth/hci_nokia.c 	struct nokia_bt_dev *btdev = hu->priv;
hu                694 drivers/bluetooth/hci_nokia.c 	btdev->hu.serdev = btdev->serdev = serdev;
hu                743 drivers/bluetooth/hci_nokia.c 	btdev->hu.priv = btdev;
hu                744 drivers/bluetooth/hci_nokia.c 	btdev->hu.alignment = 2; /* Nokia H4+ is word aligned */
hu                746 drivers/bluetooth/hci_nokia.c 	err = hci_uart_register_device(&btdev->hu, &nokia_proto);
hu                759 drivers/bluetooth/hci_nokia.c 	hci_uart_unregister_device(&btdev->hu);
hu                 83 drivers/bluetooth/hci_qca.c 	struct hci_uart *hu;
hu                165 drivers/bluetooth/hci_qca.c static int qca_power_setup(struct hci_uart *hu, bool on);
hu                166 drivers/bluetooth/hci_qca.c static void qca_power_shutdown(struct hci_uart *hu);
hu                169 drivers/bluetooth/hci_qca.c static enum qca_btsoc_type qca_soc_type(struct hci_uart *hu)
hu                173 drivers/bluetooth/hci_qca.c 	if (hu->serdev) {
hu                174 drivers/bluetooth/hci_qca.c 		struct qca_serdev *qsd = serdev_device_get_drvdata(hu->serdev);
hu                184 drivers/bluetooth/hci_qca.c static const char *qca_get_firmware_name(struct hci_uart *hu)
hu                186 drivers/bluetooth/hci_qca.c 	if (hu->serdev) {
hu                187 drivers/bluetooth/hci_qca.c 		struct qca_serdev *qsd = serdev_device_get_drvdata(hu->serdev);
hu                212 drivers/bluetooth/hci_qca.c static void serial_clock_vote(unsigned long vote, struct hci_uart *hu)
hu                214 drivers/bluetooth/hci_qca.c 	struct qca_data *qca = hu->priv;
hu                261 drivers/bluetooth/hci_qca.c 			__serial_clock_on(hu->tty);
hu                263 drivers/bluetooth/hci_qca.c 			__serial_clock_off(hu->tty);
hu                284 drivers/bluetooth/hci_qca.c static int send_hci_ibs_cmd(u8 cmd, struct hci_uart *hu)
hu                288 drivers/bluetooth/hci_qca.c 	struct qca_data *qca = hu->priv;
hu                290 drivers/bluetooth/hci_qca.c 	BT_DBG("hu %p send hci ibs cmd 0x%x", hu, cmd);
hu                310 drivers/bluetooth/hci_qca.c 	struct hci_uart *hu = qca->hu;
hu                314 drivers/bluetooth/hci_qca.c 	BT_DBG("hu %p wq awake device", hu);
hu                317 drivers/bluetooth/hci_qca.c 	serial_clock_vote(HCI_IBS_TX_VOTE_CLOCK_ON, hu);
hu                322 drivers/bluetooth/hci_qca.c 	if (send_hci_ibs_cmd(HCI_IBS_WAKE_IND, hu) < 0)
hu                334 drivers/bluetooth/hci_qca.c 	hci_uart_tx_wakeup(hu);
hu                341 drivers/bluetooth/hci_qca.c 	struct hci_uart *hu = qca->hu;
hu                344 drivers/bluetooth/hci_qca.c 	BT_DBG("hu %p wq awake rx", hu);
hu                346 drivers/bluetooth/hci_qca.c 	serial_clock_vote(HCI_IBS_RX_VOTE_CLOCK_ON, hu);
hu                354 drivers/bluetooth/hci_qca.c 	if (send_hci_ibs_cmd(HCI_IBS_WAKE_ACK, hu) < 0)
hu                362 drivers/bluetooth/hci_qca.c 	hci_uart_tx_wakeup(hu);
hu                369 drivers/bluetooth/hci_qca.c 	struct hci_uart *hu = qca->hu;
hu                371 drivers/bluetooth/hci_qca.c 	BT_DBG("hu %p rx clock vote off", hu);
hu                373 drivers/bluetooth/hci_qca.c 	serial_clock_vote(HCI_IBS_RX_VOTE_CLOCK_OFF, hu);
hu                380 drivers/bluetooth/hci_qca.c 	struct hci_uart *hu = qca->hu;
hu                382 drivers/bluetooth/hci_qca.c 	BT_DBG("hu %p tx clock vote off", hu);
hu                385 drivers/bluetooth/hci_qca.c 	hci_uart_tx_wakeup(hu);
hu                390 drivers/bluetooth/hci_qca.c 	serial_clock_vote(HCI_IBS_TX_VOTE_CLOCK_OFF, hu);
hu                396 drivers/bluetooth/hci_qca.c 	struct hci_uart *hu = qca->hu;
hu                399 drivers/bluetooth/hci_qca.c 	BT_DBG("hu %p idle timeout in %d state", hu, qca->tx_ibs_state);
hu                407 drivers/bluetooth/hci_qca.c 		if (send_hci_ibs_cmd(HCI_IBS_SLEEP_IND, hu) < 0) {
hu                431 drivers/bluetooth/hci_qca.c 	struct hci_uart *hu = qca->hu;
hu                436 drivers/bluetooth/hci_qca.c 		hu, qca->tx_ibs_state);
hu                445 drivers/bluetooth/hci_qca.c 		if (send_hci_ibs_cmd(HCI_IBS_WAKE_IND, hu) < 0) {
hu                466 drivers/bluetooth/hci_qca.c 		hci_uart_tx_wakeup(hu);
hu                470 drivers/bluetooth/hci_qca.c static int qca_open(struct hci_uart *hu)
hu                476 drivers/bluetooth/hci_qca.c 	BT_DBG("hu %p qca_open", hu);
hu                478 drivers/bluetooth/hci_qca.c 	if (!hci_uart_has_flow_control(hu))
hu                500 drivers/bluetooth/hci_qca.c 	qca->hu = hu;
hu                509 drivers/bluetooth/hci_qca.c 	hu->priv = qca;
hu                511 drivers/bluetooth/hci_qca.c 	if (hu->serdev) {
hu                513 drivers/bluetooth/hci_qca.c 		qcadev = serdev_device_get_drvdata(hu->serdev);
hu                519 drivers/bluetooth/hci_qca.c 			hu->init_speed = qcadev->init_speed;
hu                520 drivers/bluetooth/hci_qca.c 			hu->oper_speed = qcadev->oper_speed;
hu                521 drivers/bluetooth/hci_qca.c 			ret = qca_power_setup(hu, true);
hu                525 drivers/bluetooth/hci_qca.c 				hu->priv = NULL;
hu                546 drivers/bluetooth/hci_qca.c 	struct hci_uart *hu = hci_get_drvdata(hdev);
hu                547 drivers/bluetooth/hci_qca.c 	struct qca_data *qca = hu->priv;
hu                591 drivers/bluetooth/hci_qca.c static int qca_flush(struct hci_uart *hu)
hu                593 drivers/bluetooth/hci_qca.c 	struct qca_data *qca = hu->priv;
hu                595 drivers/bluetooth/hci_qca.c 	BT_DBG("hu %p qca flush", hu);
hu                604 drivers/bluetooth/hci_qca.c static int qca_close(struct hci_uart *hu)
hu                607 drivers/bluetooth/hci_qca.c 	struct qca_data *qca = hu->priv;
hu                609 drivers/bluetooth/hci_qca.c 	BT_DBG("hu %p qca close", hu);
hu                611 drivers/bluetooth/hci_qca.c 	serial_clock_vote(HCI_IBS_VOTE_STATS_UPDATE, hu);
hu                618 drivers/bluetooth/hci_qca.c 	qca->hu = NULL;
hu                620 drivers/bluetooth/hci_qca.c 	if (hu->serdev) {
hu                621 drivers/bluetooth/hci_qca.c 		qcadev = serdev_device_get_drvdata(hu->serdev);
hu                623 drivers/bluetooth/hci_qca.c 			qca_power_shutdown(hu);
hu                631 drivers/bluetooth/hci_qca.c 	hu->priv = NULL;
hu                640 drivers/bluetooth/hci_qca.c static void device_want_to_wakeup(struct hci_uart *hu)
hu                643 drivers/bluetooth/hci_qca.c 	struct qca_data *qca = hu->priv;
hu                645 drivers/bluetooth/hci_qca.c 	BT_DBG("hu %p want to wake up", hu);
hu                664 drivers/bluetooth/hci_qca.c 		if (send_hci_ibs_cmd(HCI_IBS_WAKE_ACK, hu) < 0) {
hu                681 drivers/bluetooth/hci_qca.c 	hci_uart_tx_wakeup(hu);
hu                686 drivers/bluetooth/hci_qca.c static void device_want_to_sleep(struct hci_uart *hu)
hu                689 drivers/bluetooth/hci_qca.c 	struct qca_data *qca = hu->priv;
hu                691 drivers/bluetooth/hci_qca.c 	BT_DBG("hu %p want to sleep in %d state", hu, qca->rx_ibs_state);
hu                720 drivers/bluetooth/hci_qca.c static void device_woke_up(struct hci_uart *hu)
hu                723 drivers/bluetooth/hci_qca.c 	struct qca_data *qca = hu->priv;
hu                726 drivers/bluetooth/hci_qca.c 	BT_DBG("hu %p woke up", hu);
hu                763 drivers/bluetooth/hci_qca.c 	hci_uart_tx_wakeup(hu);
hu                769 drivers/bluetooth/hci_qca.c static int qca_enqueue(struct hci_uart *hu, struct sk_buff *skb)
hu                772 drivers/bluetooth/hci_qca.c 	struct qca_data *qca = hu->priv;
hu                774 drivers/bluetooth/hci_qca.c 	BT_DBG("hu %p qca enq skb %p tx_ibs_state %d", hu, skb,
hu                830 drivers/bluetooth/hci_qca.c 	struct hci_uart *hu = hci_get_drvdata(hdev);
hu                832 drivers/bluetooth/hci_qca.c 	BT_DBG("hu %p recv hci ibs cmd 0x%x", hu, HCI_IBS_SLEEP_IND);
hu                834 drivers/bluetooth/hci_qca.c 	device_want_to_sleep(hu);
hu                842 drivers/bluetooth/hci_qca.c 	struct hci_uart *hu = hci_get_drvdata(hdev);
hu                844 drivers/bluetooth/hci_qca.c 	BT_DBG("hu %p recv hci ibs cmd 0x%x", hu, HCI_IBS_WAKE_IND);
hu                846 drivers/bluetooth/hci_qca.c 	device_want_to_wakeup(hu);
hu                854 drivers/bluetooth/hci_qca.c 	struct hci_uart *hu = hci_get_drvdata(hdev);
hu                856 drivers/bluetooth/hci_qca.c 	BT_DBG("hu %p recv hci ibs cmd 0x%x", hu, HCI_IBS_WAKE_ACK);
hu                858 drivers/bluetooth/hci_qca.c 	device_woke_up(hu);
hu                879 drivers/bluetooth/hci_qca.c 	struct hci_uart *hu = hci_get_drvdata(hdev);
hu                880 drivers/bluetooth/hci_qca.c 	struct qca_data *qca = hu->priv;
hu                936 drivers/bluetooth/hci_qca.c static int qca_recv(struct hci_uart *hu, const void *data, int count)
hu                938 drivers/bluetooth/hci_qca.c 	struct qca_data *qca = hu->priv;
hu                940 drivers/bluetooth/hci_qca.c 	if (!test_bit(HCI_UART_REGISTERED, &hu->flags))
hu                943 drivers/bluetooth/hci_qca.c 	qca->rx_skb = h4_recv_buf(hu->hdev, qca->rx_skb, data, count,
hu                947 drivers/bluetooth/hci_qca.c 		bt_dev_err(hu->hdev, "Frame reassembly failed (%d)", err);
hu                955 drivers/bluetooth/hci_qca.c static struct sk_buff *qca_dequeue(struct hci_uart *hu)
hu                957 drivers/bluetooth/hci_qca.c 	struct qca_data *qca = hu->priv;
hu               1000 drivers/bluetooth/hci_qca.c 	struct hci_uart *hu = hci_get_drvdata(hdev);
hu               1001 drivers/bluetooth/hci_qca.c 	struct qca_data *qca = hu->priv;
hu               1021 drivers/bluetooth/hci_qca.c 	hci_uart_tx_wakeup(hu);
hu               1028 drivers/bluetooth/hci_qca.c 	if (hu->serdev)
hu               1029 drivers/bluetooth/hci_qca.c 		serdev_device_wait_until_sent(hu->serdev,
hu               1033 drivers/bluetooth/hci_qca.c 	if (qca_is_wcn399x(qca_soc_type(hu)))
hu               1041 drivers/bluetooth/hci_qca.c static inline void host_set_baudrate(struct hci_uart *hu, unsigned int speed)
hu               1043 drivers/bluetooth/hci_qca.c 	if (hu->serdev)
hu               1044 drivers/bluetooth/hci_qca.c 		serdev_device_set_baudrate(hu->serdev, speed);
hu               1046 drivers/bluetooth/hci_qca.c 		hci_uart_set_baudrate(hu, speed);
hu               1049 drivers/bluetooth/hci_qca.c static int qca_send_power_pulse(struct hci_uart *hu, bool on)
hu               1065 drivers/bluetooth/hci_qca.c 	bt_dev_dbg(hu->hdev, "sending power pulse %02x to controller", cmd);
hu               1067 drivers/bluetooth/hci_qca.c 	serdev_device_write_flush(hu->serdev);
hu               1068 drivers/bluetooth/hci_qca.c 	hci_uart_set_flow_control(hu, true);
hu               1069 drivers/bluetooth/hci_qca.c 	ret = serdev_device_write_buf(hu->serdev, &cmd, sizeof(cmd));
hu               1071 drivers/bluetooth/hci_qca.c 		bt_dev_err(hu->hdev, "failed to send power pulse %02x", cmd);
hu               1075 drivers/bluetooth/hci_qca.c 	serdev_device_wait_until_sent(hu->serdev, timeout);
hu               1076 drivers/bluetooth/hci_qca.c 	hci_uart_set_flow_control(hu, false);
hu               1087 drivers/bluetooth/hci_qca.c static unsigned int qca_get_speed(struct hci_uart *hu,
hu               1093 drivers/bluetooth/hci_qca.c 		if (hu->init_speed)
hu               1094 drivers/bluetooth/hci_qca.c 			speed = hu->init_speed;
hu               1095 drivers/bluetooth/hci_qca.c 		else if (hu->proto->init_speed)
hu               1096 drivers/bluetooth/hci_qca.c 			speed = hu->proto->init_speed;
hu               1098 drivers/bluetooth/hci_qca.c 		if (hu->oper_speed)
hu               1099 drivers/bluetooth/hci_qca.c 			speed = hu->oper_speed;
hu               1100 drivers/bluetooth/hci_qca.c 		else if (hu->proto->oper_speed)
hu               1101 drivers/bluetooth/hci_qca.c 			speed = hu->proto->oper_speed;
hu               1107 drivers/bluetooth/hci_qca.c static int qca_check_speeds(struct hci_uart *hu)
hu               1109 drivers/bluetooth/hci_qca.c 	if (qca_is_wcn399x(qca_soc_type(hu))) {
hu               1110 drivers/bluetooth/hci_qca.c 		if (!qca_get_speed(hu, QCA_INIT_SPEED) &&
hu               1111 drivers/bluetooth/hci_qca.c 		    !qca_get_speed(hu, QCA_OPER_SPEED))
hu               1114 drivers/bluetooth/hci_qca.c 		if (!qca_get_speed(hu, QCA_INIT_SPEED) ||
hu               1115 drivers/bluetooth/hci_qca.c 		    !qca_get_speed(hu, QCA_OPER_SPEED))
hu               1122 drivers/bluetooth/hci_qca.c static int qca_set_speed(struct hci_uart *hu, enum qca_speed_type speed_type)
hu               1125 drivers/bluetooth/hci_qca.c 	struct qca_data *qca = hu->priv;
hu               1129 drivers/bluetooth/hci_qca.c 		speed = qca_get_speed(hu, QCA_INIT_SPEED);
hu               1131 drivers/bluetooth/hci_qca.c 			host_set_baudrate(hu, speed);
hu               1133 drivers/bluetooth/hci_qca.c 		enum qca_btsoc_type soc_type = qca_soc_type(hu);
hu               1135 drivers/bluetooth/hci_qca.c 		speed = qca_get_speed(hu, QCA_OPER_SPEED);
hu               1143 drivers/bluetooth/hci_qca.c 			hci_uart_set_flow_control(hu, true);
hu               1151 drivers/bluetooth/hci_qca.c 		bt_dev_dbg(hu->hdev, "Set UART speed to %d", speed);
hu               1152 drivers/bluetooth/hci_qca.c 		ret = qca_set_baudrate(hu->hdev, qca_baudrate);
hu               1156 drivers/bluetooth/hci_qca.c 		host_set_baudrate(hu, speed);
hu               1160 drivers/bluetooth/hci_qca.c 			hci_uart_set_flow_control(hu, false);
hu               1168 drivers/bluetooth/hci_qca.c 				bt_dev_err(hu->hdev,
hu               1180 drivers/bluetooth/hci_qca.c static int qca_wcn3990_init(struct hci_uart *hu)
hu               1188 drivers/bluetooth/hci_qca.c 	qcadev = serdev_device_get_drvdata(hu->serdev);
hu               1190 drivers/bluetooth/hci_qca.c 		serdev_device_close(hu->serdev);
hu               1191 drivers/bluetooth/hci_qca.c 		ret = qca_power_setup(hu, true);
hu               1195 drivers/bluetooth/hci_qca.c 		ret = serdev_device_open(hu->serdev);
hu               1197 drivers/bluetooth/hci_qca.c 			bt_dev_err(hu->hdev, "failed to open port");
hu               1203 drivers/bluetooth/hci_qca.c 	host_set_baudrate(hu, 2400);
hu               1204 drivers/bluetooth/hci_qca.c 	ret = qca_send_power_pulse(hu, false);
hu               1208 drivers/bluetooth/hci_qca.c 	qca_set_speed(hu, QCA_INIT_SPEED);
hu               1209 drivers/bluetooth/hci_qca.c 	ret = qca_send_power_pulse(hu, true);
hu               1218 drivers/bluetooth/hci_qca.c 	serdev_device_close(hu->serdev);
hu               1219 drivers/bluetooth/hci_qca.c 	ret = serdev_device_open(hu->serdev);
hu               1221 drivers/bluetooth/hci_qca.c 		bt_dev_err(hu->hdev, "failed to open port");
hu               1225 drivers/bluetooth/hci_qca.c 	hci_uart_set_flow_control(hu, false);
hu               1230 drivers/bluetooth/hci_qca.c static int qca_setup(struct hci_uart *hu)
hu               1232 drivers/bluetooth/hci_qca.c 	struct hci_dev *hdev = hu->hdev;
hu               1233 drivers/bluetooth/hci_qca.c 	struct qca_data *qca = hu->priv;
hu               1235 drivers/bluetooth/hci_qca.c 	enum qca_btsoc_type soc_type = qca_soc_type(hu);
hu               1236 drivers/bluetooth/hci_qca.c 	const char *firmware_name = qca_get_firmware_name(hu);
hu               1240 drivers/bluetooth/hci_qca.c 	ret = qca_check_speeds(hu);
hu               1260 drivers/bluetooth/hci_qca.c 		hu->hdev->shutdown = qca_power_off;
hu               1261 drivers/bluetooth/hci_qca.c 		ret = qca_wcn3990_init(hu);
hu               1270 drivers/bluetooth/hci_qca.c 		qca_set_speed(hu, QCA_INIT_SPEED);
hu               1274 drivers/bluetooth/hci_qca.c 	speed = qca_get_speed(hu, QCA_OPER_SPEED);
hu               1276 drivers/bluetooth/hci_qca.c 		ret = qca_set_speed(hu, QCA_OPER_SPEED);
hu               1310 drivers/bluetooth/hci_qca.c 		hu->hdev->set_bdaddr = qca_set_bdaddr;
hu               1312 drivers/bluetooth/hci_qca.c 		hu->hdev->set_bdaddr = qca_set_bdaddr_rome;
hu               1354 drivers/bluetooth/hci_qca.c static void qca_power_shutdown(struct hci_uart *hu)
hu               1356 drivers/bluetooth/hci_qca.c 	struct qca_data *qca = hu->priv;
hu               1365 drivers/bluetooth/hci_qca.c 	qca_flush(hu);
hu               1368 drivers/bluetooth/hci_qca.c 	host_set_baudrate(hu, 2400);
hu               1369 drivers/bluetooth/hci_qca.c 	qca_send_power_pulse(hu, false);
hu               1370 drivers/bluetooth/hci_qca.c 	qca_power_setup(hu, false);
hu               1375 drivers/bluetooth/hci_qca.c 	struct hci_uart *hu = hci_get_drvdata(hdev);
hu               1382 drivers/bluetooth/hci_qca.c 	qca_power_shutdown(hu);
hu               1417 drivers/bluetooth/hci_qca.c static int qca_power_setup(struct hci_uart *hu, bool on)
hu               1424 drivers/bluetooth/hci_qca.c 	qcadev = serdev_device_get_drvdata(hu->serdev);
hu                 26 drivers/bluetooth/hci_serdev.c static inline void hci_uart_tx_complete(struct hci_uart *hu, int pkt_type)
hu                 28 drivers/bluetooth/hci_serdev.c 	struct hci_dev *hdev = hu->hdev;
hu                 46 drivers/bluetooth/hci_serdev.c static inline struct sk_buff *hci_uart_dequeue(struct hci_uart *hu)
hu                 48 drivers/bluetooth/hci_serdev.c 	struct sk_buff *skb = hu->tx_skb;
hu                 51 drivers/bluetooth/hci_serdev.c 		if (test_bit(HCI_UART_PROTO_READY, &hu->flags))
hu                 52 drivers/bluetooth/hci_serdev.c 			skb = hu->proto->dequeue(hu);
hu                 54 drivers/bluetooth/hci_serdev.c 		hu->tx_skb = NULL;
hu                 61 drivers/bluetooth/hci_serdev.c 	struct hci_uart *hu = container_of(work, struct hci_uart, write_work);
hu                 62 drivers/bluetooth/hci_serdev.c 	struct serdev_device *serdev = hu->serdev;
hu                 63 drivers/bluetooth/hci_serdev.c 	struct hci_dev *hdev = hu->hdev;
hu                 70 drivers/bluetooth/hci_serdev.c 		clear_bit(HCI_UART_TX_WAKEUP, &hu->tx_state);
hu                 72 drivers/bluetooth/hci_serdev.c 		while ((skb = hci_uart_dequeue(hu))) {
hu                 81 drivers/bluetooth/hci_serdev.c 				hu->tx_skb = skb;
hu                 85 drivers/bluetooth/hci_serdev.c 			hci_uart_tx_complete(hu, hci_skb_pkt_type(skb));
hu                 88 drivers/bluetooth/hci_serdev.c 	} while (test_bit(HCI_UART_TX_WAKEUP, &hu->tx_state));
hu                 90 drivers/bluetooth/hci_serdev.c 	clear_bit(HCI_UART_SENDING, &hu->tx_state);
hu                 98 drivers/bluetooth/hci_serdev.c 	struct hci_uart *hu  = hci_get_drvdata(hdev);
hu                100 drivers/bluetooth/hci_serdev.c 	BT_DBG("hdev %p serdev %p", hdev, hu->serdev);
hu                102 drivers/bluetooth/hci_serdev.c 	if (hu->tx_skb) {
hu                103 drivers/bluetooth/hci_serdev.c 		kfree_skb(hu->tx_skb); hu->tx_skb = NULL;
hu                107 drivers/bluetooth/hci_serdev.c 	serdev_device_write_flush(hu->serdev);
hu                109 drivers/bluetooth/hci_serdev.c 	if (test_bit(HCI_UART_PROTO_READY, &hu->flags))
hu                110 drivers/bluetooth/hci_serdev.c 		hu->proto->flush(hu);
hu                140 drivers/bluetooth/hci_serdev.c 	struct hci_uart *hu = hci_get_drvdata(hdev);
hu                145 drivers/bluetooth/hci_serdev.c 	hu->proto->enqueue(hu, skb);
hu                147 drivers/bluetooth/hci_serdev.c 	hci_uart_tx_wakeup(hu);
hu                154 drivers/bluetooth/hci_serdev.c 	struct hci_uart *hu = hci_get_drvdata(hdev);
hu                161 drivers/bluetooth/hci_serdev.c 	if (hu->init_speed)
hu                162 drivers/bluetooth/hci_serdev.c 		speed = hu->init_speed;
hu                163 drivers/bluetooth/hci_serdev.c 	else if (hu->proto->init_speed)
hu                164 drivers/bluetooth/hci_serdev.c 		speed = hu->proto->init_speed;
hu                169 drivers/bluetooth/hci_serdev.c 		serdev_device_set_baudrate(hu->serdev, speed);
hu                172 drivers/bluetooth/hci_serdev.c 	if (hu->oper_speed)
hu                173 drivers/bluetooth/hci_serdev.c 		speed = hu->oper_speed;
hu                174 drivers/bluetooth/hci_serdev.c 	else if (hu->proto->oper_speed)
hu                175 drivers/bluetooth/hci_serdev.c 		speed = hu->proto->oper_speed;
hu                179 drivers/bluetooth/hci_serdev.c 	if (hu->proto->set_baudrate && speed) {
hu                180 drivers/bluetooth/hci_serdev.c 		err = hu->proto->set_baudrate(hu, speed);
hu                184 drivers/bluetooth/hci_serdev.c 			serdev_device_set_baudrate(hu->serdev, speed);
hu                187 drivers/bluetooth/hci_serdev.c 	if (hu->proto->setup)
hu                188 drivers/bluetooth/hci_serdev.c 		return hu->proto->setup(hu);
hu                190 drivers/bluetooth/hci_serdev.c 	if (!test_bit(HCI_UART_VND_DETECT, &hu->hdev_flags))
hu                216 drivers/bluetooth/hci_serdev.c 	struct hci_uart *hu = serdev_device_get_drvdata(serdev);
hu                220 drivers/bluetooth/hci_serdev.c 	if (!hu || serdev != hu->serdev) {
hu                225 drivers/bluetooth/hci_serdev.c 	if (test_bit(HCI_UART_PROTO_READY, &hu->flags))
hu                226 drivers/bluetooth/hci_serdev.c 		hci_uart_tx_wakeup(hu);
hu                242 drivers/bluetooth/hci_serdev.c 	struct hci_uart *hu = serdev_device_get_drvdata(serdev);
hu                244 drivers/bluetooth/hci_serdev.c 	if (!hu || serdev != hu->serdev) {
hu                249 drivers/bluetooth/hci_serdev.c 	if (!test_bit(HCI_UART_PROTO_READY, &hu->flags))
hu                255 drivers/bluetooth/hci_serdev.c 	hu->proto->recv(hu, data, count);
hu                257 drivers/bluetooth/hci_serdev.c 	if (hu->hdev)
hu                258 drivers/bluetooth/hci_serdev.c 		hu->hdev->stat.byte_rx += count;
hu                268 drivers/bluetooth/hci_serdev.c int hci_uart_register_device(struct hci_uart *hu,
hu                276 drivers/bluetooth/hci_serdev.c 	serdev_device_set_client_ops(hu->serdev, &hci_serdev_client_ops);
hu                278 drivers/bluetooth/hci_serdev.c 	err = serdev_device_open(hu->serdev);
hu                282 drivers/bluetooth/hci_serdev.c 	err = p->open(hu);
hu                286 drivers/bluetooth/hci_serdev.c 	hu->proto = p;
hu                287 drivers/bluetooth/hci_serdev.c 	set_bit(HCI_UART_PROTO_READY, &hu->flags);
hu                297 drivers/bluetooth/hci_serdev.c 	hu->hdev = hdev;
hu                300 drivers/bluetooth/hci_serdev.c 	hci_set_drvdata(hdev, hu);
hu                302 drivers/bluetooth/hci_serdev.c 	INIT_WORK(&hu->init_ready, hci_uart_init_work);
hu                303 drivers/bluetooth/hci_serdev.c 	INIT_WORK(&hu->write_work, hci_uart_write_work);
hu                304 drivers/bluetooth/hci_serdev.c 	percpu_init_rwsem(&hu->proto_lock);
hu                310 drivers/bluetooth/hci_serdev.c 	if (hu->proto->setup)
hu                311 drivers/bluetooth/hci_serdev.c 		hdev->manufacturer = hu->proto->manufacturer;
hu                318 drivers/bluetooth/hci_serdev.c 	SET_HCIDEV_DEV(hdev, &hu->serdev->dev);
hu                320 drivers/bluetooth/hci_serdev.c 	if (test_bit(HCI_UART_RAW_DEVICE, &hu->hdev_flags))
hu                323 drivers/bluetooth/hci_serdev.c 	if (test_bit(HCI_UART_EXT_CONFIG, &hu->hdev_flags))
hu                326 drivers/bluetooth/hci_serdev.c 	if (test_bit(HCI_UART_CREATE_AMP, &hu->hdev_flags))
hu                331 drivers/bluetooth/hci_serdev.c 	if (test_bit(HCI_UART_INIT_PENDING, &hu->hdev_flags))
hu                340 drivers/bluetooth/hci_serdev.c 	set_bit(HCI_UART_REGISTERED, &hu->flags);
hu                347 drivers/bluetooth/hci_serdev.c 	clear_bit(HCI_UART_PROTO_READY, &hu->flags);
hu                348 drivers/bluetooth/hci_serdev.c 	p->close(hu);
hu                350 drivers/bluetooth/hci_serdev.c 	serdev_device_close(hu->serdev);
hu                355 drivers/bluetooth/hci_serdev.c void hci_uart_unregister_device(struct hci_uart *hu)
hu                357 drivers/bluetooth/hci_serdev.c 	struct hci_dev *hdev = hu->hdev;
hu                359 drivers/bluetooth/hci_serdev.c 	clear_bit(HCI_UART_PROTO_READY, &hu->flags);
hu                363 drivers/bluetooth/hci_serdev.c 	cancel_work_sync(&hu->write_work);
hu                365 drivers/bluetooth/hci_serdev.c 	hu->proto->close(hu);
hu                366 drivers/bluetooth/hci_serdev.c 	serdev_device_close(hu->serdev);
hu                 54 drivers/bluetooth/hci_uart.h 	int (*open)(struct hci_uart *hu);
hu                 55 drivers/bluetooth/hci_uart.h 	int (*close)(struct hci_uart *hu);
hu                 56 drivers/bluetooth/hci_uart.h 	int (*flush)(struct hci_uart *hu);
hu                 57 drivers/bluetooth/hci_uart.h 	int (*setup)(struct hci_uart *hu);
hu                 58 drivers/bluetooth/hci_uart.h 	int (*set_baudrate)(struct hci_uart *hu, unsigned int speed);
hu                 59 drivers/bluetooth/hci_uart.h 	int (*recv)(struct hci_uart *hu, const void *data, int len);
hu                 60 drivers/bluetooth/hci_uart.h 	int (*enqueue)(struct hci_uart *hu, struct sk_buff *skb);
hu                 61 drivers/bluetooth/hci_uart.h 	struct sk_buff *(*dequeue)(struct hci_uart *hu);
hu                 99 drivers/bluetooth/hci_uart.h int hci_uart_register_device(struct hci_uart *hu, const struct hci_uart_proto *p);
hu                100 drivers/bluetooth/hci_uart.h void hci_uart_unregister_device(struct hci_uart *hu);
hu                102 drivers/bluetooth/hci_uart.h int hci_uart_tx_wakeup(struct hci_uart *hu);
hu                103 drivers/bluetooth/hci_uart.h int hci_uart_wait_until_sent(struct hci_uart *hu);
hu                104 drivers/bluetooth/hci_uart.h int hci_uart_init_ready(struct hci_uart *hu);
hu                106 drivers/bluetooth/hci_uart.h void hci_uart_set_baudrate(struct hci_uart *hu, unsigned int speed);
hu                107 drivers/bluetooth/hci_uart.h bool hci_uart_has_flow_control(struct hci_uart *hu);
hu                108 drivers/bluetooth/hci_uart.h void hci_uart_set_flow_control(struct hci_uart *hu, bool enable);
hu                109 drivers/bluetooth/hci_uart.h void hci_uart_set_speeds(struct hci_uart *hu, unsigned int init_speed,
hu               1896 drivers/staging/media/ipu3/include/intel-ipu3.h 	__u32 hu:8;