alistair23-linux/drivers/usb/typec
Hans de Goede 6f566af346 Revert "typec: tcpm: Only request matching pdos"
Commit 57e6f0d7b8 ("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 the snk_caps of 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 against PDO_FIXED entries
in the snk_caps so supporting a range of voltage would require adding a
PDO_FIXED entry for *every possible* voltage to snk_caps.

AFAICT there is no reason why a fixed source_cap cannot be matched against
a variable snk_cap, so at a minimum the commit should be rewritten to
support that.

For now lets revert the "typec: tcpm: Only request matching pdos" commit,
fixing the regression.

Fixes: 57e6f0d7b8 ("typec: tcpm: Only request matching pdos")
Cc: Badhri Jagan Sridharan <badhri@google.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06 09:17:34 -08:00
..
fusb302 usb: typec: remove duplicate includes 2017-12-06 09:21:17 +01:00
ucsi usb: add user selectable option for the whole USB Type-C Support 2017-11-28 15:15:01 +01:00
Kconfig usb: add user selectable option for the whole USB Type-C Support 2017-11-28 15:15:01 +01:00
Makefile USB: add SPDX identifiers to all remaining Makefiles 2017-11-07 15:53:48 +01:00
tcpm.c Revert "typec: tcpm: Only request matching pdos" 2018-03-06 09:17:34 -08:00
tps6598x.c USB: typec: Remove remaining redundant license text 2017-11-07 15:53:48 +01:00
typec.c USB: typec: Remove redundant license text 2017-11-07 15:45:01 +01:00
typec_wcove.c usb: typec: wcove: fix the sink capabilities 2017-12-12 13:16:07 +01:00