mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-18 19:06:07 +07:00
mmc: mmci: Convert to pinctrl_select_default_state()
Let's drop the boilerplate code for managing the default pinctrl state and convert into using the new pinctrl_select_default_state(). Additionally, move away from using pinctrl_pm_select_default_state() as it's scheduled for removal and use pinctrl_select_default_state() instead. Cc: Russell King <linux@armlinux.org.uk> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20191206170821.29711-4-ulf.hansson@linaro.org
This commit is contained in:
parent
f9be7f9c35
commit
05344ffe4b
@ -1704,7 +1704,7 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
|
||||
if (ios->bus_mode == MMC_BUSMODE_OPENDRAIN)
|
||||
pinctrl_select_state(host->pinctrl, host->pins_opendrain);
|
||||
else
|
||||
pinctrl_select_state(host->pinctrl, host->pins_default);
|
||||
pinctrl_select_default_state(mmc_dev(mmc));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1877,14 +1877,6 @@ static int mmci_probe(struct amba_device *dev,
|
||||
goto host_free;
|
||||
}
|
||||
|
||||
host->pins_default = pinctrl_lookup_state(host->pinctrl,
|
||||
PINCTRL_STATE_DEFAULT);
|
||||
if (IS_ERR(host->pins_default)) {
|
||||
dev_err(mmc_dev(mmc), "Can't select default pins\n");
|
||||
ret = PTR_ERR(host->pins_default);
|
||||
goto host_free;
|
||||
}
|
||||
|
||||
host->pins_opendrain = pinctrl_lookup_state(host->pinctrl,
|
||||
MMCI_PINCTRL_STATE_OPENDRAIN);
|
||||
if (IS_ERR(host->pins_opendrain)) {
|
||||
@ -2203,7 +2195,7 @@ static int mmci_runtime_resume(struct device *dev)
|
||||
struct mmci_host *host = mmc_priv(mmc);
|
||||
clk_prepare_enable(host->clk);
|
||||
mmci_restore(host);
|
||||
pinctrl_pm_select_default_state(dev);
|
||||
pinctrl_select_default_state(dev);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -404,7 +404,6 @@ struct mmci_host {
|
||||
struct mmci_host_ops *ops;
|
||||
struct variant_data *variant;
|
||||
struct pinctrl *pinctrl;
|
||||
struct pinctrl_state *pins_default;
|
||||
struct pinctrl_state *pins_opendrain;
|
||||
|
||||
u8 hw_designer;
|
||||
|
Loading…
Reference in New Issue
Block a user