mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Eric Bénard" <eric@eukrea.com>
To: barebox@lists.infradead.org
Subject: [PATCH 3/3] eukrea_cpuimx35: better handling of backlight
Date: Thu, 24 Jun 2010 11:49:57 +0200	[thread overview]
Message-ID: <1277372997-6472-3-git-send-email-eric@eukrea.com> (raw)
In-Reply-To: <1277372997-6472-2-git-send-email-eric@eukrea.com>

start with backlight disabled and enable it if the logo is
displayed.

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 board/eukrea_cpuimx35/env/bin/init      |    2 ++
 board/eukrea_cpuimx35/eukrea_cpuimx35.c |   11 +++++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/board/eukrea_cpuimx35/env/bin/init b/board/eukrea_cpuimx35/env/bin/init
index 49e54c5..4610213 100644
--- a/board/eukrea_cpuimx35/env/bin/init
+++ b/board/eukrea_cpuimx35/env/bin/init
@@ -14,9 +14,11 @@ fi
 
 if [ -f /env/logo.bmp ]; then
 	bmp /env/logo.bmp
+	gpio_direction_output 1 1
 elif [ -f /env/logo.bmp.lzo ]; then
 	unlzo /env/logo.bmp.lzo /logo.bmp
 	bmp /logo.bmp
+	gpio_direction_output 1 1
 fi
 
 if [ -z $eth0.ethaddr ]; then
diff --git a/board/eukrea_cpuimx35/eukrea_cpuimx35.c b/board/eukrea_cpuimx35/eukrea_cpuimx35.c
index 7f1c782..f358f51 100644
--- a/board/eukrea_cpuimx35/eukrea_cpuimx35.c
+++ b/board/eukrea_cpuimx35/eukrea_cpuimx35.c
@@ -166,8 +166,10 @@ device_initcall(eukrea_cpuimx35_devices_init);
 
 static int eukrea_cpuimx35_enable_display(void)
 {
-	gpio_direction_output(1, 1);
-	gpio_direction_output(0, 0);
+	/* default : backlight OFF */
+	gpio_direction_output(1, 0);
+	gpio_direction_output(4, 1);
+
 	return 0;
 }
 
@@ -205,14 +207,19 @@ static struct pad_desc eukrea_cpuimx35_pads[] = {
 	MX35_PAD_TXD1__UART1_TXD_MUX,
 	MX35_PAD_RTS1__UART1_RTS,
 	MX35_PAD_CTS1__UART1_CTS,
+
+	MX35_PAD_CONTRAST__GPIO1_1,
+	MX35_PAD_D3_CLS__GPIO1_4,
 };
 
+
 static int eukrea_cpuimx35_console_init(void)
 {
 	mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx35_pads,
 		ARRAY_SIZE(eukrea_cpuimx35_pads));
 
 	register_device(&eukrea_cpuimx35_serial_device);
+
 	return 0;
 }
 
-- 
1.6.3.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2010-06-24  9:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-24  9:49 [PATCH 1/3] fix command loadb Eric Bénard
2010-06-24  9:49 ` [PATCH 2/3] unbreak imx-ipu-fb Eric Bénard
2010-06-24  9:49   ` Eric Bénard [this message]
2010-06-24 10:48     ` [PATCH 3/3] eukrea_cpuimx35: better handling of backlight Sascha Hauer
2010-06-24 11:48       ` Eric Bénard
2010-06-24 10:34   ` [PATCH 2/3] unbreak imx-ipu-fb Sascha Hauer
2010-06-24  9:53 ` [PATCH 1/3] fix command loadb Eric Bénard
2010-06-24 10:38   ` Sascha Hauer

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=1277372997-6472-3-git-send-email-eric@eukrea.com \
    --to=eric@eukrea.com \
    --cc=barebox@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