From d2a2a8046331d112010c3f8683d76dfca8e74d96 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Thu, 26 Jun 2014 00:28:31 +0200 Subject: gta04: Deferred backlight pin mux to achieve continuous boot splash Signed-off-by: Paul Kocialkowski --- arch/arm/mach-omap2/board-omap3gta04.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap3gta04.c b/arch/arm/mach-omap2/board-omap3gta04.c index 5f13b6f..0363766 100644 --- a/arch/arm/mach-omap2/board-omap3gta04.c +++ b/arch/arm/mach-omap2/board-omap3gta04.c @@ -124,6 +124,7 @@ #define CAMERA_PWDN_GPIO 165 /* CAM_WEN */ #define CAMERA_STROBE_GPIO 126 /* CAM_STROBE */ #define AUX_HEADSET_GPIO 55 +#define BACKLIGHT_GPIO 57 #define USB_PHY_RESET_GPIO 174 #define GPS_ON_OFF_GPIO 145 #define GPS_RX_GPIO 147 @@ -254,8 +255,24 @@ static struct mtd_partition gta04_nand_partitions[] = { }, }; +static int __init pwm_mux_init(void) +{ + // Make sure to set the backlight GPIO to 0 + + gpio_request(BACKLIGHT_GPIO, "backlight"); + gpio_direction_output(BACKLIGHT_GPIO, 0); + gpio_free(BACKLIGHT_GPIO); + + // Mux GPMC NCS6 to GPT11_PWM_EVT instead of GPIO_57 + + omap_mux_init_signal("gpmc_ncs6", OMAP_MUX_MODE3); + + return 0; +} + static struct omap_pwm_pdata pwm_pdata = { .timer_id = 11, + .mux_init = pwm_mux_init, }; static struct pwm_lookup board_pwm_lookup[] = { @@ -1442,9 +1459,6 @@ static struct omap_musb_board_data musb_board_data = { }; static struct omap_board_mux board_mux[] __initdata = { - /* Enable GPT11_PWM_EVT instead of GPIO-57 */ - OMAP3_MUX(GPMC_NCS6, OMAP_MUX_MODE3), - { .reg_offset = OMAP_MUX_TERMINATOR }, }; -- cgit v1.1