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()
366 struct intel_data *intel = container_of(work, struct intel_data, in intel_busy_work() local
369 if (!intel->hu->tty->dev) in intel_busy_work()
378 if (intel->hu->tty->dev->parent == idev->pdev->dev.parent) { in intel_busy_work()
390 struct intel_data *intel; in intel_open() local
397 intel = kzalloc(sizeof(*intel), GFP_KERNEL); in intel_open()
398 if (!intel) in intel_open()
401 skb_queue_head_init(&intel->txq); in intel_open()
402 INIT_WORK(&intel->busy_work, intel_busy_work); in intel_open()
404 intel->hu = hu; in intel_open()
406 hu->priv = intel; in intel_open()
409 set_bit(STATE_BOOTING, &intel->flags); in intel_open()
416 struct intel_data *intel = hu->priv; in intel_close() local
420 cancel_work_sync(&intel->busy_work); in intel_close()
424 skb_queue_purge(&intel->txq); in intel_close()
425 kfree_skb(intel->rx_skb); in intel_close()
426 kfree(intel); in intel_close()
434 struct intel_data *intel = hu->priv; in intel_flush() local
438 skb_queue_purge(&intel->txq); in intel_flush()
470 struct intel_data *intel = hu->priv; in intel_set_baudrate() local
481 clear_bit(STATE_BOOTING, &intel->flags); in intel_set_baudrate()
517 skb_queue_tail(&intel->txq, skb); in intel_set_baudrate()
531 struct intel_data *intel = hu->priv; in intel_setup() local
575 clear_bit(STATE_BOOTING, &intel->flags); in intel_setup()
581 set_bit(STATE_BOOTLOADER, &intel->flags); in intel_setup()
633 clear_bit(STATE_BOOTLOADER, &intel->flags); in intel_setup()
747 set_bit(STATE_DOWNLOADING, &intel->flags); in intel_setup()
754 set_bit(STATE_FIRMWARE_LOADED, &intel->flags); in intel_setup()
769 err = wait_on_bit_timeout(&intel->flags, STATE_DOWNLOADING, in intel_setup()
784 if (test_bit(STATE_FIRMWARE_FAILED, &intel->flags)) { in intel_setup()
811 set_bit(STATE_BOOTING, &intel->flags); in intel_setup()
830 clear_bit(STATE_BOOTING, &intel->flags); in intel_setup()
849 set_bit(STATE_LPM_ENABLED, &intel->flags); in intel_setup()
850 set_bit(STATE_TX_ACTIVE, &intel->flags); in intel_setup()
873 clear_bit(STATE_BOOTLOADER, &intel->flags); in intel_setup()
881 struct intel_data *intel = hu->priv; in intel_recv_event() local
884 if (!test_bit(STATE_BOOTLOADER, &intel->flags) && in intel_recv_event()
885 !test_bit(STATE_BOOTING, &intel->flags)) in intel_recv_event()
897 set_bit(STATE_FIRMWARE_FAILED, &intel->flags); in intel_recv_event()
899 if (test_and_clear_bit(STATE_DOWNLOADING, &intel->flags) && in intel_recv_event()
900 test_bit(STATE_FIRMWARE_LOADED, &intel->flags)) in intel_recv_event()
901 wake_up_bit(&intel->flags, STATE_DOWNLOADING); in intel_recv_event()
909 if (test_and_clear_bit(STATE_BOOTING, &intel->flags)) in intel_recv_event()
910 wake_up_bit(&intel->flags, STATE_BOOTING); in intel_recv_event()
919 struct intel_data *intel = hu->priv; in intel_recv_lpm_notify() local
924 set_bit(STATE_TX_ACTIVE, &intel->flags); in intel_recv_lpm_notify()
925 schedule_work(&intel->busy_work); in intel_recv_lpm_notify()
927 clear_bit(STATE_TX_ACTIVE, &intel->flags); in intel_recv_lpm_notify()
935 struct intel_data *intel = hu->priv; in intel_recv_lpm() local
946 set_bit(STATE_SUSPENDED, &intel->flags); in intel_recv_lpm()
947 if (test_and_clear_bit(STATE_LPM_TRANSACTION, &intel->flags)) in intel_recv_lpm()
948 wake_up_bit(&intel->flags, STATE_LPM_TRANSACTION); in intel_recv_lpm()
951 clear_bit(STATE_SUSPENDED, &intel->flags); in intel_recv_lpm()
952 if (test_and_clear_bit(STATE_LPM_TRANSACTION, &intel->flags)) in intel_recv_lpm()
953 wake_up_bit(&intel->flags, STATE_LPM_TRANSACTION); in intel_recv_lpm()
981 struct intel_data *intel = hu->priv; in intel_recv() local
986 intel->rx_skb = h4_recv_buf(hu->hdev, intel->rx_skb, data, count, in intel_recv()
989 if (IS_ERR(intel->rx_skb)) { in intel_recv()
990 int err = PTR_ERR(intel->rx_skb); in intel_recv()
992 intel->rx_skb = NULL; in intel_recv()
1001 struct intel_data *intel = hu->priv; in intel_enqueue() local
1026 skb_queue_tail(&intel->txq, skb); in intel_enqueue()
1033 struct intel_data *intel = hu->priv; in intel_dequeue() local
1036 skb = skb_dequeue(&intel->txq); in intel_dequeue()
1040 if (test_bit(STATE_BOOTLOADER, &intel->flags) && in intel_dequeue()