mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 22:14:04 +02:00
bluetooth: rfkill-bt: fix bt irq cannot wake host.
This issue is caused by set wake_host_gpio to out put, so cancel set wake_host_gpio to out put Change-Id: If776c1a9f54914cf0da728925fb8c8bbb5886155 Signed-off-by: Longjian Lin <llj@rock-chips.com>
This commit is contained in:
parent
7ec0b63a75
commit
5f582e90ef
|
|
@ -264,7 +264,6 @@ int rfkill_get_bt_power_state(int *power, bool *toggle)
|
|||
static int rfkill_rk_set_power(void *data, bool blocked)
|
||||
{
|
||||
struct rfkill_rk_data *rfkill = data;
|
||||
struct rfkill_rk_gpio *wake_host = &rfkill->pdata->wake_host_irq.gpio;
|
||||
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;
|
||||
|
|
@ -290,20 +289,13 @@ 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(wake_host->io)) {
|
||||
LOG("%s: set bt wake_host pin output high!\n", __func__);
|
||||
gpio_direction_output(wake_host->io, 1);
|
||||
msleep(20);
|
||||
}
|
||||
|
||||
if (gpio_is_valid(poweron->io) && gpio_is_valid(wake_host->io)) {
|
||||
if (gpio_is_valid(poweron->io)) {
|
||||
if (gpio_get_value(poweron->io) == !poweron->enable) {
|
||||
gpio_direction_output(poweron->io, !poweron->enable);
|
||||
msleep(20);
|
||||
gpio_direction_output(poweron->io, poweron->enable);
|
||||
msleep(20);
|
||||
gpio_direction_input(wake_host->io);
|
||||
LOG("%s: set bt wake_host pin input!\n", __func__);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user