public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Yangbo Lu <yangbo.lu@nxp.com>,
	linux-mmc@vger.kernel.org, ulf.hansson@linaro.org,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>
Cc: devicetree@vger.kernel.org, Xiaobo Xie <xiaobo.xie@nxp.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/9] mmc: sdhci: add a callback for signal voltage switching
Date: Thu, 2 Mar 2017 16:19:27 +0200	[thread overview]
Message-ID: <bf18ad90-e622-1b9f-d6f7-0becbe57ea76@intel.com> (raw)
In-Reply-To: <1488448050-7574-3-git-send-email-yangbo.lu@nxp.com>

On 02/03/17 11:47, Yangbo Lu wrote:
> Add a callback for signal voltage switching to let host driver
> switch signal voltage in its own way.

That is not how we do things now.  Please just replace the host operation
instead e.g.

host->mmc_host_ops.start_signal_voltage_switch =
				esdhc_signal_voltage_switch;



> 
> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
> ---
>  drivers/mmc/host/sdhci.c | 6 ++++++
>  drivers/mmc/host/sdhci.h | 2 ++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 6fdd7a7..3c9a924 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -1852,6 +1852,12 @@ static int sdhci_start_signal_voltage_switch(struct mmc_host *mmc,
>  	if (host->version < SDHCI_SPEC_300)
>  		return 0;
>  
> +	if (host->ops->start_signal_voltage_switch) {
> +		ret = host->ops->start_signal_voltage_switch(
> +					host, ios->signal_voltage);
> +		return ret;
> +	}
> +
>  	ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2);
>  
>  	switch (ios->signal_voltage) {
> diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
> index edf3adf..04af687 100644
> --- a/drivers/mmc/host/sdhci.h
> +++ b/drivers/mmc/host/sdhci.h
> @@ -566,6 +566,8 @@ struct sdhci_ops {
>  					 struct mmc_card *card,
>  					 unsigned int max_dtr, int host_drv,
>  					 int card_drv, int *drv_type);
> +	int	(*start_signal_voltage_switch)(struct sdhci_host *host,
> +					       unsigned char signal_voltage);
>  };
>  
>  #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS
> 

  reply	other threads:[~2017-03-02 14:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-02  9:47 [PATCH 0/9] Add SD UHS-I and eMMC HS200 support for eSDHC Yangbo Lu
2017-03-02  9:47 ` [PATCH 1/9] mmc: sdhci-of-esdhc: add peripheral clock support Yangbo Lu
2017-03-02  9:47 ` [PATCH 2/9] mmc: sdhci: add a callback for signal voltage switching Yangbo Lu
2017-03-02 14:19   ` Adrian Hunter [this message]
2017-03-03  7:38     ` Y.B. Lu
2017-03-02  9:47 ` [PATCH 3/9] mmc: sdhci-of-esdhc: add support for signal voltage switch Yangbo Lu
2017-03-02  9:47 ` [PATCH 4/9] mmc: sdhci: add a callback for using tuning block Yangbo Lu
2017-03-02 14:25   ` Adrian Hunter
2017-03-03  7:39     ` Y.B. Lu
2017-03-02  9:47 ` [PATCH 5/9] mmc: sdhci-of-esdhc: add tuning block support Yangbo Lu
2017-03-02  9:47 ` [PATCH 6/9] mmc: sdhci: add a quirk to restore delay in tuning Yangbo Lu
2017-03-02  9:47 ` [PATCH 7/9] mmc: sdhci-of-esdhc: add delay between tuning cycles Yangbo Lu
2017-03-02  9:47 ` [PATCH 8/9] arm64: dts: ls1046a: add clocks property and compatible for eSDHC node Yangbo Lu
2017-03-02  9:47 ` [PATCH 9/9] arm64: dts: ls1046ardb: add MMC HS200/UHS-1 modes support Yangbo Lu

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=bf18ad90-e622-1b9f-d6f7-0becbe57ea76@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=will.deacon@arm.com \
    --cc=xiaobo.xie@nxp.com \
    --cc=yangbo.lu@nxp.com \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox