linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: w.sang@pengutronix.de (Wolfram Sang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/5] mmc: sdhci-esdhc-imx: add support for write protect on custom GPIO
Date: Fri, 11 Feb 2011 10:42:48 +0100	[thread overview]
Message-ID: <20110211094248.GA2264@pengutronix.de> (raw)
In-Reply-To: <201102110924.38338.marc@cpdesign.com.au>

Marc,

On Fri, Feb 11, 2011 at 09:24:38AM +1100, Marc Reilly wrote:

> Tested-by: Marc Reilly <marc@cpdesign.com.au> 

Thanks a lot!

> > +	if (boarddata) {
> 
> Perhaps (boarddata && gpio_is_valid(boarddata->wp_gpio) as above?
> 
> For example what if someone sets up the boarddata for a card detect, but not 
> write protect.

Well, I couldn't do this here, because later the cd_pin-stuff will also
be added to the if-block. However, I see what you mean and that could
still be added before the gpio_request below. That would add another
level of indentation, though, for a case I'd consider to be more
theoretical (and definately not recommended). Maybe I will adjust the
warning message to be also understandable for the case a GPIO is preset
with an invalid number. I think the warning itself is justified.

> 
> > +		err = gpio_request_one(boarddata->wp_gpio, GPIOF_IN, "ESDHC_WP");
> > +		if (err) {
> > +			dev_warn(mmc_dev(host->mmc), "can't get wp_pin!\n");
> > +			boarddata->wp_gpio = err;
> > +		}
> > +	}

Regards,

   Wolfram

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

  reply	other threads:[~2011-02-11  9:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-10 19:14 [PATCH 0/5] sdhci-esdhc-imx: use gpio for write protection and card detection Wolfram Sang
2011-02-10 19:14 ` [PATCH 1/5] mmc: sdhci-esdhc-imx: add support for write protect on custom GPIO Wolfram Sang
2011-02-10 22:24   ` Marc Reilly
2011-02-11  9:42     ` Wolfram Sang [this message]
2011-02-10 19:14 ` [PATCH 2/5] mmc: sdhci-esdhc: broken card detection is not a default quirk Wolfram Sang
2011-02-10 19:18   ` Wolfram Sang
2011-02-11 10:07     ` Anton Vorontsov
2011-02-10 19:14 ` [PATCH 3/5] mmc: sdhci-esdhc-imx: add card detect on custom GPIO Wolfram Sang
2011-02-10 19:14 ` [PATCH 4/5] arm: mach-mx3: pcm043: add write-protect and card-detect for SD1 Wolfram Sang
2011-02-10 19:14 ` [PATCH 5/5] arm: mach-mx3: use IMX_GPIO_NR instead of hard-coded values Wolfram Sang
  -- strict thread matches above, loose matches on Subject: below --
2011-02-22 12:58 [PATCH V2 0/5] sdhci-esdhc-imx: use gpio for write protection and card detection Wolfram Sang
2011-02-22 12:58 ` [PATCH 1/5] mmc: sdhci-esdhc-imx: add support for write protect on custom GPIO Wolfram Sang
2011-02-23 13:51 [PATCH V3 0/5] sdhci-esdhc-imx: use gpio for write protection and card detection Wolfram Sang
2011-02-23 13:51 ` [PATCH 1/5] mmc: sdhci-esdhc-imx: add support for write protect on custom GPIO Wolfram Sang

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=20110211094248.GA2264@pengutronix.de \
    --to=w.sang@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.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: 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;
as well as URLs for NNTP newsgroup(s).