Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mmc: rename mmc_can_gpio_cd() to mmc_host_can_gpio_cd()

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>

authored by

Wolfram Sang and committed by
Ulf Hansson
da012e1e b89d05f6

+12 -12
+2 -2
drivers/mmc/core/slot-gpio.c
··· 228 228 } 229 229 EXPORT_SYMBOL(mmc_gpiod_set_cd_config); 230 230 231 - bool mmc_can_gpio_cd(struct mmc_host *host) 231 + bool mmc_host_can_gpio_cd(struct mmc_host *host) 232 232 { 233 233 struct mmc_gpio *ctx = host->slot.handler_priv; 234 234 235 235 return ctx->cd_gpio ? true : false; 236 236 } 237 - EXPORT_SYMBOL(mmc_can_gpio_cd); 237 + EXPORT_SYMBOL(mmc_host_can_gpio_cd); 238 238 239 239 /** 240 240 * mmc_gpiod_request_ro - request a gpio descriptor for write protection
+3 -3
drivers/mmc/host/dw_mmc.c
··· 3622 3622 clk_disable_unprepare(host->ciu_clk); 3623 3623 3624 3624 if (host->slot && 3625 - (mmc_can_gpio_cd(host->slot->mmc) || 3625 + (mmc_host_can_gpio_cd(host->slot->mmc) || 3626 3626 !mmc_card_is_removable(host->slot->mmc))) 3627 3627 clk_disable_unprepare(host->biu_clk); 3628 3628 ··· 3636 3636 struct dw_mci *host = dev_get_drvdata(dev); 3637 3637 3638 3638 if (host->slot && 3639 - (mmc_can_gpio_cd(host->slot->mmc) || 3639 + (mmc_host_can_gpio_cd(host->slot->mmc) || 3640 3640 !mmc_card_is_removable(host->slot->mmc))) { 3641 3641 ret = clk_prepare_enable(host->biu_clk); 3642 3642 if (ret) ··· 3690 3690 3691 3691 err: 3692 3692 if (host->slot && 3693 - (mmc_can_gpio_cd(host->slot->mmc) || 3693 + (mmc_host_can_gpio_cd(host->slot->mmc) || 3694 3694 !mmc_card_is_removable(host->slot->mmc))) 3695 3695 clk_disable_unprepare(host->biu_clk); 3696 3696
+1 -1
drivers/mmc/host/mtk-sd.c
··· 3034 3034 mmc->f_min = DIV_ROUND_UP(host->src_clk_freq, 4 * 4095); 3035 3035 3036 3036 if (!(mmc->caps & MMC_CAP_NONREMOVABLE) && 3037 - !mmc_can_gpio_cd(mmc) && 3037 + !mmc_host_can_gpio_cd(mmc) && 3038 3038 host->dev_comp->use_internal_cd) { 3039 3039 /* 3040 3040 * Is removable but no GPIO declared, so
+2 -2
drivers/mmc/host/sdhci.c
··· 158 158 u32 present; 159 159 160 160 if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) || 161 - !mmc_card_is_removable(host->mmc) || mmc_can_gpio_cd(host->mmc)) 161 + !mmc_card_is_removable(host->mmc) || mmc_host_can_gpio_cd(host->mmc)) 162 162 return; 163 163 164 164 if (enable) { ··· 3744 3744 { 3745 3745 return mmc_card_is_removable(host->mmc) && 3746 3746 !(host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) && 3747 - !mmc_can_gpio_cd(host->mmc); 3747 + !mmc_host_can_gpio_cd(host->mmc); 3748 3748 } 3749 3749 3750 3750 /*
+1 -1
drivers/mmc/host/sunplus-mmc.c
··· 791 791 { 792 792 int ret = 0; 793 793 794 - if (mmc_can_gpio_cd(mmc)) 794 + if (mmc_host_can_gpio_cd(mmc)) 795 795 ret = mmc_gpio_get_cd(mmc); 796 796 797 797 if (ret < 0)
+2 -2
drivers/mmc/host/tmio_mmc_core.c
··· 1179 1179 if (mmc_can_gpio_ro(mmc)) 1180 1180 _host->ops.get_ro = mmc_gpio_get_ro; 1181 1181 1182 - if (mmc_can_gpio_cd(mmc)) 1182 + if (mmc_host_can_gpio_cd(mmc)) 1183 1183 _host->ops.get_cd = mmc_gpio_get_cd; 1184 1184 1185 1185 /* must be set before tmio_mmc_reset() */ 1186 - _host->native_hotplug = !(mmc_can_gpio_cd(mmc) || 1186 + _host->native_hotplug = !(mmc_host_can_gpio_cd(mmc) || 1187 1187 mmc->caps & MMC_CAP_NEEDS_POLL || 1188 1188 !mmc_card_is_removable(mmc)); 1189 1189
+1 -1
include/linux/mmc/slot-gpio.h
··· 24 24 int mmc_gpiod_set_cd_config(struct mmc_host *host, unsigned long config); 25 25 int mmc_gpio_set_cd_wake(struct mmc_host *host, bool on); 26 26 void mmc_gpiod_request_cd_irq(struct mmc_host *host); 27 - bool mmc_can_gpio_cd(struct mmc_host *host); 27 + bool mmc_host_can_gpio_cd(struct mmc_host *host); 28 28 bool mmc_can_gpio_ro(struct mmc_host *host); 29 29 30 30 #endif