Skip to content

Commit

Permalink
sh: mach-ecovec24: support for main lcd backlight
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexandre Courbot authored and Paul Mundt committed Mar 10, 2011
1 parent 3b0fd9d commit 0839d68
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions arch/sh/boards/mach-ecovec24/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
},
}
};
Expand Down

0 comments on commit 0839d68

Please sign in to comment.