Lines Matching refs:bcm

312 static int bcm_request_irq(struct bcm_data *bcm)  in bcm_request_irq()  argument
314 struct bcm_device *bdev = bcm->dev; in bcm_request_irq()
371 struct bcm_data *bcm = hu->priv; in bcm_setup_sleep() local
375 sleep_params.host_wake_active = !bcm->dev->irq_active_low; in bcm_setup_sleep()
391 static inline int bcm_request_irq(struct bcm_data *bcm) { return 0; } in bcm_request_irq() argument
398 struct bcm_data *bcm = hu->priv; in bcm_set_diag() local
412 skb_queue_tail(&bcm->txq, skb); in bcm_set_diag()
420 struct bcm_data *bcm; in bcm_open() local
429 bcm = kzalloc(sizeof(*bcm), GFP_KERNEL); in bcm_open()
430 if (!bcm) in bcm_open()
433 skb_queue_head_init(&bcm->txq); in bcm_open()
435 hu->priv = bcm; in bcm_open()
440 bcm->dev = serdev_device_get_drvdata(hu->serdev); in bcm_open()
455 bcm->dev = dev; in bcm_open()
464 if (bcm->dev) { in bcm_open()
465 if (bcm->dev->drive_rts_on_open) in bcm_open()
468 hu->init_speed = bcm->dev->init_speed; in bcm_open()
473 if (!bcm->dev->no_early_set_baudrate) in bcm_open()
474 hu->oper_speed = bcm->dev->oper_speed; in bcm_open()
476 err = bcm_gpio_set_power(bcm->dev, true); in bcm_open()
478 if (bcm->dev->drive_rts_on_open) in bcm_open()
491 bcm->dev->hu = NULL; in bcm_open()
495 kfree(bcm); in bcm_open()
501 struct bcm_data *bcm = hu->priv; in bcm_close() local
512 } else if (bcm_device_exists(bcm->dev)) { in bcm_close()
513 bdev = bcm->dev; in bcm_close()
534 skb_queue_purge(&bcm->txq); in bcm_close()
535 kfree_skb(bcm->rx_skb); in bcm_close()
536 kfree(bcm); in bcm_close()
544 struct bcm_data *bcm = hu->priv; in bcm_flush() local
548 skb_queue_purge(&bcm->txq); in bcm_flush()
555 struct bcm_data *bcm = hu->priv; in bcm_setup() local
586 else if (bcm->dev && bcm->dev->oper_speed) in bcm_setup()
587 speed = bcm->dev->oper_speed; in bcm_setup()
600 if (bcm->dev && bcm->dev->pcm_int_params[0] != 0xff) { in bcm_setup()
605 memcpy(&params, bcm->dev->pcm_int_params, 5); in bcm_setup()
619 if (!bcm_request_irq(bcm)) in bcm_setup()
665 struct bcm_data *bcm = hu->priv; in bcm_recv() local
670 bcm->rx_skb = h4_recv_buf(hu->hdev, bcm->rx_skb, data, count, in bcm_recv()
672 if (IS_ERR(bcm->rx_skb)) { in bcm_recv()
673 int err = PTR_ERR(bcm->rx_skb); in bcm_recv()
675 bcm->rx_skb = NULL; in bcm_recv()
677 } else if (!bcm->rx_skb) { in bcm_recv()
680 if (bcm->dev && bcm_device_exists(bcm->dev)) { in bcm_recv()
681 pm_runtime_get(bcm->dev->dev); in bcm_recv()
682 pm_runtime_mark_last_busy(bcm->dev->dev); in bcm_recv()
683 pm_runtime_put_autosuspend(bcm->dev->dev); in bcm_recv()
693 struct bcm_data *bcm = hu->priv; in bcm_enqueue() local
699 skb_queue_tail(&bcm->txq, skb); in bcm_enqueue()
706 struct bcm_data *bcm = hu->priv; in bcm_dequeue() local
712 if (bcm_device_exists(bcm->dev)) { in bcm_dequeue()
713 bdev = bcm->dev; in bcm_dequeue()
718 skb = skb_dequeue(&bcm->txq); in bcm_dequeue()