While trying to test suspend/resume of sdio(wifi) module of my imx6 sabresd board, I encountered the following problem where the sdio module fails to go to suspend mode.
Freezing user space processes ... (elapsed 0.01 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
wl1271_sdio mmc2:0001:2: can't keep power while host is suspended
pm_op(): platform_pm_suspend+0x0/0x5c returns -22
PM: Device sdhci-esdhc-imx.2 failed to suspend: error -22
PM: Some devices failed to suspend
While debugging this problem, I came across a flag MMC_PM_KEEP_POWER which needs to be set for sdio module to suspend. I took reference from the link iMX28 SDIO suspend fails on a 802.11n module iMX28 SDIO suspend fails on a 802.11n module but didn succeed. Where do I need to set this flag?
I am using freescale BSP kk4.4.2_1.0.0-ga with linux kernel version 3.0.35.