Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: typec: ucsi: Enable UCSI v2.0 notifications

UCSI version 2.0 and above define new PPM notifications. Update the
logic to determine which notifications to enable taking into account
these changes.

Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240524105837.15342-3-diogo.ivo@tecnico.ulisboa.pt
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Diogo Ivo and committed by
Greg Kroah-Hartman
5821bf2d 4207df37

+18 -1
+18 -1
drivers/usb/typec/ucsi/ucsi.c
··· 1672 1672 1673 1673 static u64 ucsi_get_supported_notifications(struct ucsi *ucsi) 1674 1674 { 1675 - u8 features = ucsi->cap.features; 1675 + u16 features = ucsi->cap.features; 1676 1676 u64 ntfy = UCSI_ENABLE_NTFY_ALL; 1677 1677 1678 1678 if (!(features & UCSI_CAP_ALT_MODE_DETAILS)) ··· 1687 1687 1688 1688 if (!(features & UCSI_CAP_PD_RESET)) 1689 1689 ntfy &= ~UCSI_ENABLE_NTFY_PD_RESET_COMPLETE; 1690 + 1691 + if (ucsi->version <= UCSI_VERSION_1_2) 1692 + return ntfy; 1693 + 1694 + ntfy |= UCSI_ENABLE_NTFY_SINK_PATH_STS_CHANGE; 1695 + 1696 + if (features & UCSI_CAP_GET_ATTENTION_VDO) 1697 + ntfy |= UCSI_ENABLE_NTFY_ATTENTION; 1698 + 1699 + if (features & UCSI_CAP_FW_UPDATE_REQUEST) 1700 + ntfy |= UCSI_ENABLE_NTFY_LPM_FW_UPDATE_REQ; 1701 + 1702 + if (features & UCSI_CAP_SECURITY_REQUEST) 1703 + ntfy |= UCSI_ENABLE_NTFY_SECURITY_REQ_PARTNER; 1704 + 1705 + if (features & UCSI_CAP_SET_RETIMER_MODE) 1706 + ntfy |= UCSI_ENABLE_NTFY_SET_RETIMER_MODE; 1690 1707 1691 1708 return ntfy; 1692 1709 }