/** @brief This function handles client driver resume * * @param dev A pointer to device structure * @return BT_STATUS_SUCCESS */ int bt_sdio_resume(struct device *dev) { struct sdio_func *func = dev_to_sdio_func(dev); mmc_pm_flag_t pm_flags = 0; bt_private *priv = NULL; struct sdio_mmc_card *cardp; struct m_dev *m_dev = NULL; ENTER(); pm_flags = sdio_get_host_pm_caps(func); PRINTM(CMD, "BT: %s: resume: PM flags = 0x%x\n", sdio_func_id(func), pm_flags); cardp = sdio_get_drvdata(func); if (!cardp || !cardp->priv) { PRINTM(ERROR, "BT: Card or priv structure is not valid\n"); LEAVE(); return BT_STATUS_SUCCESS; } priv = cardp->priv; priv->adapter->is_suspended = FALSE; m_dev = &(priv->bt_dev.m_dev[BT_SEQ]); PRINTM(CMD, "BT %s: SDIO resume\n", m_dev->name); mbt_hci_resume_dev(m_dev); sbi_wakeup_firmware(priv); /* enable FM event mask */ if ((priv->bt_dev.m_dev[FM_SEQ].dev_type == FM_TYPE) && test_bit(HCI_RUNNING, &(priv->bt_dev.m_dev[FM_SEQ].flags))) fm_set_intr_mask(priv, FM_DEFAULT_INTR_MASK); priv->adapter->hs_state = HS_DEACTIVATED; PRINTM(CMD, "BT:%s: HS DEACTIVATED in Resume!\n", m_dev->name); LEAVE(); return BT_STATUS_SUCCESS; }
/** @brief This function handles client driver resume * * @param dev A pointer to device structure * @return BT_STATUS_SUCCESS */ int bt_sdio_resume(struct device *dev) { struct sdio_func *func = dev_to_sdio_func(dev); mmc_pm_flag_t pm_flags = 0; bt_private *priv = NULL; struct sdio_mmc_card *cardp; struct hci_dev *hcidev; ENTER(); if (func) { pm_flags = sdio_get_host_pm_caps(func); PRINTM(CMD, "BT: %s: resume: PM flags = 0x%x\n", sdio_func_id(func), pm_flags); cardp = sdio_get_drvdata(func); if (!cardp || !cardp->priv) { PRINTM(ERROR, "BT: Card or priv structure is not valid\n"); LEAVE(); return BT_STATUS_SUCCESS; } } else { PRINTM(ERROR, "BT: sdio_func is not specified\n"); LEAVE(); return BT_STATUS_SUCCESS; } priv = cardp->priv; priv->adapter->is_suspended = FALSE; hcidev = priv->bt_dev.hcidev; PRINTM(CMD, "BT %s: SDIO resume\n", hcidev->name); mbt_hci_resume_dev(hcidev); sbi_wakeup_firmware(priv); priv->adapter->hs_state = HS_DEACTIVATED; PRINTM(CMD, "BT:%s: HS DEACTIVATED in Resume!\n", hcidev->name); LEAVE(); return BT_STATUS_SUCCESS; }