]> www.infradead.org Git - users/willy/xarray.git/commitdiff
mmc: rename mmc_can_gpio_cd() to mmc_host_can_gpio_cd()
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 1 Apr 2025 09:58:46 +0000 (11:58 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 14 May 2025 14:59:17 +0000 (16:59 +0200)
mmc_can_* functions sometimes relate to the card and sometimes to the host.
Make it obvious by renaming this function to include 'host'.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250401095847.29271-11-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/slot-gpio.c
drivers/mmc/host/dw_mmc.c
drivers/mmc/host/mtk-sd.c
drivers/mmc/host/sdhci.c
drivers/mmc/host/sunplus-mmc.c
drivers/mmc/host/tmio_mmc_core.c
include/linux/mmc/slot-gpio.h

index 5fd45581639318ce4b2149a0edef522a0ef0c750..82a933d86889621de50ae9300f927f27b9ed4e36 100644 (file)
@@ -228,13 +228,13 @@ int mmc_gpiod_set_cd_config(struct mmc_host *host, unsigned long config)
 }
 EXPORT_SYMBOL(mmc_gpiod_set_cd_config);
 
-bool mmc_can_gpio_cd(struct mmc_host *host)
+bool mmc_host_can_gpio_cd(struct mmc_host *host)
 {
        struct mmc_gpio *ctx = host->slot.handler_priv;
 
        return ctx->cd_gpio ? true : false;
 }
-EXPORT_SYMBOL(mmc_can_gpio_cd);
+EXPORT_SYMBOL(mmc_host_can_gpio_cd);
 
 /**
  * mmc_gpiod_request_ro - request a gpio descriptor for write protection
index 578290015e5bb2ab9b2a83b2960a0714f892844d..2bfcc47dcf3e4bc575a4421b809ebd60402d68be 100644 (file)
@@ -3622,7 +3622,7 @@ int dw_mci_runtime_suspend(struct device *dev)
        clk_disable_unprepare(host->ciu_clk);
 
        if (host->slot &&
-           (mmc_can_gpio_cd(host->slot->mmc) ||
+           (mmc_host_can_gpio_cd(host->slot->mmc) ||
             !mmc_card_is_removable(host->slot->mmc)))
                clk_disable_unprepare(host->biu_clk);
 
@@ -3636,7 +3636,7 @@ int dw_mci_runtime_resume(struct device *dev)
        struct dw_mci *host = dev_get_drvdata(dev);
 
        if (host->slot &&
-           (mmc_can_gpio_cd(host->slot->mmc) ||
+           (mmc_host_can_gpio_cd(host->slot->mmc) ||
             !mmc_card_is_removable(host->slot->mmc))) {
                ret = clk_prepare_enable(host->biu_clk);
                if (ret)
@@ -3690,7 +3690,7 @@ int dw_mci_runtime_resume(struct device *dev)
 
 err:
        if (host->slot &&
-           (mmc_can_gpio_cd(host->slot->mmc) ||
+           (mmc_host_can_gpio_cd(host->slot->mmc) ||
             !mmc_card_is_removable(host->slot->mmc)))
                clk_disable_unprepare(host->biu_clk);
 
index ceeae1aeac946d3e20f441615704d9503bd13c6b..a9bd0bc4d4eba7a4ff29de553a6b5b21c84215ea 100644 (file)
@@ -3034,7 +3034,7 @@ static int msdc_drv_probe(struct platform_device *pdev)
                mmc->f_min = DIV_ROUND_UP(host->src_clk_freq, 4 * 4095);
 
        if (!(mmc->caps & MMC_CAP_NONREMOVABLE) &&
-           !mmc_can_gpio_cd(mmc) &&
+           !mmc_host_can_gpio_cd(mmc) &&
            host->dev_comp->use_internal_cd) {
                /*
                 * Is removable but no GPIO declared, so
index 5f78be7ae16d782a52ded009f984c715bb587ba1..8afa78db72b284062c32b8611278f994d1a6c732 100644 (file)
@@ -158,7 +158,7 @@ static void sdhci_set_card_detection(struct sdhci_host *host, bool enable)
        u32 present;
 
        if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) ||
-           !mmc_card_is_removable(host->mmc) || mmc_can_gpio_cd(host->mmc))
+           !mmc_card_is_removable(host->mmc) || mmc_host_can_gpio_cd(host->mmc))
                return;
 
        if (enable) {
@@ -3744,7 +3744,7 @@ static bool sdhci_cd_irq_can_wakeup(struct sdhci_host *host)
 {
        return mmc_card_is_removable(host->mmc) &&
               !(host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) &&
-              !mmc_can_gpio_cd(host->mmc);
+              !mmc_host_can_gpio_cd(host->mmc);
 }
 
 /*
index 1cddea615a27075640ab39feeb7e97ffd6c66782..63279760239cdc0ec27382c774dccfcf83e0bbc1 100644 (file)
@@ -791,7 +791,7 @@ static int spmmc_get_cd(struct mmc_host *mmc)
 {
        int ret = 0;
 
-       if (mmc_can_gpio_cd(mmc))
+       if (mmc_host_can_gpio_cd(mmc))
                ret = mmc_gpio_get_cd(mmc);
 
        if (ret < 0)
index 04c1c54df791b00fef2c72bafb5058160bf2c41a..569b66d3d47a612dffa85c735aebd8f4eb57856d 100644 (file)
@@ -1179,11 +1179,11 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host)
        if (mmc_can_gpio_ro(mmc))
                _host->ops.get_ro = mmc_gpio_get_ro;
 
-       if (mmc_can_gpio_cd(mmc))
+       if (mmc_host_can_gpio_cd(mmc))
                _host->ops.get_cd = mmc_gpio_get_cd;
 
        /* must be set before tmio_mmc_reset() */
-       _host->native_hotplug = !(mmc_can_gpio_cd(mmc) ||
+       _host->native_hotplug = !(mmc_host_can_gpio_cd(mmc) ||
                                  mmc->caps & MMC_CAP_NEEDS_POLL ||
                                  !mmc_card_is_removable(mmc));
 
index 1ed7b0d1e4f920bce642fb165b5be82d040810f6..4f6a46c636ec9ba16dbf0c8b081d0564b121571a 100644 (file)
@@ -24,7 +24,7 @@ int mmc_gpiod_request_ro(struct mmc_host *host, const char *con_id,
 int mmc_gpiod_set_cd_config(struct mmc_host *host, unsigned long config);
 int mmc_gpio_set_cd_wake(struct mmc_host *host, bool on);
 void mmc_gpiod_request_cd_irq(struct mmc_host *host);
-bool mmc_can_gpio_cd(struct mmc_host *host);
+bool mmc_host_can_gpio_cd(struct mmc_host *host);
 bool mmc_can_gpio_ro(struct mmc_host *host);
 
 #endif