All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
To: linux-omap@vger.kernel.org
Cc: charu@ti.com, Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
Subject: [PATCH v2 2/2] omap3: beaglexm: fix DVI initialization
Date: Tue,  8 Feb 2011 17:43:55 -0200	[thread overview]
Message-ID: <1297194235-7376-3-git-send-email-ricardo.salveti@canonical.com> (raw)
In-Reply-To: <1297194235-7376-1-git-send-email-ricardo.salveti@canonical.com>

Function beagle_twl_gpio_setup is called after beagle_display_init, what
lets reset_gpio with an invalid value at the time it request the gpio.
As a side effect the DVI reset GPIO is not properly set.

Also removing old code that powers down DVI in a hardcoded way, as it's
not necessary anymore.

Tested with Beagle-xM and C4.

Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
---
 arch/arm/mach-omap2/board-omap3beagle.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 685ac06..1a21002 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -52,6 +52,9 @@
 
 #define NAND_BLOCK_SIZE		SZ_128K
 
+#define BEAGLE_DVI_RESET_GPIO		170
+#define BEAGLE_XM_DVI_RESET_GPIO	129
+
 /*
  * OMAP3 Beagle revision
  * Run time detection of Beagle revision is done by reading GPIO.
@@ -248,6 +251,14 @@ static void __init beagle_display_init(void)
 {
 	int r;
 
+	/* DVI reset GPIO is different between beagle revisions */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
+		beagle_dvi_device.reset_gpio = BEAGLE_XM_DVI_RESET_GPIO;
+	else
+		beagle_dvi_device.reset_gpio = BEAGLE_DVI_RESET_GPIO;
+
+	omap_mux_init_gpio(beagle_dvi_device.reset_gpio, OMAP_PIN_OUTPUT);
+
 	r = gpio_request(beagle_dvi_device.reset_gpio, "DVI reset");
 	if (r < 0) {
 		printk(KERN_ERR "Unable to get DVI reset GPIO\n");
@@ -324,12 +335,6 @@ static int beagle_twl_gpio_setup(struct device *dev,
 	else
 		gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
 
-	/* DVI reset GPIO is different between beagle revisions */
-	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
-		beagle_dvi_device.reset_gpio = 129;
-	else
-		beagle_dvi_device.reset_gpio = 170;
-
 	/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
 	gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
 
@@ -620,11 +625,6 @@ static void __init omap3_beagle_init(void)
 			ARRAY_SIZE(omap3_beagle_devices));
 	omap_serial_init();
 
-	omap_mux_init_gpio(170, OMAP_PIN_INPUT);
-	gpio_request(170, "DVI_nPD");
-	/* REVISIT leave DVI powered down until it's needed ... */
-	gpio_direction_output(170, true);
-
 	usb_musb_init(&musb_board_data);
 	usb_ehci_init(&ehci_pdata);
 	omap3beagle_flash_init();
-- 
1.7.2.3


  parent reply	other threads:[~2011-02-08 19:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-08 19:43 [PATCH v2 0/2] beagle: making DVI output work again Ricardo Salveti de Araujo
2011-02-08 19:43 ` [PATCH v2 1/2] omap3: beagle: adding regulator supply for vdds_sdi Ricardo Salveti de Araujo
2011-02-08 19:43 ` Ricardo Salveti de Araujo [this message]
2011-02-09  0:07   ` [PATCH v2 2/2] omap3: beaglexm: fix DVI initialization Varadarajan, Charulatha
2011-02-09  6:53   ` G, Manjunath Kondaiah
2011-02-09 11:47     ` Ricardo Salveti de Araujo
2011-02-09 11:53       ` G, Manjunath Kondaiah

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=1297194235-7376-3-git-send-email-ricardo.salveti@canonical.com \
    --to=ricardo.salveti@canonical.com \
    --cc=charu@ti.com \
    --cc=linux-omap@vger.kernel.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.