Esempio n. 1
0
static void himalaya_lcd_suspend( struct w100fb_par *wfb )
{
#if 0
	ati_gpios[0] = w100fb_gpio_read(W100_GPIO_PORT_A);
	ati_gpios[1] = w100fb_gpcntl_read(W100_GPIO_PORT_A);
	ati_gpios[2] = w100fb_gpio_read(W100_GPIO_PORT_B);
	ati_gpios[3] = w100fb_gpcntl_read(W100_GPIO_PORT_B);
	w100fb_gpio_write(W100_GPIO_PORT_A, 0xDFE00000 );
	w100fb_gpcntl_write(W100_GPIO_PORT_A, 0xFFFF0000 );
	w100fb_gpio_write(W100_GPIO_PORT_B, 0x00000000 );
	w100fb_gpcntl_write(W100_GPIO_PORT_B, 0xFFFFFFFF );
#endif
	lcd_hw_off();
}
Esempio n. 2
0
void __e740_lcd_set_power(int power)
{
	int gpio;
	gpio = w100fb_gpio_read(W100_GPIO_PORT_B);
	if(power)
        	gpio &= ~0xe;
	else
		gpio |= 0xe;
        w100fb_gpio_write(W100_GPIO_PORT_B, gpio);
}
Esempio n. 3
0
static void e800_tg_change(struct w100fb_par *par)
{
	unsigned long tmp;

	tmp = w100fb_gpio_read(W100_GPIO_PORT_A);
	if (par->mode->xres == 480)
		tmp |= 0x100;
	else
		tmp &= ~0x100;
	w100fb_gpio_write(W100_GPIO_PORT_A, tmp);
}
Esempio n. 4
0
static int e740_bl_update_status (struct backlight_device *bd)
{
	int intensity = bd->props.brightness;
	u32 gpio;

	if (bd->props.power != FB_BLANK_UNBLANK)
                intensity = 0;
        if (bd->props.fb_blank != FB_BLANK_UNBLANK)
                intensity = 0;

	current_brightness=intensity;

	gpio = w100fb_gpio_read(W100_GPIO_PORT_B);
	gpio &= ~0x31;
	if(intensity)
		gpio |= (((intensity-1) & 0x3) << 4) | 1;
	w100fb_gpio_write(W100_GPIO_PORT_B, gpio);

        return 0;
}