From: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> To: linux-mmc@vger.kernel.org Cc: ulf.hansson@linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Vaibhav Hiremath <vaibhav.hiremath@linaro.org>, Kevin Liu <kliu5@marvell.com> Subject: [RFC 1/3] mmc: sdhci: pass signal_voltage as an argument to voltage_switch callback Date: Wed, 2 Sep 2015 01:02:16 +0530 [thread overview] Message-ID: <1441135938-8056-2-git-send-email-vaibhav.hiremath@linaro.org> (raw) In-Reply-To: <1441135938-8056-1-git-send-email-vaibhav.hiremath@linaro.org> In order to do particular voltage specific configuration in sdhci_ops->voltage_switch() callback function, we need to pass respective voltage value as well. So this patch adds an extra argument for signal voltage to the callback function. Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by: Kevin Liu <kliu5@marvell.com> --- drivers/mmc/host/sdhci.c | 2 +- drivers/mmc/host/sdhci.h | 2 +- drivers/mmc/host/sdhci_f_sdh30.c | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 1dbe932..3dd295f 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1782,7 +1782,7 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host, /* Some controller need to do more when switching */ if (host->ops->voltage_switch) - host->ops->voltage_switch(host); + host->ops->voltage_switch(host, MMC_SIGNAL_VOLTAGE_180); /* 1.8V regulator output should be stable within 5 ms */ ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 5521d29..9b0e2a8 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -537,7 +537,7 @@ struct sdhci_ops { void (*adma_workaround)(struct sdhci_host *host, u32 intmask); void (*platform_init)(struct sdhci_host *host); void (*card_event)(struct sdhci_host *host); - void (*voltage_switch)(struct sdhci_host *host); + void (*voltage_switch)(struct sdhci_host *host, u8 signal_voltage); int (*select_drive_strength)(struct sdhci_host *host, struct mmc_card *card, unsigned int max_dtr, int host_drv, diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c index 983b8b3..7ab1c20 100644 --- a/drivers/mmc/host/sdhci_f_sdh30.c +++ b/drivers/mmc/host/sdhci_f_sdh30.c @@ -49,7 +49,8 @@ struct f_sdhost_priv { struct device *dev; }; -static void sdhci_f_sdh30_soft_voltage_switch(struct sdhci_host *host) +static void sdhci_f_sdh30_soft_voltage_switch(struct sdhci_host *host, + u8 signal_voltage) { struct f_sdhost_priv *priv = sdhci_priv(host); u32 ctrl = 0; -- 1.9.1
WARNING: multiple messages have this Message-ID (diff)
From: vaibhav.hiremath@linaro.org (Vaibhav Hiremath) To: linux-arm-kernel@lists.infradead.org Subject: [RFC 1/3] mmc: sdhci: pass signal_voltage as an argument to voltage_switch callback Date: Wed, 2 Sep 2015 01:02:16 +0530 [thread overview] Message-ID: <1441135938-8056-2-git-send-email-vaibhav.hiremath@linaro.org> (raw) In-Reply-To: <1441135938-8056-1-git-send-email-vaibhav.hiremath@linaro.org> In order to do particular voltage specific configuration in sdhci_ops->voltage_switch() callback function, we need to pass respective voltage value as well. So this patch adds an extra argument for signal voltage to the callback function. Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by: Kevin Liu <kliu5@marvell.com> --- drivers/mmc/host/sdhci.c | 2 +- drivers/mmc/host/sdhci.h | 2 +- drivers/mmc/host/sdhci_f_sdh30.c | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 1dbe932..3dd295f 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1782,7 +1782,7 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host, /* Some controller need to do more when switching */ if (host->ops->voltage_switch) - host->ops->voltage_switch(host); + host->ops->voltage_switch(host, MMC_SIGNAL_VOLTAGE_180); /* 1.8V regulator output should be stable within 5 ms */ ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 5521d29..9b0e2a8 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -537,7 +537,7 @@ struct sdhci_ops { void (*adma_workaround)(struct sdhci_host *host, u32 intmask); void (*platform_init)(struct sdhci_host *host); void (*card_event)(struct sdhci_host *host); - void (*voltage_switch)(struct sdhci_host *host); + void (*voltage_switch)(struct sdhci_host *host, u8 signal_voltage); int (*select_drive_strength)(struct sdhci_host *host, struct mmc_card *card, unsigned int max_dtr, int host_drv, diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c index 983b8b3..7ab1c20 100644 --- a/drivers/mmc/host/sdhci_f_sdh30.c +++ b/drivers/mmc/host/sdhci_f_sdh30.c @@ -49,7 +49,8 @@ struct f_sdhost_priv { struct device *dev; }; -static void sdhci_f_sdh30_soft_voltage_switch(struct sdhci_host *host) +static void sdhci_f_sdh30_soft_voltage_switch(struct sdhci_host *host, + u8 signal_voltage) { struct f_sdhost_priv *priv = sdhci_priv(host); u32 ctrl = 0; -- 1.9.1
next prev parent reply other threads:[~2015-09-01 19:35 UTC|newest] Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-09-01 19:32 [RFC 0/3] mmc: sdhci: pass signal voltage as an argument to ->voltage_switch() Vaibhav Hiremath 2015-09-01 19:32 ` Vaibhav Hiremath 2015-09-01 19:32 ` Vaibhav Hiremath [this message] 2015-09-01 19:32 ` [RFC 1/3] mmc: sdhci: pass signal_voltage as an argument to voltage_switch callback Vaibhav Hiremath 2015-09-01 19:32 ` [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages Vaibhav Hiremath 2015-09-01 19:32 ` Vaibhav Hiremath 2015-09-02 7:04 ` Jisheng Zhang 2015-09-02 7:04 ` Jisheng Zhang 2015-09-02 7:04 ` Jisheng Zhang 2015-09-02 8:19 ` Vaibhav Hiremath 2015-09-02 8:19 ` Vaibhav Hiremath 2015-09-02 8:26 ` Jisheng Zhang 2015-09-02 8:26 ` Jisheng Zhang 2015-09-02 8:26 ` Jisheng Zhang 2015-09-02 11:43 ` Vaibhav Hiremath 2015-09-02 11:43 ` Vaibhav Hiremath 2015-09-14 9:30 ` Ulf Hansson 2015-09-14 9:30 ` Ulf Hansson 2015-09-14 9:30 ` Ulf Hansson 2015-09-14 9:42 ` Vaibhav Hiremath 2015-09-14 9:42 ` Vaibhav Hiremath 2015-09-14 9:42 ` Vaibhav Hiremath 2015-09-14 10:34 ` Ulf Hansson 2015-09-14 10:34 ` Ulf Hansson 2015-09-14 10:34 ` Ulf Hansson 2015-09-14 12:41 ` Vaibhav Hiremath 2015-09-14 12:41 ` Vaibhav Hiremath 2015-09-14 12:41 ` Vaibhav Hiremath 2015-09-14 12:47 ` Vaibhav Hiremath 2015-09-14 12:47 ` Vaibhav Hiremath 2015-09-14 12:47 ` Vaibhav Hiremath 2015-10-02 10:00 ` Linus Walleij 2015-10-02 10:00 ` Linus Walleij 2015-10-02 10:00 ` Linus Walleij 2015-09-01 19:32 ` [RFC 3/3] mmc: sdhci-pxav3: Add ->voltage_switch callback support Vaibhav Hiremath 2015-09-01 19:32 ` Vaibhav Hiremath 2015-09-02 13:51 ` Shawn Lin 2015-09-02 14:32 ` Vaibhav Hiremath 2015-09-02 14:32 ` Vaibhav Hiremath 2015-09-03 18:35 ` Vaibhav Hiremath 2015-09-03 18:35 ` Vaibhav Hiremath
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=1441135938-8056-2-git-send-email-vaibhav.hiremath@linaro.org \ --to=vaibhav.hiremath@linaro.org \ --cc=kliu5@marvell.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mmc@vger.kernel.org \ --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.