Re: [PATCH V4 5/5] ARM: EXYNOS4: Add platform data for EXYNOS4 FIMD and LTE480WV platform-lcd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/6/22 JinGoo Han <jg1.han@xxxxxxxxxxx>:
> From: Jonghun Han <jonghun.han@xxxxxxxxxxx>
>
> This patch adds support EXYNOS4 FIMD0 and LTE480WV LCD pannel.
>
> Signed-off-by: Jonghun Han <jonghun.han@xxxxxxxxxxx>
> Signed-off-by: Jingoo Han <jg1.han@xxxxxxxxxxx>
> ---
>  arch/arm/mach-exynos4/mach-smdkc210.c |  114 +++++++++++++++++++++++++++++++++
>  arch/arm/mach-exynos4/mach-smdkv310.c |  114 +++++++++++++++++++++++++++++++++
>  2 files changed, 228 insertions(+), 0 deletions(-)
>
<<snip>>
> +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>>

> +       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.
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux