summaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorAlexandre Courbot <gnurou@gmail.com>2011-02-16 03:49:02 +0000
committerPaul Mundt <lethal@linux-sh.org>2011-03-10 20:32:55 +0900
commit0839d687f35b2f1a5e15fe5ee03bc4918457798d (patch)
tree8c9aafebdddb7801581e7333a58956111b933dbb /arch/sh
parent3b0fd9d75598584478d1d3f6551f8a8a9696c34e (diff)
downloadlinux-stable-0839d687f35b2f1a5e15fe5ee03bc4918457798d.tar.gz
linux-stable-0839d687f35b2f1a5e15fe5ee03bc4918457798d.tar.bz2
linux-stable-0839d687f35b2f1a5e15fe5ee03bc4918457798d.zip
sh: mach-ecovec24: support for main lcd backlight
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>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/boards/mach-ecovec24/setup.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
index 701667acfd89..a2c06220bbab 100644
--- a/arch/sh/boards/mach-ecovec24/setup.c
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -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,
},
}
};