From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> To: adrian.hunter@intel.com, linux-kernel@vger.kernel.org Cc: phil@raspberrypi.com, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, f.fainelli@gmail.com, stefan.wahren@i2se.com, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Nicolas Saenz Julienne <nsaenzjulienne@suse.de>, Ulf Hansson <ulf.hansson@linaro.org> Subject: [PATCH v2 07/11] mmc: sdhci: am654: Use sdhci_set_power_and_voltage() Date: Fri, 6 Mar 2020 18:44:09 +0100 [thread overview] Message-ID: <20200306174413.20634-8-nsaenzjulienne@suse.de> (raw) In-Reply-To: <20200306174413.20634-1-nsaenzjulienne@suse.de> 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@suse.de> --- 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, -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> To: adrian.hunter@intel.com, linux-kernel@vger.kernel.org Cc: stefan.wahren@i2se.com, Ulf Hansson <ulf.hansson@linaro.org>, f.fainelli@gmail.com, linux-mmc@vger.kernel.org, Nicolas Saenz Julienne <nsaenzjulienne@suse.de>, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, phil@raspberrypi.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 07/11] mmc: sdhci: am654: Use sdhci_set_power_and_voltage() Date: Fri, 6 Mar 2020 18:44:09 +0100 [thread overview] Message-ID: <20200306174413.20634-8-nsaenzjulienne@suse.de> (raw) In-Reply-To: <20200306174413.20634-1-nsaenzjulienne@suse.de> 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@suse.de> --- 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, -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-03-06 17:44 UTC|newest] Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-03-06 17:44 [PATCH v2 00/11] Raspbery Pi 4 vmmc regulator support Nicolas Saenz Julienne 2020-03-06 17:44 ` Nicolas Saenz Julienne 2020-03-06 17:44 ` [PATCH v2 01/11] mmc: sdhci: Introduce sdhci_set_power_and_bus_voltage() Nicolas Saenz Julienne 2020-03-06 17:44 ` Nicolas Saenz Julienne 2020-03-09 7:21 ` Adrian Hunter 2020-03-09 7:21 ` Adrian Hunter 2020-03-06 17:44 ` [PATCH v2 02/11] mmc: sdhci: arasan: Use sdhci_set_power_and_voltage() Nicolas Saenz Julienne 2020-03-06 17:44 ` Nicolas Saenz Julienne 2020-03-09 7:22 ` Adrian Hunter 2020-03-09 7:22 ` Adrian Hunter 2020-03-06 17:44 ` [PATCH v2 03/11] mmc: sdhci: milbeaut: " Nicolas Saenz Julienne 2020-03-06 17:44 ` Nicolas Saenz Julienne 2020-03-09 7:25 ` Adrian Hunter 2020-03-09 7:25 ` Adrian Hunter 2020-03-06 17:44 ` [PATCH v2 04/11] mmc: sdhci: at91: " Nicolas Saenz Julienne 2020-03-06 17:44 ` Nicolas Saenz Julienne 2020-03-09 7:25 ` Adrian Hunter 2020-03-09 7:25 ` Adrian Hunter 2020-03-06 17:44 ` [PATCH v2 05/11] mmc: sdhci: pxav3: " Nicolas Saenz Julienne 2020-03-06 17:44 ` Nicolas Saenz Julienne 2020-03-09 7:20 ` Adrian Hunter 2020-03-09 7:20 ` Adrian Hunter 2020-03-06 17:44 ` [PATCH v2 06/11] mmc: sdhci: xenon: " Nicolas Saenz Julienne 2020-03-06 17:44 ` Nicolas Saenz Julienne 2020-03-09 7:20 ` Adrian Hunter 2020-03-09 7:20 ` Adrian Hunter 2020-03-09 10:53 ` Nicolas Saenz Julienne 2020-03-09 10:53 ` Nicolas Saenz Julienne 2020-03-09 11:55 ` Adrian Hunter 2020-03-09 11:55 ` Adrian Hunter 2020-03-09 11:56 ` Adrian Hunter 2020-03-09 11:56 ` Adrian Hunter 2020-03-06 17:44 ` Nicolas Saenz Julienne [this message] 2020-03-06 17:44 ` [PATCH v2 07/11] mmc: sdhci: am654: " Nicolas Saenz Julienne 2020-03-09 7:27 ` Adrian Hunter 2020-03-09 7:27 ` Adrian Hunter 2020-03-06 17:44 ` [PATCH v2 08/11] mmc: sdhci: Unexport sdhci_set_power_noreg() Nicolas Saenz Julienne 2020-03-06 17:44 ` Nicolas Saenz Julienne 2020-03-06 17:44 ` [PATCH v2 09/11] mmc: sdhci: iproc: Add custom set_power() callback for bcm2711 Nicolas Saenz Julienne 2020-03-06 17:44 ` Nicolas Saenz Julienne 2020-03-09 7:29 ` Adrian Hunter 2020-03-09 7:29 ` Adrian Hunter 2020-03-06 17:44 ` [PATCH v2 10/11] ARM: dts: bcm2711: Update expgpio's GPIO labels Nicolas Saenz Julienne 2020-03-06 17:44 ` Nicolas Saenz Julienne 2020-03-27 11:21 ` Nicolas Saenz Julienne 2020-03-27 11:21 ` Nicolas Saenz Julienne 2020-03-06 17:44 ` [PATCH v2 11/11] ARM: dts: bcm2711: Add vmmc regulator in emmc2 Nicolas Saenz Julienne 2020-03-06 17:44 ` Nicolas Saenz Julienne 2020-03-09 20:00 ` Stefan Wahren 2020-03-09 20:00 ` Stefan Wahren 2020-03-09 20:01 ` Nicolas Saenz Julienne 2020-03-09 20:01 ` Nicolas Saenz Julienne 2020-03-27 11:22 ` Nicolas Saenz Julienne 2020-03-27 11:22 ` Nicolas Saenz Julienne 2020-03-12 13:08 ` [PATCH v2 00/11] Raspbery Pi 4 vmmc regulator support Ulf Hansson 2020-03-12 13:08 ` Ulf Hansson 2020-03-12 13:13 ` Nicolas Saenz Julienne 2020-03-12 13:13 ` Nicolas Saenz Julienne 2020-03-12 14:06 ` Ulf Hansson 2020-03-12 14:06 ` Ulf Hansson
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200306174413.20634-8-nsaenzjulienne@suse.de \ --to=nsaenzjulienne@suse.de \ --cc=adrian.hunter@intel.com \ --cc=bcm-kernel-feedback-list@broadcom.com \ --cc=f.fainelli@gmail.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mmc@vger.kernel.org \ --cc=linux-rpi-kernel@lists.infradead.org \ --cc=phil@raspberrypi.com \ --cc=stefan.wahren@i2se.com \ --cc=ulf.hansson@linaro.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.