summaryrefslogtreecommitdiff
path: root/drivers/video/exynos_fb.c
diff options
context:
space:
mode:
authorAjay Kumar <ajaykumar.rs@samsung.com>2013-02-21 23:52:57 +0000
committerMinkyu Kang <mk7.kang@samsung.com>2013-03-27 21:17:12 +0900
commit29fd57046e3c33c5d75eb2e7e6607cdf49e162ac (patch)
tree60cdc800b7d2af88aba01cbb838cfaae09734f10 /drivers/video/exynos_fb.c
parent7ee68fe85f1a9e9db17d9760998c284cb85f56fa (diff)
downloadu-boot-imx-29fd57046e3c33c5d75eb2e7e6607cdf49e162ac.zip
u-boot-imx-29fd57046e3c33c5d75eb2e7e6607cdf49e162ac.tar.gz
u-boot-imx-29fd57046e3c33c5d75eb2e7e6607cdf49e162ac.tar.bz2
video: exynos_fb: Remove callbacks from the driver
Replaced the functionality of callbacks by using a standard set of functions. Instead of implementing and hooking up a callback, put the same code in one of the standard set of functions by overriding it. This patch is tested only on SMDK5250. For Trats and universal_c210 board, it is only compile tested. Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'drivers/video/exynos_fb.c')
-rw-r--r--drivers/video/exynos_fb.c67
1 files changed, 51 insertions, 16 deletions
diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c
index ee0ed06..a2637df 100644
--- a/drivers/video/exynos_fb.c
+++ b/drivers/video/exynos_fb.c
@@ -93,37 +93,72 @@ static void draw_logo(void)
}
#endif
+void __exynos_cfg_lcd_gpio(void)
+{
+}
+void exynos_cfg_lcd_gpio(void)
+ __attribute__((weak, alias("__exynos_cfg_lcd_gpio")));
+
+void __exynos_backlight_on(unsigned int onoff)
+{
+}
+void exynos_backlight_on(unsigned int onoff)
+ __attribute__((weak, alias("__exynos_cfg_lcd_gpio")));
+
+void __exynos_reset_lcd(void)
+{
+}
+void exynos_reset_lcd(void)
+ __attribute__((weak, alias("__exynos_reset_lcd")));
+
+void __exynos_lcd_power_on(void)
+{
+}
+void exynos_lcd_power_on(void)
+ __attribute__((weak, alias("__exynos_lcd_power_on")));
+
+void __exynos_cfg_ldo(void)
+{
+}
+void exynos_cfg_ldo(void)
+ __attribute__((weak, alias("__exynos_cfg_ldo")));
+
+void __exynos_enable_ldo(unsigned int onoff)
+{
+}
+void exynos_enable_ldo(unsigned int onoff)
+ __attribute__((weak, alias("__exynos_enable_ldo")));
+
+void __exynos_backlight_reset(void)
+{
+}
+void exynos_backlight_reset(void)
+ __attribute__((weak, alias("__exynos_backlight_reset")));
+
static void lcd_panel_on(vidinfo_t *vid)
{
udelay(vid->init_delay);
- if (vid->backlight_reset)
- vid->backlight_reset();
+ exynos_backlight_reset();
- if (vid->cfg_gpio)
- vid->cfg_gpio();
+ exynos_cfg_lcd_gpio();
- if (vid->lcd_power_on)
- vid->lcd_power_on();
+ exynos_lcd_power_on();
udelay(vid->power_on_delay);
if (vid->dp_enabled)
exynos_init_dp();
- if (vid->reset_lcd) {
- vid->reset_lcd();
- udelay(vid->reset_delay);
- }
+ exynos_reset_lcd();
+
+ udelay(vid->reset_delay);
- if (vid->backlight_on)
- vid->backlight_on(1);
+ exynos_backlight_on(1);
- if (vid->cfg_ldo)
- vid->cfg_ldo();
+ exynos_cfg_ldo();
- if (vid->enable_ldo)
- vid->enable_ldo(1);
+ exynos_enable_ldo(1);
if (vid->mipi_enabled)
exynos_mipi_dsi_init();