static int __devexit bcm4329_rfkill_remove(struct platform_device *pdev) { if (gBtCtrl.bt_rfk) rfkill_unregister(gBtCtrl.bt_rfk); gBtCtrl.bt_rfk = NULL; #if BT_WAKE_HOST_SUPPORT del_timer(&(gBtCtrl.tl));//删掉定时器 btWakeupHostUnlock(); wake_lock_destroy(&(gBtCtrl.bt_wakelock)); #endif platform_set_drvdata(pdev, NULL); DBG("Enter::%s,line=%d\n",__FUNCTION__,__LINE__); return 0; }
static int bcm4329_set_block(void *data, bool blocked) { DBG("%s---blocked :%d\n", __FUNCTION__, blocked); IOMUX_BT_GPIO_POWER; IOMUX_BT_GPIO_RESET; if (false == blocked) { gpio_set_value(BT_GPIO_POWER, GPIO_HIGH); /* bt power on */ gpio_set_value(BT_GPIO_RESET, GPIO_LOW); mdelay(20); gpio_set_value(BT_GPIO_RESET, GPIO_HIGH); /* bt reset deactive*/ mdelay(20); #if BT_WAKE_HOST_SUPPORT btWakeupHostLock(); #endif pr_info("bt turn on power\n"); } else { #if BT_WAKE_HOST_SUPPORT btWakeupHostUnlock(); #endif if (!rk29sdk_wifi_power_state) { gpio_set_value(BT_GPIO_POWER, GPIO_LOW); /* bt power off */ mdelay(20); pr_info("bt shut off power\n"); }else { pr_info("bt shouldn't shut off power, wifi is using it!\n"); } gpio_set_value(BT_GPIO_RESET, GPIO_LOW); /* bt reset active*/ mdelay(20); } rk29sdk_bt_power_state = !blocked; return 0; }
static void timer_hostSleep(unsigned long arg) { DBG("b_HostWake=%d\n", gBtCtrl.b_HostWake); btWakeupHostUnlock(); }
static void timer_hostSleep(unsigned long arg) { DBG("%s---b_HostWake=%d\n",__FUNCTION__,gBtCtrl.b_HostWake); btWakeupHostUnlock(); }