diff options
-rw-r--r-- | arch/avr32/boards/atngw100/evklcd10x.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/arch/avr32/boards/atngw100/evklcd10x.c b/arch/avr32/boards/atngw100/evklcd10x.c index fbc7b03ef886..4e3ab8e08007 100644 --- a/arch/avr32/boards/atngw100/evklcd10x.c +++ b/arch/avr32/boards/atngw100/evklcd10x.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/linkage.h> | 13 | #include <linux/linkage.h> |
14 | #include <linux/gpio.h> | ||
14 | #include <linux/fb.h> | 15 | #include <linux/fb.h> |
15 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
16 | 17 | ||
@@ -19,6 +20,7 @@ | |||
19 | #include <asm/setup.h> | 20 | #include <asm/setup.h> |
20 | 21 | ||
21 | #include <mach/at32ap700x.h> | 22 | #include <mach/at32ap700x.h> |
23 | #include <mach/portmux.h> | ||
22 | #include <mach/board.h> | 24 | #include <mach/board.h> |
23 | 25 | ||
24 | static struct ac97c_platform_data __initdata ac97c0_data = { | 26 | static struct ac97c_platform_data __initdata ac97c0_data = { |
@@ -144,13 +146,29 @@ static struct atmel_lcdfb_info __initdata atevklcd10x_lcdc_data = { | |||
144 | }; | 146 | }; |
145 | #endif | 147 | #endif |
146 | 148 | ||
149 | static void atevklcd10x_lcdc_power_control(int on) | ||
150 | { | ||
151 | gpio_set_value(GPIO_PIN_PB(15), on); | ||
152 | } | ||
153 | |||
147 | static int __init atevklcd10x_init(void) | 154 | static int __init atevklcd10x_init(void) |
148 | { | 155 | { |
149 | at32_add_device_ac97c(0, &ac97c0_data); | 156 | /* PB15 is connected to the enable line on the boost regulator |
157 | * controlling the backlight for the LCD panel. | ||
158 | */ | ||
159 | at32_select_gpio(GPIO_PIN_PB(15), AT32_GPIOF_OUTPUT); | ||
160 | gpio_request(GPIO_PIN_PB(15), "backlight"); | ||
161 | gpio_direction_output(GPIO_PIN_PB(15), 0); | ||
162 | |||
163 | atevklcd10x_lcdc_data.atmel_lcdfb_power_control = | ||
164 | atevklcd10x_lcdc_power_control; | ||
150 | 165 | ||
151 | at32_add_device_lcdc(0, &atevklcd10x_lcdc_data, | 166 | at32_add_device_lcdc(0, &atevklcd10x_lcdc_data, |
152 | fbmem_start, fbmem_size, | 167 | fbmem_start, fbmem_size, |
153 | ATMEL_LCDC_ALT_18BIT | ATMEL_LCDC_PE_DVAL); | 168 | ATMEL_LCDC_ALT_18BIT | ATMEL_LCDC_PE_DVAL); |
169 | |||
170 | at32_add_device_ac97c(0, &ac97c0_data); | ||
171 | |||
154 | return 0; | 172 | return 0; |
155 | } | 173 | } |
156 | postcore_initcall(atevklcd10x_init); | 174 | postcore_initcall(atevklcd10x_init); |