Re: [PATCH V4 5/5] ARM: EXYNOS4: Add platform data for EXYNOS4 FIMD
flat view
From: K, Mythri P <hidden>
Date: 2011-06-23 09:04:04
Also in:
linux-samsung-soc
2011/6/22 JinGoo Han [off-list ref]:
From: Jonghun Han <redacted> This patch adds support EXYNOS4 FIMD0 and LTE480WV LCD pannel. Signed-off-by: Jonghun Han <redacted> Signed-off-by: Jingoo Han <redacted> --- arch/arm/mach-exynos4/mach-smdkc210.c | 114 +++++++++++++++++++++++++++++++++ arch/arm/mach-exynos4/mach-smdkv310.c | 114 +++++++++++++++++++++++++++++++++ 2 files changed, 228 insertions(+), 0 deletions(-)
<<snip>>
quoted hunk ↗ jump to hunk
+static void lcd_lte480wv_set_power(struct plat_lcd_data *pd, + unsigned int power) +{ + if (power) { +#if !defined(CONFIG_BACKLIGHT_PWM) + gpio_request(EXYNOS4_GPD0(1), "GPD0"); + gpio_direction_output(EXYNOS4_GPD0(1), 1); + gpio_free(EXYNOS4_GPD0(1)); +#endif + /* fire nRESET on power up */ + gpio_request(EXYNOS4_GPX0(6), "GPX0"); + + gpio_direction_output(EXYNOS4_GPX0(6), 1); + mdelay(100); + + gpio_set_value(EXYNOS4_GPX0(6), 0); + mdelay(10); + + gpio_set_value(EXYNOS4_GPX0(6), 1); + mdelay(10); + + gpio_free(EXYNOS4_GPX0(6)); + } else { +#if !defined(CONFIG_BACKLIGHT_PWM) + gpio_request(EXYNOS4_GPD0(1), "GPD0"); + gpio_direction_output(EXYNOS4_GPD0(1), 0); + gpio_free(EXYNOS4_GPD0(1)); +#endif + } +} +
have you considered using gpio_request_one instead ? It simplifies the three step API. <<snip>>
quoted hunk ↗ jump to hunk
+ if (power) { +#if !defined(CONFIG_BACKLIGHT_PWM) + gpio_request(EXYNOS4_GPD0(1), "GPD0"); + gpio_direction_output(EXYNOS4_GPD0(1), 1); + gpio_free(EXYNOS4_GPD0(1)); +#endif + /* fire nRESET on power up */ + gpio_request(EXYNOS4_GPX0(6), "GPX0"); + + gpio_direction_output(EXYNOS4_GPX0(6), 1); + mdelay(100); + + gpio_set_value(EXYNOS4_GPX0(6), 0); + mdelay(10); + + gpio_set_value(EXYNOS4_GPX0(6), 1); + mdelay(10); + + gpio_free(EXYNOS4_GPX0(6)); + } else { +#if !defined(CONFIG_BACKLIGHT_PWM) + gpio_request(EXYNOS4_GPD0(1), "GPD0"); + gpio_direction_output(EXYNOS4_GPD0(1), 0); + gpio_free(EXYNOS4_GPD0(1)); +#endif + } +}
same comment as above. <<snip>> -- Thanks and regards, Mythri.