|
@@ -4113,6 +4113,9 @@ static int tcpm_pps_set_op_curr(struct tcpm_port *port, u16 op_curr)
|
|
goto port_unlock;
|
|
goto port_unlock;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /* Round down operating current to align with PPS valid steps */
|
|
|
|
+ op_curr = op_curr - (op_curr % RDO_PROG_CURR_MA_STEP);
|
|
|
|
+
|
|
reinit_completion(&port->pps_complete);
|
|
reinit_completion(&port->pps_complete);
|
|
port->pps_data.op_curr = op_curr;
|
|
port->pps_data.op_curr = op_curr;
|
|
port->pps_status = 0;
|
|
port->pps_status = 0;
|
|
@@ -4166,6 +4169,9 @@ static int tcpm_pps_set_out_volt(struct tcpm_port *port, u16 out_volt)
|
|
goto port_unlock;
|
|
goto port_unlock;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /* Round down output voltage to align with PPS valid steps */
|
|
|
|
+ out_volt = out_volt - (out_volt % RDO_PROG_VOLT_MV_STEP);
|
|
|
|
+
|
|
reinit_completion(&port->pps_complete);
|
|
reinit_completion(&port->pps_complete);
|
|
port->pps_data.out_volt = out_volt;
|
|
port->pps_data.out_volt = out_volt;
|
|
port->pps_status = 0;
|
|
port->pps_status = 0;
|