/** * A tasklet function that runs in tasklet context and reads the value * of the HOST_WAKE GPIO pin and further defer the work. * @param data Not used. */ static void bluesleep_hostwake_task(unsigned long data) { struct bluetooth_sleep_data *bs_data = (struct bluetooth_sleep_data *)data; unsigned long irq_flags; if (!bs_data) { pr_err("%s: bs_data is NULL\n", __func__); return ; } pr_info("hostwake line change\n"); spin_lock_irqsave(&bs_data->rw_lock, irq_flags); if (LPM_HOST_WAKE_ASSERT == gpio_get_value(bs_data->gpio_bt_wake_host.gpio)) { pr_info("bluesleep_rx_busy\n"); bluesleep_rx_busy(); } else { pr_info("bluesleep_rx_idle\n"); bluesleep_rx_idle(); } spin_unlock_irqrestore(&bs_data->rw_lock, irq_flags); }
/** * A tasklet function that runs in tasklet context and reads the value * of the HOST_WAKE GPIO pin and further defer the work. * @param data Not used. */ static void bluesleep_hostwake_task(unsigned long data) { BT_DBG("hostwake line change"); if ((gpio_get_value(bsi->host_wake) == bsi->irq_polarity)) bluesleep_rx_busy(); else bluesleep_rx_idle(); }
/** * A tasklet function that runs in tasklet context and reads the value * of the HOST_WAKE GPIO pin and further defer the work. * @param data Not used. */ static void bluesleep_hostwake_task(unsigned long data) { if (debug_mask & DEBUG_SUSPEND) pr_info("hostwake line change\n"); spin_lock(&rw_lock); if ((gpio_get_value(bsi->host_wake) == bsi->irq_polarity)) bluesleep_rx_busy(); else bluesleep_rx_idle(); spin_unlock(&rw_lock); }
/** * A tasklet function that runs in tasklet context and reads the value * of the HOST_WAKE GPIO pin and further defer the work. * @param data Not used. */ static void bluesleep_hostwake_task(unsigned long data) { BT_DBG("bluesleep_hostwake_task-hostwake -> %u", gpio_get_value(bsi->host_wake)); spin_lock(&rw_lock); #ifdef WAKE_GPIO_ACTIVE_HIGH if (gpio_get_value(bsi->host_wake)) #else if (!gpio_get_value(bsi->host_wake)) #endif bluesleep_rx_busy(); else bluesleep_rx_idle(); spin_unlock(&rw_lock); }