aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/bluetooth/hci_bcm.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
index 1fc604a0d870..7d059b35c63a 100644
--- a/drivers/bluetooth/hci_bcm.c
+++ b/drivers/bluetooth/hci_bcm.c
@@ -572,11 +572,9 @@ static int bcm_suspend_device(struct device *dev)
572 } 572 }
573 573
574 /* Suspend the device */ 574 /* Suspend the device */
575 if (bdev->device_wakeup) { 575 gpiod_set_value(bdev->device_wakeup, false);
576 gpiod_set_value(bdev->device_wakeup, false); 576 bt_dev_dbg(bdev, "suspend, delaying 15 ms");
577 bt_dev_dbg(bdev, "suspend, delaying 15 ms"); 577 mdelay(15);
578 mdelay(15);
579 }
580 578
581 return 0; 579 return 0;
582} 580}
@@ -587,11 +585,9 @@ static int bcm_resume_device(struct device *dev)
587 585
588 bt_dev_dbg(bdev, ""); 586 bt_dev_dbg(bdev, "");
589 587
590 if (bdev->device_wakeup) { 588 gpiod_set_value(bdev->device_wakeup, true);
591 gpiod_set_value(bdev->device_wakeup, true); 589 bt_dev_dbg(bdev, "resume, delaying 15 ms");
592 bt_dev_dbg(bdev, "resume, delaying 15 ms"); 590 mdelay(15);
593 mdelay(15);
594 }
595 591
596 /* When this executes, the device has woken up already */ 592 /* When this executes, the device has woken up already */
597 if (bdev->is_suspended && bdev->hu) { 593 if (bdev->is_suspended && bdev->hu) {
@@ -774,14 +770,12 @@ static int bcm_get_resources(struct bcm_device *dev)
774 770
775 dev->clk = devm_clk_get(dev->dev, NULL); 771 dev->clk = devm_clk_get(dev->dev, NULL);
776 772
777 dev->device_wakeup = devm_gpiod_get_optional(dev->dev, 773 dev->device_wakeup = devm_gpiod_get(dev->dev, "device-wakeup",
778 "device-wakeup", 774 GPIOD_OUT_LOW);
779 GPIOD_OUT_LOW);
780 if (IS_ERR(dev->device_wakeup)) 775 if (IS_ERR(dev->device_wakeup))
781 return PTR_ERR(dev->device_wakeup); 776 return PTR_ERR(dev->device_wakeup);
782 777
783 dev->shutdown = devm_gpiod_get_optional(dev->dev, "shutdown", 778 dev->shutdown = devm_gpiod_get(dev->dev, "shutdown", GPIOD_OUT_LOW);
784 GPIOD_OUT_LOW);
785 if (IS_ERR(dev->shutdown)) 779 if (IS_ERR(dev->shutdown))
786 return PTR_ERR(dev->shutdown); 780 return PTR_ERR(dev->shutdown);
787 781