Lines Matching refs:intel

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()
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()
627 clear_bit(STATE_BOOTLOADER, &intel->flags); 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()
799 set_bit(STATE_BOOTING, &intel->flags); in intel_setup()
818 clear_bit(STATE_BOOTING, &intel->flags); in intel_setup()
835 set_bit(STATE_LPM_ENABLED, &intel->flags); in intel_setup()
836 set_bit(STATE_TX_ACTIVE, &intel->flags); in intel_setup()
859 clear_bit(STATE_BOOTLOADER, &intel->flags); in intel_setup()
867 struct intel_data *intel = hu->priv; in intel_recv_event() local
870 if (!test_bit(STATE_BOOTLOADER, &intel->flags) && in intel_recv_event()
871 !test_bit(STATE_BOOTING, &intel->flags)) in intel_recv_event()
883 set_bit(STATE_FIRMWARE_FAILED, &intel->flags); in intel_recv_event()
885 if (test_and_clear_bit(STATE_DOWNLOADING, &intel->flags) && in intel_recv_event()
886 test_bit(STATE_FIRMWARE_LOADED, &intel->flags)) in intel_recv_event()
887 wake_up_bit(&intel->flags, STATE_DOWNLOADING); in intel_recv_event()
895 if (test_and_clear_bit(STATE_BOOTING, &intel->flags)) in intel_recv_event()
896 wake_up_bit(&intel->flags, STATE_BOOTING); in intel_recv_event()
905 struct intel_data *intel = hu->priv; in intel_recv_lpm_notify() local
910 set_bit(STATE_TX_ACTIVE, &intel->flags); in intel_recv_lpm_notify()
911 schedule_work(&intel->busy_work); in intel_recv_lpm_notify()
913 clear_bit(STATE_TX_ACTIVE, &intel->flags); in intel_recv_lpm_notify()
921 struct intel_data *intel = hu->priv; in intel_recv_lpm() local
932 set_bit(STATE_SUSPENDED, &intel->flags); in intel_recv_lpm()
933 if (test_and_clear_bit(STATE_LPM_TRANSACTION, &intel->flags)) in intel_recv_lpm()
934 wake_up_bit(&intel->flags, STATE_LPM_TRANSACTION); in intel_recv_lpm()
937 clear_bit(STATE_SUSPENDED, &intel->flags); in intel_recv_lpm()
938 if (test_and_clear_bit(STATE_LPM_TRANSACTION, &intel->flags)) in intel_recv_lpm()
939 wake_up_bit(&intel->flags, STATE_LPM_TRANSACTION); in intel_recv_lpm()
967 struct intel_data *intel = hu->priv; in intel_recv() local
972 intel->rx_skb = h4_recv_buf(hu->hdev, intel->rx_skb, data, count, in intel_recv()
975 if (IS_ERR(intel->rx_skb)) { in intel_recv()
976 int err = PTR_ERR(intel->rx_skb); in intel_recv()
978 intel->rx_skb = NULL; in intel_recv()
987 struct intel_data *intel = hu->priv; in intel_enqueue() local
1009 skb_queue_tail(&intel->txq, skb); in intel_enqueue()
1016 struct intel_data *intel = hu->priv; in intel_dequeue() local
1019 skb = skb_dequeue(&intel->txq); in intel_dequeue()
1023 if (test_bit(STATE_BOOTLOADER, &intel->flags) && in intel_dequeue()