Revert "usb: typec: tcpm: Address incorrect values of tcpm psy for fixed supply"

This reverts commit c87bb48ac5 which is
commit f3dedafb8263ca4791a92a23f5230068f5bde008 in 5.4.119 as it breaks
the kernel abi.

If it needs to come back, it needs to be done in an abi-preserving way.

Bug: 161946584
Cc: Badhri Jagan Sridharan <badhri@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I8e6087067096b210af2521d22203bc0020d8d52b
This commit is contained in:
Greg Kroah-Hartman 2021-05-14 14:33:02 +02:00
parent e5ba487848
commit 5d03fd8082

View File

@ -285,10 +285,7 @@ struct tcpm_port {
unsigned int operating_snk_mw;
bool update_sink_caps;
/* Requested current / voltage to the port partner */
u32 req_current_limit;
u32 req_supply_voltage;
/* Actual current / voltage limit of the local port */
/* Requested current / voltage */
u32 current_limit;
u32 supply_voltage;
@ -1721,8 +1718,8 @@ static void tcpm_pd_ctrl_request(struct tcpm_port *port,
case SNK_TRANSITION_SINK:
if (port->vbus_present) {
tcpm_set_current_limit(port,
port->req_current_limit,
port->req_supply_voltage);
port->current_limit,
port->supply_voltage);
port->explicit_contract = true;
tcpm_set_state(port, SNK_READY, 0);
} else {
@ -1794,8 +1791,8 @@ static void tcpm_pd_ctrl_request(struct tcpm_port *port,
break;
case SNK_NEGOTIATE_PPS_CAPABILITIES:
port->pps_data.active = true;
port->req_supply_voltage = port->pps_data.out_volt;
port->req_current_limit = port->pps_data.op_curr;
port->supply_voltage = port->pps_data.out_volt;
port->current_limit = port->pps_data.op_curr;
tcpm_set_state(port, SNK_TRANSITION_SINK, 0);
break;
case SOFT_RESET_SEND:
@ -2399,8 +2396,8 @@ static int tcpm_pd_build_request(struct tcpm_port *port, u32 *rdo)
flags & RDO_CAP_MISMATCH ? " [mismatch]" : "");
}
port->req_current_limit = ma;
port->req_supply_voltage = mv;
port->current_limit = ma;
port->supply_voltage = mv;
return 0;
}