lkml.org 
[lkml]   [2017]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 2/4] mmc: core: add mmc-sleep-awake caps
Date
This patch introduce mmc-sleep-awake for platforms
which want to enable CMD5 awake & partial_init.

Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
---
drivers/mmc/core/host.c | 2 ++
include/linux/mmc/host.h | 1 +
2 files changed, 3 insertions(+)

diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index 3f8c85d..e798814 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -320,6 +320,8 @@ int mmc_of_parse(struct mmc_host *host)
host->caps2 |= MMC_CAP2_NO_SD;
if (of_property_read_bool(np, "no-mmc"))
host->caps2 |= MMC_CAP2_NO_MMC;
+ if (of_property_read_bool(np, "mmc-sleep-awake"))
+ host->caps2 |= MMC_CAP2_SLEEP_AWAKE;

host->dsr_req = !of_property_read_u32(np, "dsr", &host->dsr);
if (host->dsr_req && (host->dsr & ~0xffff)) {
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 83f1c4a..df7882b 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -303,6 +303,7 @@ struct mmc_host {
#define MMC_CAP2_HS400_ES (1 << 20) /* Host supports enhanced strobe */
#define MMC_CAP2_NO_SD (1 << 21) /* Do not send SD commands during initialization */
#define MMC_CAP2_NO_MMC (1 << 22) /* Do not send (e)MMC commands during initialization */
+#define MMC_CAP2_SLEEP_AWAKE (1 << 23) /* Use Sleep/Awake (CMD5) */

mmc_pm_flag_t pm_caps; /* supported pm features */

--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project.
\
 
 \ /
  Last update: 2017-02-20 09:04    [W:0.122 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site