Lines Matching refs:intel

124 	struct intel_data *intel = hu->priv;  in intel_wait_booting()  local
127 err = wait_on_bit_timeout(&intel->flags, STATE_BOOTING, in intel_wait_booting()
147 struct intel_data *intel = hu->priv; in intel_wait_lpm_transaction() local
150 err = wait_on_bit_timeout(&intel->flags, STATE_LPM_TRANSACTION, in intel_wait_lpm_transaction()
170 struct intel_data *intel = hu->priv; in intel_lpm_suspend() local
173 if (!test_bit(STATE_LPM_ENABLED, &intel->flags) || in intel_lpm_suspend()
174 test_bit(STATE_SUSPENDED, &intel->flags)) in intel_lpm_suspend()
177 if (test_bit(STATE_TX_ACTIVE, &intel->flags)) in intel_lpm_suspend()
191 set_bit(STATE_LPM_TRANSACTION, &intel->flags); in intel_lpm_suspend()
194 skb_queue_head(&intel->txq, skb); in intel_lpm_suspend()
200 clear_bit(STATE_LPM_TRANSACTION, &intel->flags); in intel_lpm_suspend()
202 if (!test_bit(STATE_SUSPENDED, &intel->flags)) { in intel_lpm_suspend()
216 struct intel_data *intel = hu->priv; in intel_lpm_resume() local
219 if (!test_bit(STATE_LPM_ENABLED, &intel->flags) || in intel_lpm_resume()
220 !test_bit(STATE_SUSPENDED, &intel->flags)) in intel_lpm_resume()
235 set_bit(STATE_LPM_TRANSACTION, &intel->flags); in intel_lpm_resume()
238 skb_queue_head(&intel->txq, skb); in intel_lpm_resume()
244 clear_bit(STATE_LPM_TRANSACTION, &intel->flags); in intel_lpm_resume()
246 if (test_bit(STATE_SUSPENDED, &intel->flags)) { in intel_lpm_resume()
260 struct intel_data *intel = hu->priv; in intel_lpm_host_wake() local
265 clear_bit(STATE_SUSPENDED, &intel->flags); in intel_lpm_host_wake()
277 skb_queue_head(&intel->txq, skb); in intel_lpm_host_wake()
381 struct intel_data *intel = container_of(work, struct intel_data, in intel_busy_work() local
384 if (!intel->hu->tty->dev) in intel_busy_work()
393 if (intel->hu->tty->dev->parent == idev->pdev->dev.parent) { in intel_busy_work()
405 struct intel_data *intel; in intel_open() local
409 intel = kzalloc(sizeof(*intel), GFP_KERNEL); in intel_open()
410 if (!intel) in intel_open()
413 skb_queue_head_init(&intel->txq); in intel_open()
414 INIT_WORK(&intel->busy_work, intel_busy_work); in intel_open()
416 intel->hu = hu; in intel_open()
418 hu->priv = intel; in intel_open()
421 set_bit(STATE_BOOTING, &intel->flags); in intel_open()
428 struct intel_data *intel = hu->priv; in intel_close() local
432 cancel_work_sync(&intel->busy_work); in intel_close()
436 skb_queue_purge(&intel->txq); in intel_close()
437 kfree_skb(intel->rx_skb); in intel_close()
438 kfree(intel); in intel_close()
446 struct intel_data *intel = hu->priv; in intel_flush() local
450 skb_queue_purge(&intel->txq); in intel_flush()
482 struct intel_data *intel = hu->priv; in intel_set_baudrate() local
493 clear_bit(STATE_BOOTING, &intel->flags); in intel_set_baudrate()
529 skb_queue_tail(&intel->txq, skb); in intel_set_baudrate()
543 struct intel_data *intel = hu->priv; in intel_setup() local
587 clear_bit(STATE_BOOTING, &intel->flags); in intel_setup()
593 set_bit(STATE_BOOTLOADER, &intel->flags); in intel_setup()
645 clear_bit(STATE_BOOTLOADER, &intel->flags); in intel_setup()
759 set_bit(STATE_DOWNLOADING, &intel->flags); in intel_setup()
766 set_bit(STATE_FIRMWARE_LOADED, &intel->flags); in intel_setup()
781 err = wait_on_bit_timeout(&intel->flags, STATE_DOWNLOADING, in intel_setup()
796 if (test_bit(STATE_FIRMWARE_FAILED, &intel->flags)) { in intel_setup()
823 set_bit(STATE_BOOTING, &intel->flags); in intel_setup()
842 clear_bit(STATE_BOOTING, &intel->flags); in intel_setup()
861 set_bit(STATE_LPM_ENABLED, &intel->flags); in intel_setup()
862 set_bit(STATE_TX_ACTIVE, &intel->flags); in intel_setup()
885 clear_bit(STATE_BOOTLOADER, &intel->flags); in intel_setup()
893 struct intel_data *intel = hu->priv; in intel_recv_event() local
896 if (!test_bit(STATE_BOOTLOADER, &intel->flags) && in intel_recv_event()
897 !test_bit(STATE_BOOTING, &intel->flags)) in intel_recv_event()
909 set_bit(STATE_FIRMWARE_FAILED, &intel->flags); in intel_recv_event()
911 if (test_and_clear_bit(STATE_DOWNLOADING, &intel->flags) && in intel_recv_event()
912 test_bit(STATE_FIRMWARE_LOADED, &intel->flags)) { in intel_recv_event()
914 wake_up_bit(&intel->flags, STATE_DOWNLOADING); in intel_recv_event()
923 if (test_and_clear_bit(STATE_BOOTING, &intel->flags)) { in intel_recv_event()
925 wake_up_bit(&intel->flags, STATE_BOOTING); in intel_recv_event()
935 struct intel_data *intel = hu->priv; in intel_recv_lpm_notify() local
940 set_bit(STATE_TX_ACTIVE, &intel->flags); in intel_recv_lpm_notify()
941 schedule_work(&intel->busy_work); in intel_recv_lpm_notify()
943 clear_bit(STATE_TX_ACTIVE, &intel->flags); in intel_recv_lpm_notify()
951 struct intel_data *intel = hu->priv; in intel_recv_lpm() local
962 set_bit(STATE_SUSPENDED, &intel->flags); in intel_recv_lpm()
963 if (test_and_clear_bit(STATE_LPM_TRANSACTION, &intel->flags)) { in intel_recv_lpm()
965 wake_up_bit(&intel->flags, STATE_LPM_TRANSACTION); in intel_recv_lpm()
969 clear_bit(STATE_SUSPENDED, &intel->flags); in intel_recv_lpm()
970 if (test_and_clear_bit(STATE_LPM_TRANSACTION, &intel->flags)) { in intel_recv_lpm()
972 wake_up_bit(&intel->flags, STATE_LPM_TRANSACTION); in intel_recv_lpm()
1001 struct intel_data *intel = hu->priv; in intel_recv() local
1006 intel->rx_skb = h4_recv_buf(hu->hdev, intel->rx_skb, data, count, in intel_recv()
1009 if (IS_ERR(intel->rx_skb)) { in intel_recv()
1010 int err = PTR_ERR(intel->rx_skb); in intel_recv()
1012 intel->rx_skb = NULL; in intel_recv()
1021 struct intel_data *intel = hu->priv; in intel_enqueue() local
1046 skb_queue_tail(&intel->txq, skb); in intel_enqueue()
1053 struct intel_data *intel = hu->priv; in intel_dequeue() local
1056 skb = skb_dequeue(&intel->txq); in intel_dequeue()
1060 if (test_bit(STATE_BOOTLOADER, &intel->flags) && in intel_dequeue()