]> Git Repo - linux.git/commit
usb: typec: tcpm: Address incorrect values of tcpm psy for pps supply
authorBadhri Jagan Sridharan <[email protected]>
Wed, 7 Apr 2021 20:07:19 +0000 (13:07 -0700)
committerGreg Kroah-Hartman <[email protected]>
Fri, 9 Apr 2021 13:21:24 +0000 (15:21 +0200)
commite3a0720224873587954b55d193d5b4abb14f0443
treed2e118cec763c2678634d4d7cc9d20e6616e7a92
parentf3dedafb8263ca4791a92a23f5230068f5bde008
usb: typec: tcpm: Address incorrect values of tcpm psy for pps supply

tcpm_pd_select_pps_apdo overwrites port->pps_data.min_volt,
port->pps_data.max_volt, port->pps_data.max_curr even before
port partner accepts the requests. This leaves incorrect values
in current_limit and supply_voltage that get exported by
"tcpm-source-psy-". Solving this problem by caching the request
values in req_min_volt, req_max_volt, req_max_curr, req_out_volt,
req_op_curr. min_volt, max_volt, max_curr gets updated once the
partner accepts the request. current_limit, supply_voltage gets updated
once local port's tcpm enters SNK_TRANSITION_SINK when the accepted
current_limit and supply_voltage is enforced.

Fixes: f2a8aa053c176 ("typec: tcpm: Represent source supply through power_supply")
Signed-off-by: Badhri Jagan Sridharan <[email protected]>
Cc: stable <[email protected]>
Reviewed-by: Adam Thomson <[email protected]>
Reviewed-by: Heikki Krogerus <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/usb/typec/tcpm/tcpm.c
This page took 0.054794 seconds and 4 git commands to generate.