[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9919960a-fcb1-f67d-17cf-37b49f2a2d5c@intel.com>
Date: Mon, 9 Mar 2020 09:27:29 +0200
From: Adrian Hunter <adrian.hunter@...el.com>
To: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>,
linux-kernel@...r.kernel.org
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 07/11] mmc: sdhci: am654: 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_am654.c | 17 +++--------------
> 1 file changed, 3 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c
> index 3afea580fbea..c70647489bbd 100644
> --- a/drivers/mmc/host/sdhci_am654.c
> +++ b/drivers/mmc/host/sdhci_am654.c
> @@ -208,17 +208,6 @@ static void sdhci_j721e_4bit_set_clock(struct sdhci_host *host,
> sdhci_set_clock(host, clock);
> }
>
> -static void sdhci_am654_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_am654_write_b(struct sdhci_host *host, u8 val, int reg)
> {
> unsigned char timing = host->mmc->ios.timing;
> @@ -274,7 +263,7 @@ static struct sdhci_ops sdhci_am654_ops = {
> .get_timeout_clock = sdhci_pltfm_clk_get_max_clock,
> .set_uhs_signaling = sdhci_set_uhs_signaling,
> .set_bus_width = sdhci_set_bus_width,
> - .set_power = sdhci_am654_set_power,
> + .set_power = sdhci_set_power_and_bus_voltage,
> .set_clock = sdhci_am654_set_clock,
> .write_b = sdhci_am654_write_b,
> .irq = sdhci_am654_cqhci_irq,
> @@ -297,7 +286,7 @@ static struct sdhci_ops sdhci_j721e_8bit_ops = {
> .get_timeout_clock = sdhci_pltfm_clk_get_max_clock,
> .set_uhs_signaling = sdhci_set_uhs_signaling,
> .set_bus_width = sdhci_set_bus_width,
> - .set_power = sdhci_am654_set_power,
> + .set_power = sdhci_set_power_and_bus_voltage,
> .set_clock = sdhci_am654_set_clock,
> .write_b = sdhci_am654_write_b,
> .irq = sdhci_am654_cqhci_irq,
> @@ -320,7 +309,7 @@ static struct sdhci_ops sdhci_j721e_4bit_ops = {
> .get_timeout_clock = sdhci_pltfm_clk_get_max_clock,
> .set_uhs_signaling = sdhci_set_uhs_signaling,
> .set_bus_width = sdhci_set_bus_width,
> - .set_power = sdhci_am654_set_power,
> + .set_power = sdhci_set_power_and_bus_voltage,
> .set_clock = sdhci_j721e_4bit_set_clock,
> .write_b = sdhci_am654_write_b,
> .irq = sdhci_am654_cqhci_irq,
>
Powered by blists - more mailing lists