Skip to content

Commit b8b0f46

Browse files
Luke Wangstorulf
authored andcommitted
mmc: sdhci: export APIs for sdhci irq wakeup
Export the sdhci_enable_irq_wakeups() and sdhci_disable_irq_wakeups, so other driver can use them. Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20250514094903.1771642-1-ziniu.wang_1@nxp.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent e5502d1 commit b8b0f46

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

drivers/mmc/host/sdhci.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3755,7 +3755,7 @@ static bool sdhci_cd_irq_can_wakeup(struct sdhci_host *host)
37553755
* sdhci_disable_irq_wakeups() since it will be set by
37563756
* sdhci_enable_card_detection() or sdhci_init().
37573757
*/
3758-
static bool sdhci_enable_irq_wakeups(struct sdhci_host *host)
3758+
bool sdhci_enable_irq_wakeups(struct sdhci_host *host)
37593759
{
37603760
u8 mask = SDHCI_WAKE_ON_INSERT | SDHCI_WAKE_ON_REMOVE |
37613761
SDHCI_WAKE_ON_INT;
@@ -3787,8 +3787,9 @@ static bool sdhci_enable_irq_wakeups(struct sdhci_host *host)
37873787

37883788
return host->irq_wake_enabled;
37893789
}
3790+
EXPORT_SYMBOL_GPL(sdhci_enable_irq_wakeups);
37903791

3791-
static void sdhci_disable_irq_wakeups(struct sdhci_host *host)
3792+
void sdhci_disable_irq_wakeups(struct sdhci_host *host)
37923793
{
37933794
u8 val;
37943795
u8 mask = SDHCI_WAKE_ON_INSERT | SDHCI_WAKE_ON_REMOVE
@@ -3802,6 +3803,7 @@ static void sdhci_disable_irq_wakeups(struct sdhci_host *host)
38023803

38033804
host->irq_wake_enabled = false;
38043805
}
3806+
EXPORT_SYMBOL_GPL(sdhci_disable_irq_wakeups);
38053807

38063808
int sdhci_suspend_host(struct sdhci_host *host)
38073809
{

drivers/mmc/host/sdhci.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -875,6 +875,8 @@ void sdhci_adma_write_desc(struct sdhci_host *host, void **desc,
875875
dma_addr_t addr, int len, unsigned int cmd);
876876

877877
#ifdef CONFIG_PM
878+
bool sdhci_enable_irq_wakeups(struct sdhci_host *host);
879+
void sdhci_disable_irq_wakeups(struct sdhci_host *host);
878880
int sdhci_suspend_host(struct sdhci_host *host);
879881
int sdhci_resume_host(struct sdhci_host *host);
880882
int sdhci_runtime_suspend_host(struct sdhci_host *host);

0 commit comments

Comments
 (0)