From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 3/3] omap3: beaglexm: fix power on of DVI
Date: Tue, 11 Jan 2011 16:15:09 -0800 [thread overview]
Message-ID: <20110112001509.GA4957@atomide.com> (raw)
In-Reply-To: <4D2CEDD7.4020507@ti.com>
* Nishanth Menon <nm@ti.com> [110111 15:54]:
> Tony Lindgren had written, on 01/11/2011 05:23 PM, the following:
> [..]
> >>-
> >>- gpio_request(gpio + 1, "EHCI_nOC");
> >>- gpio_direction_input(gpio + 1);
> >>+ if (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XM) {
> >>+ gpio_request(gpio + 1, "EHCI_nOC");
> >>+ gpio_direction_input(gpio + 1);
> >>+ }
> >
> >The return value for gpio_request must be checked.
> Ack.
> we can go down two paths:
> a) I can redo this patch as in v6.patch (attached)
Yes let's do that, one comment below though..
> OR
> b) we take this patch and do another one cleaning the function up -
> gpio-check.patch
That can be done later.
> + if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
> + r = gpio_request(gpio + 1, "nDVI_PWR_EN");
> + if (!r) {
> + r = gpio_direction_output(gpio + 1, 0);
> + if (r)
> + gpio_free(gpio + 1);
> + }
> + if (r)
> + pr_err("%s: unable to configure nDVI_PWR_EN\n",
> + __func__);
> + r = gpio_request(gpio + 2, "DVI_LDO_EN");
> + if (!r) {
> + r = gpio_direction_output(gpio + 2, 1);
> + if (r)
> + gpio_free(gpio + 1);
> + }
> + if (r)
> + pr_err("%s: unable to configure DVI_LDO_EN\n",
> + __func__);
> + }
> +
Should the second gpio_free be gpio + 2 instead of gpio + 1?
Tony
next prev parent reply other threads:[~2011-01-12 0:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <[PATCH v4 0/3] OMAP3: beaglexm: GPIO fixes>
2011-01-11 17:13 ` [PATCH v5 0/3] OMAP3: beaglexm: GPIO fixes Nishanth Menon
2011-01-11 17:13 ` [PATCH v5 1/3] omap3: beaglexm: fix EHCI power up GPIO dir Nishanth Menon
2011-01-11 17:13 ` [PATCH v5 2/3] omap3: beaglexm: fix DVI reset GPIO Nishanth Menon
2011-01-11 17:13 ` [PATCH v5 3/3] omap3: beaglexm: fix power on of DVI Nishanth Menon
2011-01-11 23:23 ` Tony Lindgren
2011-01-11 23:55 ` Nishanth Menon
2011-01-12 0:15 ` Tony Lindgren [this message]
2011-01-12 0:17 ` Nishanth Menon
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=20110112001509.GA4957@atomide.com \
--to=tony@atomide.com \
--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).