]> www.infradead.org Git - users/jedix/linux-maple.git/commit
usb: typec: ucsi_acpi: Add LG Gram quirk
authorDiogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
Wed, 12 Jun 2024 13:13:10 +0000 (14:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Jun 2024 17:36:08 +0000 (19:36 +0200)
commit9e3caa9dd51b23e232f095a98336a84f42e4a7f2
tree9e7e0ad2b9ba0b5ad85aaa34bdee214cbfb60047
parent8e1ec117efdfd4b2f59f57bd0ad16b4edf5b963f
usb: typec: ucsi_acpi: Add LG Gram quirk

Some LG Gram laptops report a bogus connector change event after a
GET_PDOS command for the partner's source PDOs, which disappears from
the CCI after acknowledging the command. However, the subsequent
GET_CONNECTOR_STATUS in ucsi_handle_connector_change() still reports
this bogus change in bits 5 and 6, leading to the UCSI core re-checking
the partner's source PDOs and thus to an infinite loop.

Fix this by adding a quirk that signals when a potentially buggy GET_PDOS
command is used, checks the status change report and clears it if it is a
bogus event before sending it to the UCSI core.

Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240612-gram_quirk-v1-1-52b0ff0e1546@tecnico.ulisboa.pt
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/ucsi_acpi.c