Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0839d687 authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Paul Mundt
Browse files

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: default avatarAlexandre Courbot <gnurou@gmail.com>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 3b0fd9d7
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -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,
		},
	}
};