mirror of
https://github.com/LineageOS/android_kernel_samsung_msm8226.git
synced 2026-10-17 00:00:30 +02:00
In the current implementation, turning off SDCC clocks when SDIO card is inserted, is controlled by the SDCC driver in suspend/resume callbacks. This makes the dynamic clock gating (MMC_CLKGATE) feature, when enabled, to be broken for SDIO cards, as configuring of sdio wakeup interrupt is entirely handled in system suspend/resume callbacks. Handle this by moving all of the wakeup handling code to generic set_ios function which can be called either from core layer or driver layer. Since the SDCC controller supports asynchronous notification of SDIO card activity when the clocks are off use this for enabling MMC_CLKGATE feature which helps in TCX0 during idle state. Also, handle the case where the SDIO function driver is not interested in waking up the system during suspend but the SDCC driver still configures DAT1 line as wakeup interrupt. Change-Id: I260ae2161cfe9160f93e6af4f9b6c34db96397c0 Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>