[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <278e7efe-c13f-d028-6f7b-9b83fbe29ef3@intel.com>
Date: Mon, 9 Mar 2020 09:25:39 +0200
From: Adrian Hunter <adrian.hunter@...el.com>
To: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>,
linux-kernel@...r.kernel.org,
Ludovic Desroches <ludovic.desroches@...rochip.com>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
Alexandre Belloni <alexandre.belloni@...tlin.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 04/11] mmc: sdhci: at91: 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>
Acked-by: Adrian Hunter <adrian.hunter@...el.com>
> ---
> drivers/mmc/host/sdhci-of-at91.c | 18 +-----------------
> 1 file changed, 1 insertion(+), 17 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-of-at91.c b/drivers/mmc/host/sdhci-of-at91.c
> index ab2bd314a390..564a606f6729 100644
> --- a/drivers/mmc/host/sdhci-of-at91.c
> +++ b/drivers/mmc/host/sdhci-of-at91.c
> @@ -101,22 +101,6 @@ static void sdhci_at91_set_clock(struct sdhci_host *host, unsigned int clock)
> sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL);
> }
>
> -/*
> - * In this specific implementation of the SDHCI controller, the power register
> - * needs to have a valid voltage set even when the power supply is managed by
> - * an external regulator.
> - */
> -static void sdhci_at91_set_power(struct sdhci_host *host, unsigned char mode,
> - unsigned short vdd)
> -{
> - if (!IS_ERR(host->mmc->supply.vmmc)) {
> - struct mmc_host *mmc = host->mmc;
> -
> - mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd);
> - }
> - sdhci_set_power_noreg(host, mode, vdd);
> -}
> -
> static void sdhci_at91_set_uhs_signaling(struct sdhci_host *host,
> unsigned int timing)
> {
> @@ -145,7 +129,7 @@ static const struct sdhci_ops sdhci_at91_sama5d2_ops = {
> .set_bus_width = sdhci_set_bus_width,
> .reset = sdhci_at91_reset,
> .set_uhs_signaling = sdhci_at91_set_uhs_signaling,
> - .set_power = sdhci_at91_set_power,
> + .set_power = sdhci_set_power_and_bus_voltage,
> };
>
> static const struct sdhci_pltfm_data sdhci_sama5d2_pdata = {
>
Powered by blists - more mailing lists