summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/board-omap3h1-bluetooth.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/board-omap3h1-bluetooth.c')
-rw-r--r--arch/arm/mach-omap2/board-omap3h1-bluetooth.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/board-omap3h1-bluetooth.c b/arch/arm/mach-omap2/board-omap3h1-bluetooth.c
index 6c4a13ec093..84108a79258 100644
--- a/arch/arm/mach-omap2/board-omap3h1-bluetooth.c
+++ b/arch/arm/mach-omap2/board-omap3h1-bluetooth.c
@@ -45,6 +45,7 @@ static void update_host_wake_locked(int);
#define BT_RESET_GPIO 179
#define BT_REG_GPIO 180
+#define BT_RESET_GPIO 179
#define BT_WAKE_GPIO 93
#define BT_HOST_WAKE_GPIO 11
#define UART_PORT 1
@@ -71,11 +72,12 @@ struct bcm_bt_lpm {
static int bcm20702_bt_rfkill_set_power(void *data, bool blocked)
{
- // rfkill_ops callback. Turn transmitter on when blocked is false
+ // rfkill_ops callback. Turn transmitter on when blocked is false
if (!blocked) {
if (clk32ksys_reg && !bt_enabled)
regulator_enable(clk32ksys_reg);
+ gpio_set_value(BT_RESET_GPIO, 1);
gpio_set_value(BT_REG_GPIO, 1);
gpio_set_value(BT_RESET_GPIO, 1);
@@ -83,6 +85,7 @@ static int bcm20702_bt_rfkill_set_power(void *data, bool blocked)
// Chip won't toggle host_wake after reset. Make sure
// we don't hold the wake_lock until chip wakes up again.
update_host_wake_locked(0);
+
gpio_set_value(BT_RESET_GPIO, 0);
gpio_set_value(BT_REG_GPIO, 0);
if (clk32ksys_reg && bt_enabled)
@@ -261,6 +264,7 @@ static int bcm20702_bluetooth_probe(struct platform_device *pdev)
int ret = 0;
rc = gpio_request(BT_RESET_GPIO, "bcm20702_nreset_gpip");
+
if (unlikely(rc)) {
return rc;
}
@@ -341,7 +345,7 @@ int bcm4430_bluetooth_suspend(struct platform_device *pdev, pm_message_t state)
int host_wake;
disable_irq(irq);
- host_wake = gpio_get_value(BT_HOST_WAKE_GPIO); /* Never goes low - what's up? */
+ host_wake = gpio_get_value(BT_HOST_WAKE_GPIO);
if (host_wake) {
enable_irq(irq);