diff --git a/msm/dp/dp_aux.c b/msm/dp/dp_aux.c index 7c4fbc2fbb50..9f38c146f017 100644 --- a/msm/dp/dp_aux.c +++ b/msm/dp/dp_aux.c @@ -766,6 +766,7 @@ static void dp_aux_set_sim_mode(struct dp_aux *dp_aux, bool en, static int dp_aux_configure_aux_switch(struct dp_aux *dp_aux, bool enable, int orientation) { + const char *external_aux_switch = "redriver"; struct dp_aux_private *aux; int rc = 0; enum fsa_function event = FSA_USBC_DISPLAYPORT_DISCONNECTED; @@ -784,6 +785,10 @@ static int dp_aux_configure_aux_switch(struct dp_aux *dp_aux, goto end; } + if (strcmp(aux->aux_switch_node->name, + external_aux_switch) == 0) + goto end; + if (enable) { switch (orientation) { case ORIENTATION_CC1: diff --git a/msm/dp/dp_display.c b/msm/dp/dp_display.c index bcb6f8f57ff4..630767d4bb8d 100644 --- a/msm/dp/dp_display.c +++ b/msm/dp/dp_display.c @@ -1509,6 +1509,8 @@ static int dp_display_init_aux_switch(struct dp_display_private *dp) int rc = 0; struct notifier_block nb; const u32 max_retries = 50; + const char *external_aux_switch = "redriver"; + const char *phandle = "qcom,dp-aux-switch"; u32 retry; if (dp->aux_switch_ready) @@ -1516,6 +1518,16 @@ static int dp_display_init_aux_switch(struct dp_display_private *dp) SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY); + dp->aux_switch_node = of_parse_phandle(dp->pdev->dev.of_node, + phandle, 0); + if (!dp->aux_switch_node) { + DP_WARN("cannot parse %s handle\n", phandle); + rc = -ENODEV; + return rc; + } + if (strcmp(dp->aux_switch_node->name, + external_aux_switch) == 0) + return rc; nb.notifier_call = dp_display_fsa4480_callback; nb.priority = 0;