]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
sh: mach-ecovec24: support for main lcd backlight
authorAlexandre Courbot <gnurou@gmail.com>
Wed, 16 Feb 2011 03:49:02 +0000 (03:49 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Thu, 10 Mar 2011 11:32:55 +0000 (20:32 +0900)
Add support for the main LCD backlight that is controlled through the
PTR1 GPIO.

Signed-off-by: Alexandre Courbot <gnurou@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/boards/mach-ecovec24/setup.c

index 701667acfd89e919f15202ef2161f445e15e0c93..a2c06220bbab3863ed4eb9bcd76a48d4c7e07300 100644 (file)
@@ -261,6 +261,18 @@ const static struct fb_videomode ecovec_dvi_modes[] = {
        },
 };
 
+static int ecovec24_set_brightness(void *board_data, int brightness)
+{
+       gpio_set_value(GPIO_PTR1, brightness);
+
+       return 0;
+}
+
+static int ecovec24_get_brightness(void *board_data)
+{
+       return gpio_get_value(GPIO_PTR1);
+}
+
 static struct sh_mobile_lcdc_info lcdc_info = {
        .ch[0] = {
                .interface_type = RGB18,
@@ -271,6 +283,12 @@ static struct sh_mobile_lcdc_info lcdc_info = {
                        .height = 91,
                },
                .board_cfg = {
+                       .set_brightness = ecovec24_set_brightness,
+                       .get_brightness = ecovec24_get_brightness,
+               },
+               .bl_info = {
+                       .name = "sh_mobile_lcdc_bl",
+                       .max_brightness = 1,
                },
        }
 };