diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-omap3h1-bluetooth.c')
| -rw-r--r-- | arch/arm/mach-omap2/board-omap3h1-bluetooth.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/arch/arm/mach-omap2/board-omap3h1-bluetooth.c b/arch/arm/mach-omap2/board-omap3h1-bluetooth.c index 3cec4bee656..68b3d80d290 100644 --- a/arch/arm/mach-omap2/board-omap3h1-bluetooth.c +++ b/arch/arm/mach-omap2/board-omap3h1-bluetooth.c @@ -42,6 +42,7 @@ static void update_host_wake_locked(int); +#define BT_RESET_GPIO 179 #define BT_REG_GPIO 180 #define BT_WAKE_GPIO 93 #define BT_HOST_WAKE_GPIO 11 @@ -74,12 +75,13 @@ static int bcm20702_bt_rfkill_set_power(void *data, bool blocked) regulator_enable(clk32ksys_reg); gpio_set_value(BT_REG_GPIO, 1); + gpio_set_value(BT_RESET_GPIO, 1); } else { // 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) regulator_disable(clk32ksys_reg); @@ -256,14 +258,14 @@ static int bcm20702_bluetooth_probe(struct platform_device *pdev) int rc = 0; int ret = 0; -// rc = gpio_request(BT_RESET_GPIO, "bcm20702_nreset_gpip"); -// if (unlikely(rc)) { -// return rc; -// } + rc = gpio_request(BT_RESET_GPIO, "bcm20702_nreset_gpip"); + if (unlikely(rc)) { + return rc; + } rc = gpio_request(BT_REG_GPIO, "bcm20702_nshutdown_gpio"); if (unlikely(rc)) { - //gpio_free(BT_RESET_GPIO); + gpio_free(BT_RESET_GPIO); return rc; } @@ -274,14 +276,14 @@ static int bcm20702_bluetooth_probe(struct platform_device *pdev) } gpio_direction_output(BT_REG_GPIO, 1); - //gpio_direction_output(BT_RESET_GPIO, 1); + gpio_direction_output(BT_RESET_GPIO, 1); bt_rfkill = rfkill_alloc("bcm20702 Bluetooth", &pdev->dev, RFKILL_TYPE_BLUETOOTH, &bcm20702_bt_rfkill_ops, NULL); if (unlikely(!bt_rfkill)) { - //gpio_free(BT_RESET_GPIO); + gpio_free(BT_RESET_GPIO); gpio_free(BT_REG_GPIO); return -ENOMEM; } @@ -291,7 +293,7 @@ static int bcm20702_bluetooth_probe(struct platform_device *pdev) if (unlikely(rc)) { rfkill_destroy(bt_rfkill); - //gpio_free(BT_RESET_GPIO); + gpio_free(BT_RESET_GPIO); gpio_free(BT_REG_GPIO); return -1; } @@ -301,7 +303,7 @@ static int bcm20702_bluetooth_probe(struct platform_device *pdev) rfkill_unregister(bt_rfkill); rfkill_destroy(bt_rfkill); - //gpio_free(BT_RESET_GPIO); + gpio_free(BT_RESET_GPIO); gpio_free(BT_REG_GPIO); } @@ -322,7 +324,7 @@ static int bcm20702_bluetooth_remove(struct platform_device *pdev) debugfs_remove(btdebugdent); gpio_free(BT_REG_GPIO); - //gpio_free(BT_RESET_GPIO); + gpio_free(BT_RESET_GPIO); gpio_free(BT_WAKE_GPIO); gpio_free(BT_HOST_WAKE_GPIO); regulator_put(clk32ksys_reg); |