arm: tegra: cardhu: correcting bt rst gpio
Rakesh Goyal [Tue, 15 Mar 2011 11:42:25 +0000 (16:42 +0530)]
introduced delay after toggling the gpio.

BUG 802916 800599
Original-Change-Id: I5cbd5c3334634af5ab1d42103d0a890fee2ecfc3
Reviewed-on: http://git-master/r/23001
Tested-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Original-Change-Id: I91e00b1a7d4f2fd02b97ca59fdd870a7eeb9c191

Rebase-Id: R7c5c45935803581dbda9f0a47d2c554f7f0a4519

drivers/misc/bcm4329_rfkill.c

index c266195..a077326 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/platform_device.h>
 #include <linux/clk.h>
 #include <linux/slab.h>
+#include <linux/delay.h>
 
 struct bcm4329_rfkill_data {
        int gpio_reset;
@@ -54,9 +55,19 @@ static int bcm4329_bt_rfkill_set_power(void *data, bool blocked)
                if (bcm4329_rfkill->bt_32k_clk)
                        clk_enable(bcm4329_rfkill->bt_32k_clk);
                if (bcm4329_rfkill->gpio_shutdown)
+               {
+                       gpio_direction_output(bcm4329_rfkill->gpio_shutdown, 0);
+                       msleep(100);
                        gpio_direction_output(bcm4329_rfkill->gpio_shutdown, 1);
+                       msleep(100);
+               }
                if (bcm4329_rfkill->gpio_reset)
+               {
+                       gpio_direction_output(bcm4329_rfkill->gpio_reset, 0);
+                       msleep(100);
                        gpio_direction_output(bcm4329_rfkill->gpio_reset, 1);
+                       msleep(100);
+               }
        }
 
        return 0;