[PATCH 3/3] eukrea_cpuimx35: better handling of backlight
Eric Bénard
eric at eukrea.com
Thu Jun 24 05:49:57 EDT 2010
start with backlight disabled and enable it if the logo is
displayed.
Signed-off-by: Eric Bénard <eric at 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
More information about the barebox
mailing list