void lcd_attach(struct device *parent, struct device *self, void *aux) { struct pxa2x0_lcd_softc *sc = (struct pxa2x0_lcd_softc *)self; struct wsemuldisplaydev_attach_args aa; extern int glass_console; printf("\n"); pxa2x0_lcd_attach_sub(sc, aux, &lcd_bpp16_screen, CURRENT_DISPLAY, glass_console); aa.console = glass_console; aa.scrdata = &lcd_screen_list; aa.accessops = &lcd_accessops; aa.accesscookie = sc; aa.defaultscreens = 0; (void)config_found(self, &aa, wsemuldisplaydevprint); /* Start with approximately 40% of full brightness. */ lcd_set_brightness(3); (void)powerhook_establish(lcd_power, sc); }
void lcd_attach(device_t parent, device_t self, void *aux) { struct pxa2x0_lcd_softc *sc = device_private(self); struct pxaip_attach_args paa; struct obio_attach_args *oba = aux; sc->dev = self; paa.pxa_name = "obio"; paa.pxa_iot = oba->oba_iot; paa.pxa_addr = oba->oba_addr; paa.pxa_size = 0; /* XXX */ paa.pxa_intr = oba->oba_intr; #ifdef G4250_LCD_TOSHIBA_LTM035 # define PANEL toshiba_LTM035 #else # define PANEL nec_NL3224BC35 #endif pxa2x0_lcd_attach_sub(sc, &paa, &PANEL); #if NWSDISPLAY > 0 { struct wsemuldisplaydev_attach_args aa; /* make wsdisplay screen list */ pxa2x0_lcd_setup_wsscreen(&lcd_bpp16_screen, &PANEL, NULL); pxa2x0_lcd_setup_wsscreen(&lcd_bpp8_screen, &PANEL, NULL); pxa2x0_lcd_setup_wsscreen(&lcd_bpp4_screen, &PANEL, NULL); aa.console = 0; aa.scrdata = &lcd_screen_list; aa.accessops = &lcd_accessops; aa.accesscookie = sc; (void) config_found(self, &aa, wsemuldisplaydevprint); } #else { struct pxa2x0_lcd_screen *screen; int error; error = pxa2x0_lcd_new_screen( sc, 16, &screen ); if (error == 0) { sc->active = screen; pxa2x0_lcd_start_dma(sc, screen); } } #endif #undef PANEL }