disp: msm: dp: fix configuration of aux switches and HPD sources
Decouple the configuration and parsing of aux switches with the parsing and configuration of HPD sources. HPD notification can come from either GPIO based approach or a PD module through a SW interface. The presence of AUX switch on the board should have no bearing in deciding which configuration for HPD detection is used. Update the implementation to allow for flexibility in selecting any combination of the HPD source and aux switches. Change-Id: I96d558f1d88a359d523fae6dc746045393884d5a Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org> Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com> Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
This commit is contained in:

committed by
Sandeep Gangadharaiah

parent
135e318102
commit
78c45e9d5d
@@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2021-2022, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
@@ -205,23 +206,6 @@ static int dp_parser_pinctrl(struct dp_parser *parser)
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (parser->no_aux_switch && parser->lphw_hpd) {
|
||||
pinctrl->state_hpd_tlmm = pinctrl->state_hpd_ctrl = NULL;
|
||||
|
||||
pinctrl->state_hpd_tlmm = pinctrl_lookup_state(pinctrl->pin,
|
||||
"mdss_dp_hpd_tlmm");
|
||||
if (!IS_ERR_OR_NULL(pinctrl->state_hpd_tlmm)) {
|
||||
pinctrl->state_hpd_ctrl = pinctrl_lookup_state(
|
||||
pinctrl->pin, "mdss_dp_hpd_ctrl");
|
||||
}
|
||||
|
||||
if (!pinctrl->state_hpd_tlmm || !pinctrl->state_hpd_ctrl) {
|
||||
pinctrl->state_hpd_tlmm = NULL;
|
||||
pinctrl->state_hpd_ctrl = NULL;
|
||||
DP_DEBUG("tlmm or ctrl pinctrl state does not exist\n");
|
||||
}
|
||||
}
|
||||
|
||||
pinctrl->state_active = pinctrl_lookup_state(pinctrl->pin,
|
||||
"mdss_dp_active");
|
||||
if (IS_ERR_OR_NULL(pinctrl->state_active)) {
|
||||
@@ -253,13 +237,6 @@ static int dp_parser_gpio(struct dp_parser *parser)
|
||||
"qcom,usbplug-cc-gpio",
|
||||
};
|
||||
|
||||
if (of_find_property(of_node, "qcom,dp-hpd-gpio", NULL)) {
|
||||
parser->no_aux_switch = true;
|
||||
parser->lphw_hpd = of_find_property(of_node,
|
||||
"qcom,dp-low-power-hw-hpd", NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (of_find_property(of_node, "qcom,dp-gpio-aux-switch", NULL))
|
||||
parser->gpio_aux_switch = true;
|
||||
mp->gpio_config = devm_kzalloc(dev,
|
||||
|
Reference in New Issue
Block a user