Beispiel #1
0
/**
 * Initialize panel module.
 */
static void panel_init(void)
{
	/* Set initial deferred value and signal to the current PCH signal. */
	backlight_deferred_value = gpio_get_level(GPIO_PCH_BKLTEN);
	set_backlight_value();

	update_backlight();

	gpio_enable_interrupt(GPIO_PCH_BKLTEN);

	/* The interrupt is enabled for the GPIO_PCH_EDP_VDD_EN in the
	 * chipset_haswell.c compilation unit. Initially set the value
	 * to whatever it current is reading. */
	lcdvcc_en_deferred_value = gpio_get_level(GPIO_PCH_EDP_VDD_EN);
	set_lcdvcc_en_value();
}
static void backlight_hscale_handler(GtkAdjustment *adj, void *data)
{
	int val = gtk_adjustment_get_value(adj);
	set_backlight_value(val);
}