static int s5p_dp_init_dp(struct s5p_dp_device *dp) { s5p_dp_reset(dp); /* SW defined function Normal operation */ s5p_dp_enable_sw_function(dp); if (!soc_is_exynos5250()) s5p_dp_config_interrupt(dp); s5p_dp_init_analog_func(dp); s5p_dp_init_hpd(dp); s5p_dp_init_aux(dp); return 0; }
static int s5p_dp_detect_hpd(struct s5p_dp_device *dp) { int timeout_loop = 0; s5p_dp_init_hpd(dp); udelay(200); while (s5p_dp_get_plug_in_status(dp) != 0) { timeout_loop++; if (DP_TIMEOUT_LOOP_COUNT < timeout_loop) { dev_err(dp->dev, "failed to get hpd plug status\n"); return -ETIMEDOUT; } udelay(10); } return 0; }