public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <w.sang@pengutronix.de>
To: Olof Johansson <olof@lixom.net>
Cc: Chris Ball <cjb@laptop.org>,
	linux-mmc@vger.kernel.org, linux-tegra@vger.kernel.org,
	Yvonne Yip <y@palm.com>, Mike Rapoport <mike@compulab.co.il>
Subject: Re: [PATCH 3/3] mmc: add sdhci-tegra driver for Tegra SoCs
Date: Wed, 22 Dec 2010 17:22:31 +0100	[thread overview]
Message-ID: <20101222162231.GC30951@pengutronix.de> (raw)
In-Reply-To: <1293004871-1918-4-git-send-email-olof@lixom.net>

[-- Attachment #1: Type: text/plain, Size: 2538 bytes --]

Hi Olof,

looks good to me. Just some minor comments, but in general

Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>

On Wed, Dec 22, 2010 at 02:01:11AM -0600, Olof Johansson wrote:
> SDHCI driver for Tegra. Pretty straight forward, a few pieces of
> functionality left to fill in but nothing that stops it from going
> upstream. Board enablement submitted separately.

I'd think this can go below the "---" line?

...
> This driver plugs in as a new variant of sdhci-pltfm, using the platform
> data structure passed in to specify the GPIOs to use for card detect,
> write protect and card power enablement.
> 
> Original driver (of which only the header file is left):
> Signed-off-by: Yvonne Yip <y@palm.com>
> 
> The rest, which has been rewritten by now:
> Signed-off-by: Olof Johansson <olof@lixom.net>
> Cc: Wolfram Sang <w.sang@pengutronix.de>
> Cc: Mike Rapoport <mike@compulab.co.il>
> +static unsigned int tegra_sdhci_get_ro(struct sdhci_host *sdhci)
> +{
> +	struct platform_device *pdev = to_platform_device(mmc_dev(sdhci->mmc));
> +	struct tegra_sdhci_platform_data *plat;
> +
> +	plat = pdev->dev.platform_data;
> +
> +	if (gpio_is_valid(plat->wp_gpio))
> +		return gpio_get_value(plat->wp_gpio);
> +
> +	return -1;

So, read_only is the default case? I would have gone for returning 0.
Well, safety vs. convenience...

...
> +		if (rc) {
> +			dev_err(mmc_dev(host->mmc), 

Trailing white space

> +				"failed to allocate power gpio\n");
> +			goto out;
> +		}
> +		tegra_gpio_enable(plat->power_gpio);
> +		gpio_direction_output(plat->power_gpio, 1);
> +	}
> +
> +	if (gpio_is_valid(plat->cd_gpio)) {
> +		rc = gpio_request(plat->cd_gpio, "sdhci_cd");
> +		if (rc) {
> +			dev_err(mmc_dev(host->mmc), 

ditto

> +				"failed to allocate cd gpio\n");
> +			goto out_power;
> +		}
> +		tegra_gpio_enable(plat->cd_gpio);
> +
> +		rc = request_irq(gpio_to_irq(plat->cd_gpio), carddetect_irq,
> +				 IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
> +				 mmc_hostname(host->mmc), host);
> +
> +		if (rc)	{
> +			dev_err(mmc_dev(host->mmc), "request irq error\n");
> +			goto out_cd;
> +		}
> +
> +	}
> +
> +	if (gpio_is_valid(plat->wp_gpio)) {
> +		rc = gpio_request(plat->wp_gpio, "sdhci_wp");
> +		if (rc) {
> +			dev_err(mmc_dev(host->mmc), 

ditto

Kind regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2010-12-22 16:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-22  8:01 [PATCH 0/3 v2] Add SDHCI driver for Tegra Olof Johansson
2010-12-22  8:01 ` [PATCH 1/3] sdhci: add quirk for max len ADMA descriptors Olof Johansson
2010-12-22  8:01 ` [PATCH 2/3] sdhci: don't finish commands in flight Olof Johansson
2010-12-22  8:08   ` Chris Ball
2010-12-22  9:38     ` Olof Johansson
2010-12-22  8:01 ` [PATCH 3/3] mmc: add sdhci-tegra driver for Tegra SoCs Olof Johansson
2010-12-22 16:22   ` Wolfram Sang [this message]
2010-12-22 19:22     ` Olof Johansson
2010-12-23  6:20   ` Mike Rapoport
2010-12-23  8:59     ` Olof Johansson
2010-12-22  8:06 ` [PATCH 0/3 v2] Add SDHCI driver for Tegra Chris Ball
2010-12-22 16:05 ` Wolfram Sang
2010-12-22 20:48   ` Olof Johansson

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=20101222162231.GC30951@pengutronix.de \
    --to=w.sang@pengutronix.de \
    --cc=cjb@laptop.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mike@compulab.co.il \
    --cc=olof@lixom.net \
    --cc=y@palm.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