Revert "typec: tcpm: Only request matching pdos"
Heikki Krogerus
Acked-byQuoted 18 lines · Hans de Goede
Commit
57e6f0d7b804("typec: tcpm: Only request matching pdos") is causing a regression, before this commit e.g. the GPD win and GPD pocket devices were charging at 9V 3A with a PD charger, now they are instead slowly discharging at 5V 0.4A, as this commit causes the ports max_snk_mv/ma/mw settings to be completely ignored.Arguably the way to fix this would be to add a
PDO_VAR()describing the voltage range to thesnk_capsof boards which can handle any voltage in their range, but the "typec: tcpm: Only request matching pdos" commit looks at the type of PDO advertised by the source/charger and if that is fixed (as it typically is) only compairs againstPDO_FIXEDentries in thesnk_capsso supporting a range of voltage would require adding aPDO_FIXEDentry for *every possible* voltage tosnk_caps.AFAICT there is no reason why a fixed
source_capcannot be matched against a variablesnk_cap, so at a minimum the commit should be rewritten to support that.
Quoted 5 lines
For now lets revert the "typec: tcpm: Only request matching pdos" commit, fixing the regression.
Cc Badhri Jagan Sridharan <[email protected]>Signed-off-by Hans de Goede <[email protected]>
You are correct. The patch should be rewritten.
Thanks,