diff options
author | Matt Hsu <matt_hsu@openmoko.org> | 2009-02-26 12:53:20 +0000 |
---|---|---|
committer | Andy Green <agreen@octopus.localdomain> | 2009-02-26 12:53:20 +0000 |
commit | b33f0a20da8bc5816d6d2e92aca7d417e1ebf782 (patch) | |
tree | 11ae7bb73fce6de0f653b2f1965c2d95f81c1a54 /arch | |
parent | d6c1cb120658f5e50c6ee676202fce5275ec54c5 (diff) |
Fix the current leaking issue on gta03 a3 or later version.
Since GPI0, GPI1 and GPI8 are for hardware version control.
They would create current leaking if they are setup as output.
It's resloved by adding gta03 specific fb_gpio_setup function
in fb platform data.
Signed-off-by: Matt Hsu <matt_hsu@openmoko.org>
Reported-by: Dkay Chen <dkay_chen@openmoko.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-s3c6410/mach-om-gta03.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/arch/arm/mach-s3c6410/mach-om-gta03.c b/arch/arm/mach-s3c6410/mach-om-gta03.c index d9677aa0fc7..4f90239c646 100644 --- a/arch/arm/mach-s3c6410/mach-om-gta03.c +++ b/arch/arm/mach-s3c6410/mach-om-gta03.c @@ -449,8 +449,29 @@ static struct s3c_fb_pd_win om_gta03_fb_win0 = { .default_bpp = 16, }; +static void om_gta03_fb_gpio_setup(void) +{ + unsigned int gpio; + + /* GPI0, GPI1, GPI8 are for hardware version contrl. + * They should be set as input in order to prevent + * current leaking + */ + for (gpio = S3C64XX_GPI(2); gpio <= S3C64XX_GPI(15); gpio++) { + if (gpio != S3C64XX_GPI(8)) { + s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); + s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); + } + } + + for (gpio = S3C64XX_GPJ(0); gpio <= S3C64XX_GPJ(11); gpio++) { + s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); + s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); + } +} + static struct s3c_fb_platdata om_gta03_lcd_pdata __initdata = { - .setup_gpio = s3c64xx_fb_gpio_setup_24bpp, + .setup_gpio = om_gta03_fb_gpio_setup, .win[0] = &om_gta03_fb_win0, .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, |