mmc: sdhci-of-dwcmshc: Add support to set pd always on

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I7457ad1324098a4495605a00ea848282e388a2c1
This commit is contained in:
Finley Xiao
2024-03-11 10:16:00 +08:00
committed by Tao Huang
parent aaa0cfea6d
commit 2412fded4c

View File

@@ -15,6 +15,7 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/pm_domain.h>
#include <linux/pm_runtime.h>
#include <linux/reset.h>
#include <linux/sizes.h>
@@ -692,6 +693,12 @@ static int dwcmshc_probe(struct platform_device *pdev)
goto err_setup_host;
if (rk_priv && !rk_priv->acpi_en) {
if (dev->pm_domain) {
struct generic_pm_domain *genpd;
genpd = pd_to_genpd(dev->pm_domain);
genpd->flags |= GENPD_FLAG_RPM_ALWAYS_ON;
}
pm_runtime_get_noresume(&pdev->dev);
pm_runtime_set_active(&pdev->dev);
pm_runtime_enable(&pdev->dev);