示例#1
0
int
lcd_activate(struct device *self, int act)
{
	struct pxa2x0_lcd_softc *sc = (struct pxa2x0_lcd_softc *)self;

	switch (act) {
	case DVACT_SUSPEND:
		lcd_set_brightness(0);
		pxa2x0_lcd_suspend(sc);
		break;
	case DVACT_RESUME:
		pxa2x0_lcd_resume(sc);
		lcd_set_brightness(lcd_get_brightness());
		break;
	}
	return 0;
}
示例#2
0
int
lcd_activate(struct device *self, int act)
{
	struct pxa2x0_lcd_softc *sc = (struct pxa2x0_lcd_softc *)self;
	int ret = 0;

	switch (act) {
	case DVACT_SUSPEND:
		lcd_set_brightness(0);
		pxa2x0_lcd_suspend(sc);
		break;
	case DVACT_RESUME:
		pxa2x0_lcd_resume(sc);
		lcd_set_brightness(lcd_get_brightness());
		break;
	default:
		ret = config_activate_children(self, act);
		break;
	}
	return (ret);
}