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:
Aravind Venkateswaran
2020-09-29 20:06:08 -07:00
committed by Sandeep Gangadharaiah
parent 135e318102
commit 78c45e9d5d
9 changed files with 67 additions and 107 deletions

View File

@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2022, Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
*/
@@ -132,23 +132,6 @@ static int dp_power_pinctrl_set(struct dp_power_private *power, bool active)
if (IS_ERR_OR_NULL(parser->pinctrl.pin))
return 0;
if (parser->no_aux_switch && parser->lphw_hpd) {
pin_state = active ? parser->pinctrl.state_hpd_ctrl
: parser->pinctrl.state_hpd_tlmm;
if (!IS_ERR_OR_NULL(pin_state)) {
rc = pinctrl_select_state(parser->pinctrl.pin,
pin_state);
if (rc) {
DP_ERR("cannot direct hpd line to %s\n",
active ? "ctrl" : "tlmm");
return rc;
}
}
}
if (parser->no_aux_switch)
return 0;
pin_state = active ? parser->pinctrl.state_active
: parser->pinctrl.state_suspend;
if (!IS_ERR_OR_NULL(pin_state)) {
@@ -557,9 +540,6 @@ static int dp_power_config_gpios(struct dp_power_private *power, bool flip,
struct dss_module_power *mp;
struct dss_gpio *config;
if (power->parser->no_aux_switch)
return 0;
mp = &power->parser->mp[DP_CORE_PM];
config = mp->gpio_config;