All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Chemparathy <cyril-l0cyMroinI0@public.gmane.org>
To: Victor Rodriguez <vm.rod25-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org"
	<davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org>,
	"alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org"
	<alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org>
Subject: Re: [PATCH v4 7/9] davinci: MMC/SD support for Omapl138-Hawkboar
Date: Tue, 19 Oct 2010 07:02:55 -0400	[thread overview]
Message-ID: <4CBD7ADF.8020405@ti.com> (raw)
In-Reply-To: <AANLkTint2jQ3NpNWk09Y+Tm-mqAaUHpteZ+wrRA_3CDA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Hi Victor,

[...]
> Yes you are right and as I understand gpio_request will give a 0 if it
> success and because of that the warning never will appear, if there is
> a problem there will be a -1 and the warning will be printed. I could
> fix this with a return that breaks the code like this
> 
>        ret = gpio_request(DA850_HAWK_MMCSD_CD_PIN, "MMC CD\n");
>        if (ret) {
>                pr_warning("%s: can not open GPIO %d\n",
>                        __func__, DA850_HAWK_MMCSD_CD_PIN);
>                return;
>        }
>        gpio_direction_input(DA850_HAWK_MMCSD_CD_PIN);

I think gpio_request_one() is simpler.  This requests the gpio and sets
it up:

	ret = gpio_request_one(DA850_HAWK_MMCSD_CD_PIN,
			       GPIOF_DIR_IN, "MMC CD");
	if (ret < 0) {
		... failed ...
	}

Regards
Cyril.

  parent reply	other threads:[~2010-10-19 11:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-15  3:08 [PATCH v4 0/9] Add Omapl138-Hawkboard support vm.rod25
     [not found] ` <1287112105-11968-1-git-send-email-vm.rod25-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-10-15  3:08   ` [PATCH v4 1/9] davinci: EMAC support for Omapl138-Hawkboard vm.rod25-Re5JQEeQqe8AvxtiuMwx3w
     [not found]     ` <1287112105-11968-2-git-send-email-vm.rod25-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-10-15 16:14       ` Sergei Shtylyov
2010-10-15  3:08   ` [PATCH v4 4/9] davinci: McASP configuration " vm.rod25-Re5JQEeQqe8AvxtiuMwx3w
2010-10-15  3:08 ` [PATCH v4 2/9] davinci: EDMA support " vm.rod25
2010-10-15  3:08 ` [PATCH v4 3/9] davinci: ASoC " vm.rod25
2010-10-15  3:08 ` [PATCH v4 5/9] davinci: Audio " vm.rod25
2010-10-15  3:08 ` [PATCH v4 6/9] davinci: MMC/SD and USB-OHCI configuration " vm.rod25
2010-10-15  3:08 ` [PATCH v4 7/9] davinci: MMC/SD support for Omapl138-Hawkboar vm.rod25
     [not found]   ` <1287112105-11968-8-git-send-email-vm.rod25-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-10-15 16:25     ` Sergei Shtylyov
2010-10-18 16:00       ` Victor Rodriguez
     [not found]         ` <AANLkTin-DH9eU9wSPLROVBbMj=gfxjRH=Jz=b4yUuHfi-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-10-19  1:16           ` Jon Povey
2010-10-19  1:50             ` Victor Rodriguez
     [not found]               ` <AANLkTint2jQ3NpNWk09Y+Tm-mqAaUHpteZ+wrRA_3CDA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-10-19  1:54                 ` Jon Povey
2010-10-19 11:02                 ` Cyril Chemparathy [this message]
2010-10-19 17:15                   ` Victor Rodriguez
2010-10-15  3:08 ` [PATCH v4 8/9] davinci: USB clocks for Omapl138-Hawkboard vm.rod25
     [not found]   ` <1287112105-11968-9-git-send-email-vm.rod25-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-10-15 16:27     ` Sergei Shtylyov
2010-10-18 23:56       ` Victor Rodriguez
2010-10-15  3:08 ` [PATCH v4 9/9] davinci: USB1.1 support " vm.rod25
     [not found]   ` <1287112105-11968-10-git-send-email-vm.rod25-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-10-15 16:32     ` Sergei Shtylyov
2010-10-18 14:59       ` Victor Rodriguez

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=4CBD7ADF.8020405@ti.com \
    --to=cyril-l0cymroini0@public.gmane.org \
    --cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
    --cc=davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org \
    --cc=vm.rod25-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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 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.