int s3cfb_set_gpio(void) { int i, err; int val; val = readl(S5P64XX_SPC_BASE); val &= ~0x3; val |= (1 << 0); writel(val, S5P64XX_SPC_BASE); /* LCD_HSYNC, LCD_VSYNC, LCD_VDEN, LCD_VCLK, VD[23:0] */ for (i = 0; i < 16; i++) s3c_gpio_cfgpin(S5P64XX_GPI(i), S3C_GPIO_SFN(2)); for (i = 0; i < 12; i++) s3c_gpio_cfgpin(S5P64XX_GPJ(i), S3C_GPIO_SFN(2)); #ifndef CONFIG_BACKLIGHT_PWM /* backlight ON */ if (gpio_is_valid(S5P64XX_GPF(15))) { err = gpio_request(S5P64XX_GPF(15), "GPF"); if (err) { printk(KERN_ERR "failed to request GPD for " "lcd backlight control\n"); return err; } gpio_direction_output(S5P64XX_GPF(15), 1); } #endif /* module reset */ if (gpio_is_valid(S5P64XX_GPN(5))) { err = gpio_request(S5P64XX_GPN(5), "GPN"); if (err) { printk(KERN_ERR "failed to request GPH0 for " "lcd reset control\n"); return err; } gpio_direction_output(S5P64XX_GPN(5), 1); } mdelay(100); gpio_set_value(S5P64XX_GPN(5), 0); mdelay(10); gpio_set_value(S5P64XX_GPN(5), 1); mdelay(10); gpio_free(S5P64XX_GPN(5)); gpio_free(S5P64XX_GPF(15)); return 0; }
}, }, { .base = S5P64XX_GPI_BASE, .config = &gpio_2bit_cfg_noint, .config_slp = &gpio_cfg_slp, .chip = { .base = S5P64XX_GPI(0), .ngpio = S5P64XX_GPIO_I_NR, .label = "GPI", }, }, { .base = S5P64XX_GPJ_BASE, .config = &gpio_2bit_cfg_noint, .config_slp = &gpio_cfg_slp, .chip = { .base = S5P64XX_GPJ(0), .ngpio = S5P64XX_GPIO_J_NR, .label = "GPJ", }, }, { .base = S5P64XX_GPN_BASE, .config = &gpio_2bit_cfg_eint10, .config_slp = NULL, .chip = { .to_irq = s3c_gpn_to_irq, .base = S5P64XX_GPN(0), .ngpio = S5P64XX_GPIO_N_NR, .label = "GPN", }, }, { .base = S5P64XX_GPP_BASE,