From: CMY Date: Tue, 9 Apr 2013 10:51:47 +0000 (+0800) Subject: support broadcom AP6x serials BT X-Git-Tag: firefly_0821_release~7285 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=091fd568b4b75ef7840987e41873fa31a143da58;p=firefly-linux-kernel-4.4.55.git support broadcom AP6x serials BT --- diff --git a/net/rfkill/rfkill-rk.c b/net/rfkill/rfkill-rk.c index ccfb6a88f882..7282e35494a5 100755 --- a/net/rfkill/rfkill-rk.c +++ b/net/rfkill/rfkill-rk.c @@ -119,6 +119,14 @@ static const char bt_name[] = "bcm4329" #elif defined(CONFIG_MV8787) "mv8787" +#elif defined(CONFIG_AP6210) + "ap6210" +#elif defined(CONFIG_AP6330) + "ap6330" +#elif defined(CONFIG_AP6476) + "ap6476" +#elif defined(CONFIG_AP6493) + "ap6493" #else "bt_default" #endif @@ -280,6 +288,7 @@ static int rfkill_rk_set_power(void *data, bool blocked) struct rfkill_rk_data *rfkill = data; struct rfkill_rk_gpio *poweron = &rfkill->pdata->poweron_gpio; struct rfkill_rk_gpio *reset = &rfkill->pdata->reset_gpio; + struct rfkill_rk_gpio* rts = &rfkill->pdata->rts_gpio; DBG("Enter %s\n", __func__); @@ -287,7 +296,7 @@ static int rfkill_rk_set_power(void *data, bool blocked) if (false == blocked) { rfkill_rk_sleep_bt(BT_WAKEUP); // ensure bt is wakeup - + if (gpio_is_valid(poweron->io)) { gpio_direction_output(poweron->io, poweron->enable); @@ -301,6 +310,27 @@ static int rfkill_rk_set_power(void *data, bool blocked) msleep(20); } +#if defined(CONFIG_AP6210) + if (gpio_is_valid(rts->io)) + { + if (rts->iomux.name) + { + rk_mux_api_set(rts->iomux.name, rts->iomux.fgpio); + } + LOG("ENABLE UART_RTS\n"); + gpio_direction_output(rts->io, rts->enable); + + msleep(100); + + LOG("DISABLE UART_RTS\n"); + gpio_direction_output(rts->io, !rts->enable); + if (rts->iomux.name) + { + rk_mux_api_set(rts->iomux.name, rts->iomux.fmux); + } + } +#endif + LOG("bt turn on power\n"); } else { #if WIFI_BT_POWER_TOGGLE