aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/board-mackerel.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-shmobile/board-mackerel.c')
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index 1a63c213e45d..49bc07482179 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -295,6 +295,18 @@ static struct fb_videomode mackerel_lcdc_modes[] = {
295 }, 295 },
296}; 296};
297 297
298static int mackerel_set_brightness(void *board_data, int brightness)
299{
300 gpio_set_value(GPIO_PORT31, brightness);
301
302 return 0;
303}
304
305static int mackerel_get_brightness(void *board_data)
306{
307 return gpio_get_value(GPIO_PORT31);
308}
309
298static struct sh_mobile_lcdc_info lcdc_info = { 310static struct sh_mobile_lcdc_info lcdc_info = {
299 .clock_source = LCDC_CLK_BUS, 311 .clock_source = LCDC_CLK_BUS,
300 .ch[0] = { 312 .ch[0] = {
@@ -307,6 +319,14 @@ static struct sh_mobile_lcdc_info lcdc_info = {
307 .flags = 0, 319 .flags = 0,
308 .lcd_size_cfg.width = 152, 320 .lcd_size_cfg.width = 152,
309 .lcd_size_cfg.height = 91, 321 .lcd_size_cfg.height = 91,
322 .board_cfg = {
323 .set_brightness = mackerel_set_brightness,
324 .get_brightness = mackerel_get_brightness,
325 },
326 .bl_info = {
327 .name = "sh_mobile_lcdc_bl",
328 .max_brightness = 1,
329 },
310 } 330 }
311}; 331};
312 332
@@ -901,7 +921,8 @@ static struct platform_device ceu_device = {
901 .num_resources = ARRAY_SIZE(ceu_resources), 921 .num_resources = ARRAY_SIZE(ceu_resources),
902 .resource = ceu_resources, 922 .resource = ceu_resources,
903 .dev = { 923 .dev = {
904 .platform_data = &sh_mobile_ceu_info, 924 .platform_data = &sh_mobile_ceu_info,
925 .coherent_dma_mask = 0xffffffff,
905 }, 926 },
906}; 927};
907 928
@@ -1059,7 +1080,7 @@ static void __init mackerel_init(void)
1059 gpio_request(GPIO_FN_LCDDCK, NULL); 1080 gpio_request(GPIO_FN_LCDDCK, NULL);
1060 1081
1061 gpio_request(GPIO_PORT31, NULL); /* backlight */ 1082 gpio_request(GPIO_PORT31, NULL); /* backlight */
1062 gpio_direction_output(GPIO_PORT31, 1); 1083 gpio_direction_output(GPIO_PORT31, 0); /* off by default */
1063 1084
1064 gpio_request(GPIO_PORT151, NULL); /* LCDDON */ 1085 gpio_request(GPIO_PORT151, NULL); /* LCDDON */
1065 gpio_direction_output(GPIO_PORT151, 1); 1086 gpio_direction_output(GPIO_PORT151, 1);