usb: typec: ucsi: Store the notification mask
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Mon, 30 Dec 2019 13:34:30 +0000 (16:34 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 30 Dec 2019 19:11:32 +0000 (20:11 +0100)
commit71a1fa0df2a3728b8ccb97394be420d1f03df40e
tree92e6377c2823cd616114e2f5aab6758a98a43adb
parent5311f88e07ce83ea529a6a84716cbe32e8db2b6a
usb: typec: ucsi: Store the notification mask

The driver needs to ignore any Connector Change Events
before the Connector Change Indication notifications have
actually been enabled. This adds a check to
ucsi_connector_change() function to make sure the function
does not try to process the event unless the Connector
Change notifications have been enabled.

It is quite common that the firmware representing the "PPM"
(Platform Policy Manager) starts generating Connector Change
notifications even when only the Command Completion
notifications are enabled.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20191230133431.63445-2-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