Lines Matching full:intel

4  *  Bluetooth HCI UART driver for Intel devices
6 * Copyright (C) 2015 Intel Corporation
109 struct intel_data *intel = hu->priv; in intel_wait_booting() local
112 err = wait_on_bit_timeout(&intel->flags, STATE_BOOTING, in intel_wait_booting()
132 struct intel_data *intel = hu->priv; in intel_wait_lpm_transaction() local
135 err = wait_on_bit_timeout(&intel->flags, STATE_LPM_TRANSACTION, in intel_wait_lpm_transaction()
155 struct intel_data *intel = hu->priv; in intel_lpm_suspend() local
158 if (!test_bit(STATE_LPM_ENABLED, &intel->flags) || in intel_lpm_suspend()
159 test_bit(STATE_SUSPENDED, &intel->flags)) in intel_lpm_suspend()
162 if (test_bit(STATE_TX_ACTIVE, &intel->flags)) in intel_lpm_suspend()
176 set_bit(STATE_LPM_TRANSACTION, &intel->flags); in intel_lpm_suspend()
179 skb_queue_head(&intel->txq, skb); in intel_lpm_suspend()
185 clear_bit(STATE_LPM_TRANSACTION, &intel->flags); in intel_lpm_suspend()
187 if (!test_bit(STATE_SUSPENDED, &intel->flags)) { in intel_lpm_suspend()
201 struct intel_data *intel = hu->priv; in intel_lpm_resume() local
204 if (!test_bit(STATE_LPM_ENABLED, &intel->flags) || in intel_lpm_resume()
205 !test_bit(STATE_SUSPENDED, &intel->flags)) in intel_lpm_resume()
220 set_bit(STATE_LPM_TRANSACTION, &intel->flags); in intel_lpm_resume()
223 skb_queue_head(&intel->txq, skb); in intel_lpm_resume()
229 clear_bit(STATE_LPM_TRANSACTION, &intel->flags); in intel_lpm_resume()
231 if (test_bit(STATE_SUSPENDED, &intel->flags)) { in intel_lpm_resume()
245 struct intel_data *intel = hu->priv; in intel_lpm_host_wake() local
250 clear_bit(STATE_SUSPENDED, &intel->flags); in intel_lpm_host_wake()
262 skb_queue_head(&intel->txq, skb); in intel_lpm_host_wake()
362 struct intel_data *intel = container_of(work, struct intel_data, in intel_busy_work() local
366 if (!intel->hu->tty->dev) in intel_busy_work()
372 if (intel->hu->tty->dev->parent == idev->pdev->dev.parent) { in intel_busy_work()
384 struct intel_data *intel; in intel_open() local
391 intel = kzalloc(sizeof(*intel), GFP_KERNEL); in intel_open()
392 if (!intel) in intel_open()
395 skb_queue_head_init(&intel->txq); in intel_open()
396 INIT_WORK(&intel->busy_work, intel_busy_work); in intel_open()
398 intel->hu = hu; in intel_open()
400 hu->priv = intel; in intel_open()
403 set_bit(STATE_BOOTING, &intel->flags); in intel_open()
410 struct intel_data *intel = hu->priv; in intel_close() local
414 cancel_work_sync(&intel->busy_work); in intel_close()
418 skb_queue_purge(&intel->txq); in intel_close()
419 kfree_skb(intel->rx_skb); in intel_close()
420 kfree(intel); in intel_close()
428 struct intel_data *intel = hu->priv; in intel_flush() local
432 skb_queue_purge(&intel->txq); in intel_flush()
464 struct intel_data *intel = hu->priv; in intel_set_baudrate() local
475 clear_bit(STATE_BOOTING, &intel->flags); in intel_set_baudrate()
489 /* Device will not accept speed change if Intel version has not been in intel_set_baudrate()
494 bt_dev_err(hdev, "Reading Intel version information failed (%ld)", in intel_set_baudrate()
511 skb_queue_tail(&intel->txq, skb); in intel_set_baudrate()
525 struct intel_data *intel = hu->priv; in intel_setup() local
569 clear_bit(STATE_BOOTING, &intel->flags); in intel_setup()
575 set_bit(STATE_BOOTLOADER, &intel->flags); in intel_setup()
577 /* Read the Intel version information to determine if the device in intel_setup()
589 bt_dev_err(hdev, "Unsupported Intel hardware platform (%u)", in intel_setup()
606 bt_dev_err(hdev, "Unsupported Intel hardware variant (%u)", in intel_setup()
627 clear_bit(STATE_BOOTLOADER, &intel->flags); in intel_setup()
636 bt_dev_err(hdev, "Unsupported Intel firmware variant (%u)", in intel_setup()
653 bt_dev_err(hdev, "Unsupported Intel firmware loading method (%u)", in intel_setup()
666 /* With this Intel bootloader only the hardware variant and device in intel_setup()
689 snprintf(fwname, sizeof(fwname), "intel/ibt-%u-%u.sfi", in intel_setup()
693 snprintf(fwname, sizeof(fwname), "intel/ibt-%u-%u-%u.sfi", in intel_setup()
697 bt_dev_err(hdev, "Unsupported Intel hardware variant (%u)", in intel_setup()
704 bt_dev_err(hdev, "Failed to load Intel firmware file (%d)", in intel_setup()
715 snprintf(fwname, sizeof(fwname), "intel/ibt-%u-%u.ddc", in intel_setup()
719 snprintf(fwname, sizeof(fwname), "intel/ibt-%u-%u-%u.ddc", in intel_setup()
723 bt_dev_err(hdev, "Unsupported Intel hardware variant (%u)", in intel_setup()
735 set_bit(STATE_DOWNLOADING, &intel->flags); in intel_setup()
742 set_bit(STATE_FIRMWARE_LOADED, &intel->flags); in intel_setup()
757 err = wait_on_bit_timeout(&intel->flags, STATE_DOWNLOADING, in intel_setup()
772 if (test_bit(STATE_FIRMWARE_FAILED, &intel->flags)) { in intel_setup()
793 /* We need to restore the default speed before Intel reset */ in intel_setup()
802 set_bit(STATE_BOOTING, &intel->flags); in intel_setup()
821 clear_bit(STATE_BOOTING, &intel->flags); in intel_setup()
838 set_bit(STATE_LPM_ENABLED, &intel->flags); in intel_setup()
839 set_bit(STATE_TX_ACTIVE, &intel->flags); in intel_setup()
862 clear_bit(STATE_BOOTLOADER, &intel->flags); in intel_setup()
870 struct intel_data *intel = hu->priv; in intel_recv_event() local
873 if (!test_bit(STATE_BOOTLOADER, &intel->flags) && in intel_recv_event()
874 !test_bit(STATE_BOOTING, &intel->flags)) in intel_recv_event()
886 set_bit(STATE_FIRMWARE_FAILED, &intel->flags); in intel_recv_event()
888 if (test_and_clear_bit(STATE_DOWNLOADING, &intel->flags) && in intel_recv_event()
889 test_bit(STATE_FIRMWARE_LOADED, &intel->flags)) in intel_recv_event()
890 wake_up_bit(&intel->flags, STATE_DOWNLOADING); in intel_recv_event()
898 if (test_and_clear_bit(STATE_BOOTING, &intel->flags)) in intel_recv_event()
899 wake_up_bit(&intel->flags, STATE_BOOTING); in intel_recv_event()
908 struct intel_data *intel = hu->priv; in intel_recv_lpm_notify() local
913 set_bit(STATE_TX_ACTIVE, &intel->flags); in intel_recv_lpm_notify()
914 schedule_work(&intel->busy_work); in intel_recv_lpm_notify()
916 clear_bit(STATE_TX_ACTIVE, &intel->flags); in intel_recv_lpm_notify()
924 struct intel_data *intel = hu->priv; in intel_recv_lpm() local
935 set_bit(STATE_SUSPENDED, &intel->flags); in intel_recv_lpm()
936 if (test_and_clear_bit(STATE_LPM_TRANSACTION, &intel->flags)) in intel_recv_lpm()
937 wake_up_bit(&intel->flags, STATE_LPM_TRANSACTION); in intel_recv_lpm()
940 clear_bit(STATE_SUSPENDED, &intel->flags); in intel_recv_lpm()
941 if (test_and_clear_bit(STATE_LPM_TRANSACTION, &intel->flags)) in intel_recv_lpm()
942 wake_up_bit(&intel->flags, STATE_LPM_TRANSACTION); in intel_recv_lpm()
970 struct intel_data *intel = hu->priv; in intel_recv() local
975 intel->rx_skb = h4_recv_buf(hu->hdev, intel->rx_skb, data, count, in intel_recv()
978 if (IS_ERR(intel->rx_skb)) { in intel_recv()
979 int err = PTR_ERR(intel->rx_skb); in intel_recv()
981 intel->rx_skb = NULL; in intel_recv()
990 struct intel_data *intel = hu->priv; in intel_enqueue() local
1012 skb_queue_tail(&intel->txq, skb); in intel_enqueue()
1019 struct intel_data *intel = hu->priv; in intel_dequeue() local
1022 skb = skb_dequeue(&intel->txq); in intel_dequeue()
1026 if (test_bit(STATE_BOOTLOADER, &intel->flags) && in intel_dequeue()
1048 .name = "Intel",