usb: typec: altmodes/displayport: Signal hpd when configuring pin assignment
authorRD Babiera <rdbabiera@google.com>
Wed, 26 Jul 2023 02:09:02 +0000 (02:09 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Aug 2023 12:54:54 +0000 (14:54 +0200)
commit5a5ccd61cfd76156cb3e0373c300c509d05448ce
tree7f76aed7f1a32fbdd65cd8772eb76b7e332fa85d
parent4270d2b4845e820b274702bfc2a7140f69e4d19d
usb: typec: altmodes/displayport: Signal hpd when configuring pin assignment

When connecting to some DisplayPort partners, the initial status update
after entering DisplayPort Alt Mode notifies that the DFP_D/UFP_D is not in
the connected state. This leads to sending a configure message that keeps
the device in USB mode. The port partner then sets DFP_D/UFP_D to the
connected state and HPD to high in the same Attention message. Currently,
the HPD signal is dropped in order to handle configuration.

This patch saves changes to the HPD signal when the device chooses to
configure during dp_altmode_status_update, and invokes sysfs_notify if
necessary for HPD after configuring.

Fixes: 0e3bb7d6894d ("usb: typec: Add driver for DisplayPort alternate mode")
Cc: stable@vger.kernel.org
Signed-off-by: RD Babiera <rdbabiera@google.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20230726020903.1409072-1-rdbabiera@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/altmodes/displayport.c