Merge 4953207927 ("usb: typec: tcpci: Prevent Sink disconnection before vPpsShutdown in SPR PPS") into android14-6.1-lts

Steps on the way to 6.1.129

Resolves merge conflicts in:
	drivers/usb/typec/tcpm/tcpci.c
	drivers/usb/typec/tcpm/tcpm.c

Change-Id: Id20ff6e44155d868c2542d94a30131d8658800c2
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2025-03-07 08:53:02 +00:00
3 changed files with 6 additions and 3 deletions

View File

@@ -341,7 +341,8 @@ static int tcpci_enable_auto_vbus_discharge(struct tcpc_dev *dev, bool enable)
}
static int tcpci_set_auto_vbus_discharge_threshold(struct tcpc_dev *dev, enum typec_pwr_opmode mode,
bool pps_active, u32 requested_vbus_voltage_mv)
bool pps_active, u32 requested_vbus_voltage_mv,
u32 apdo_min_voltage_mv)
{
struct tcpci *tcpci = tcpc_to_tcpci(dev);
unsigned int pwr_ctrl, threshold = 0;

View File

@@ -2353,7 +2353,8 @@ static int tcpm_set_auto_vbus_discharge_threshold(struct tcpm_port *port,
else
voltage = requested_vbus_voltage;
ret = port->tcpc->set_auto_vbus_discharge_threshold(port->tcpc, mode, pps_active, voltage);
ret = port->tcpc->set_auto_vbus_discharge_threshold(port->tcpc, mode, pps_active, voltage,
port->pps_data.min_volt);
tcpm_log_force(port,
"set_auto_vbus_discharge_threshold mode:%d pps_active:%c vbus:%u pps_apdo_min_volt:%u ret:%d",
mode, pps_active ? 'y' : 'n', requested_vbus_voltage,

View File

@@ -150,7 +150,8 @@ struct tcpc_dev {
void (*frs_sourcing_vbus)(struct tcpc_dev *dev);
int (*enable_auto_vbus_discharge)(struct tcpc_dev *dev, bool enable);
int (*set_auto_vbus_discharge_threshold)(struct tcpc_dev *dev, enum typec_pwr_opmode mode,
bool pps_active, u32 requested_vbus_voltage);
bool pps_active, u32 requested_vbus_voltage,
u32 pps_apdo_min_voltage);
bool (*is_vbus_vsafe0v)(struct tcpc_dev *dev);
void (*set_partner_usb_comm_capable)(struct tcpc_dev *dev, bool enable);
void (*check_contaminant)(struct tcpc_dev *dev);