usb: typec: ucsi: add callback for connector status updates
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Thu, 11 Apr 2024 04:49:53 +0000 (07:49 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Apr 2024 14:47:23 +0000 (16:47 +0200)
commit24bce22d09ec8e67022aab9a888acb56fb7a996a
tree0500b167c2e94e852eb25748d9eea60e8cc8bf9c
parent0a723ed3baa941ca4f51d87bab00661f41142835
usb: typec: ucsi: add callback for connector status updates

Allow UCSI glue driver to perform addtional work to update connector
status. For example, it might check the cable orientation.  This call is
performed after reading new connector statatus, so the platform driver
can peek at new connection status bits.

The callback is called both when registering the port and when the
connector change event is being handled.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240411-ucsi-orient-aware-v2-1-d4b1cb22a33f@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/ucsi.c
drivers/usb/typec/ucsi/ucsi.h