usb: typec: ucsi: extract common code for command handling
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Thu, 27 Jun 2024 14:44:45 +0000 (17:44 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jul 2024 14:04:50 +0000 (16:04 +0200)
commit584e8df58942338602c70686b451b5c3093543a1
tree8aeedb927896bf969d64b389b0235c3c71ea397f
parente1870c17e550b7a114833e392f2e340117941b7f
usb: typec: ucsi: extract common code for command handling

Extract common functions to handle command sending and to handle events
from UCSI. This ensures that all UCSI glue drivers handle the ACKs in
the same way.

The CCG driver used DEV_CMD_PENDING both for internal
firmware-related commands and for UCSI control handling. Leave the
former use case intact.

Tested-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240627-ucsi-rework-interface-v4-6-289ddc6874c7@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/ucsi.c
drivers/usb/typec/ucsi/ucsi.h
drivers/usb/typec/ucsi/ucsi_acpi.c
drivers/usb/typec/ucsi/ucsi_ccg.c
drivers/usb/typec/ucsi/ucsi_glink.c
drivers/usb/typec/ucsi/ucsi_stm32g0.c
drivers/usb/typec/ucsi/ucsi_yoga_c630.c