Lines Matching refs:bcm

260 static int bcm_request_irq(struct bcm_data *bcm)  in bcm_request_irq()  argument
262 struct bcm_device *bdev = bcm->dev; in bcm_request_irq()
317 struct bcm_data *bcm = hu->priv; in bcm_setup_sleep() local
321 sleep_params.host_wake_active = !bcm->dev->irq_active_low; in bcm_setup_sleep()
337 static inline int bcm_request_irq(struct bcm_data *bcm) { return 0; } in bcm_request_irq() argument
344 struct bcm_data *bcm = hu->priv; in bcm_set_diag() local
358 skb_queue_tail(&bcm->txq, skb); in bcm_set_diag()
366 struct bcm_data *bcm; in bcm_open() local
372 bcm = kzalloc(sizeof(*bcm), GFP_KERNEL); in bcm_open()
373 if (!bcm) in bcm_open()
376 skb_queue_head_init(&bcm->txq); in bcm_open()
378 hu->priv = bcm; in bcm_open()
383 bcm->dev = serdev_device_get_drvdata(hu->serdev); in bcm_open()
398 bcm->dev = dev; in bcm_open()
407 if (bcm->dev) { in bcm_open()
408 hu->init_speed = bcm->dev->init_speed; in bcm_open()
409 hu->oper_speed = bcm->dev->oper_speed; in bcm_open()
410 err = bcm_gpio_set_power(bcm->dev, true); in bcm_open()
421 bcm->dev->hu = NULL; in bcm_open()
425 kfree(bcm); in bcm_open()
431 struct bcm_data *bcm = hu->priv; in bcm_close() local
442 } else if (bcm_device_exists(bcm->dev)) { in bcm_close()
443 bdev = bcm->dev; in bcm_close()
464 skb_queue_purge(&bcm->txq); in bcm_close()
465 kfree_skb(bcm->rx_skb); in bcm_close()
466 kfree(bcm); in bcm_close()
474 struct bcm_data *bcm = hu->priv; in bcm_flush() local
478 skb_queue_purge(&bcm->txq); in bcm_flush()
485 struct bcm_data *bcm = hu->priv; in bcm_setup() local
544 if (!bcm_request_irq(bcm)) in bcm_setup()
574 struct bcm_data *bcm = hu->priv; in bcm_recv() local
579 bcm->rx_skb = h4_recv_buf(hu->hdev, bcm->rx_skb, data, count, in bcm_recv()
581 if (IS_ERR(bcm->rx_skb)) { in bcm_recv()
582 int err = PTR_ERR(bcm->rx_skb); in bcm_recv()
584 bcm->rx_skb = NULL; in bcm_recv()
586 } else if (!bcm->rx_skb) { in bcm_recv()
589 if (bcm->dev && bcm_device_exists(bcm->dev)) { in bcm_recv()
590 pm_runtime_get(bcm->dev->dev); in bcm_recv()
591 pm_runtime_mark_last_busy(bcm->dev->dev); in bcm_recv()
592 pm_runtime_put_autosuspend(bcm->dev->dev); in bcm_recv()
602 struct bcm_data *bcm = hu->priv; in bcm_enqueue() local
608 skb_queue_tail(&bcm->txq, skb); in bcm_enqueue()
615 struct bcm_data *bcm = hu->priv; in bcm_dequeue() local
621 if (bcm_device_exists(bcm->dev)) { in bcm_dequeue()
622 bdev = bcm->dev; in bcm_dequeue()
627 skb = skb_dequeue(&bcm->txq); in bcm_dequeue()