[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4e74203a-5444-2b7a-3555-9615cc45aaae@intel.com>
Date: Mon, 9 Mar 2020 09:20:32 +0200
From: Adrian Hunter <adrian.hunter@...el.com>
To: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>,
linux-kernel@...r.kernel.org, Hu Ziji <huziji@...vell.com>
Cc: phil@...pberrypi.com, linux-mmc@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, f.fainelli@...il.com,
stefan.wahren@...e.com, bcm-kernel-feedback-list@...adcom.com,
linux-rpi-kernel@...ts.infradead.org,
Ulf Hansson <ulf.hansson@...aro.org>
Subject: Re: [PATCH v2 06/11] mmc: sdhci: xenon: Use
sdhci_set_power_and_voltage()
On 6/03/20 7:44 pm, Nicolas Saenz Julienne wrote:
> The sdhci core provides a helper function with the same functionality as
> this controller's set_power() callback. Use it instead.
>
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
> ---
> drivers/mmc/host/sdhci-xenon.c | 20 +-------------------
> 1 file changed, 1 insertion(+), 19 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c
> index 1dea1ba66f7b..1e9a7a76f2ba 100644
> --- a/drivers/mmc/host/sdhci-xenon.c
> +++ b/drivers/mmc/host/sdhci-xenon.c
> @@ -213,24 +213,6 @@ static void xenon_set_uhs_signaling(struct sdhci_host *host,
> sdhci_writew(host, ctrl_2, SDHCI_HOST_CONTROL2);
> }
>
> -static void xenon_set_power(struct sdhci_host *host, unsigned char mode,
> - unsigned short vdd)
> -{
> - struct mmc_host *mmc = host->mmc;
> - u8 pwr = host->pwr;
> -
> - sdhci_set_power_noreg(host, mode, vdd);
> -
> - if (host->pwr == pwr)
> - return;
> -
> - if (host->pwr == 0)
> - vdd = 0;
> -
> - if (!IS_ERR(mmc->supply.vmmc))
> - mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd);
> -}
This code is different. The commit message should explain why it is
equivalent. Has it been tested?
> -
> static void xenon_voltage_switch(struct sdhci_host *host)
> {
> /* Wait for 5ms after set 1.8V signal enable bit */
> @@ -240,7 +222,7 @@ static void xenon_voltage_switch(struct sdhci_host *host)
> static const struct sdhci_ops sdhci_xenon_ops = {
> .voltage_switch = xenon_voltage_switch,
> .set_clock = sdhci_set_clock,
> - .set_power = xenon_set_power,
> + .set_power = sdhci_set_power_and_bus_voltage,
> .set_bus_width = sdhci_set_bus_width,
> .reset = xenon_reset,
> .set_uhs_signaling = xenon_set_uhs_signaling,
>
Powered by blists - more mailing lists