mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
disp: msm: dp: skip aux switch configuration
If redriver is the aux switch instead of fsa4480, skip configuring aux switch. Change-Id: I28edfec3833f21511a0e4589cbcf871a8c5628da Signed-off-by: Boyuan Yan <boyuyan@qti.qualcomm.com>
This commit is contained in:
parent
452e643352
commit
28bea7e8fc
2 changed files with 17 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue