usb: typec: ucsi: Better fix for missing unplug events issue
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Mon, 20 Sep 2021 14:24:19 +0000 (17:24 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Oct 2021 10:42:38 +0000 (12:42 +0200)
commit512df95b9432e8ea5836533b3d3d61b972f04693
tree9f374896c852d7444406a7ff52f387f898c3bbab
parentbd19ac98f77e04aa50a842bb7387f95637bf58d1
usb: typec: ucsi: Better fix for missing unplug events issue

The commit 217504a05532 ("usb: typec: ucsi: Work around PPM
losing change information") had solved this issue
previously, but in a really complex manner. The core issue
is that on some platforms the EC firmware does not interrupt
the driver on unplug event in some cases, mainly when the
cable is unplugged immediately after the plug-in.

From now on handling that problem by simply re-checking new
connections.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20210920142419.54493-8-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/ucsi.c
drivers/usb/typec/ucsi/ucsi.h