Skip to content

Commit 33786a2

Browse files
Heikki Krogerusgregkh
authored andcommitted
usb: typec: ucsi: Fix the notification bit offsets
The bit offsets for the Set Notification Enable command were not considering the reserved bits in the middle. Fixes: 470ce43 ("usb: typec: ucsi: Remove struct ucsi_control") Signed-off-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 2548288 commit 33786a2

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

drivers/usb/typec/ucsi/ucsi.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,15 @@ void ucsi_connector_change(struct ucsi *ucsi, u8 num);
9494
#define UCSI_ENABLE_NTFY_CMD_COMPLETE BIT(16)
9595
#define UCSI_ENABLE_NTFY_EXT_PWR_SRC_CHANGE BIT(17)
9696
#define UCSI_ENABLE_NTFY_PWR_OPMODE_CHANGE BIT(18)
97-
#define UCSI_ENABLE_NTFY_CAP_CHANGE BIT(19)
98-
#define UCSI_ENABLE_NTFY_PWR_LEVEL_CHANGE BIT(20)
99-
#define UCSI_ENABLE_NTFY_PD_RESET_COMPLETE BIT(21)
100-
#define UCSI_ENABLE_NTFY_CAM_CHANGE BIT(22)
101-
#define UCSI_ENABLE_NTFY_BAT_STATUS_CHANGE BIT(23)
102-
#define UCSI_ENABLE_NTFY_PARTNER_CHANGE BIT(24)
103-
#define UCSI_ENABLE_NTFY_PWR_DIR_CHANGE BIT(25)
104-
#define UCSI_ENABLE_NTFY_CONNECTOR_CHANGE BIT(26)
105-
#define UCSI_ENABLE_NTFY_ERROR BIT(27)
97+
#define UCSI_ENABLE_NTFY_CAP_CHANGE BIT(21)
98+
#define UCSI_ENABLE_NTFY_PWR_LEVEL_CHANGE BIT(22)
99+
#define UCSI_ENABLE_NTFY_PD_RESET_COMPLETE BIT(23)
100+
#define UCSI_ENABLE_NTFY_CAM_CHANGE BIT(24)
101+
#define UCSI_ENABLE_NTFY_BAT_STATUS_CHANGE BIT(25)
102+
#define UCSI_ENABLE_NTFY_PARTNER_CHANGE BIT(27)
103+
#define UCSI_ENABLE_NTFY_PWR_DIR_CHANGE BIT(28)
104+
#define UCSI_ENABLE_NTFY_CONNECTOR_CHANGE BIT(30)
105+
#define UCSI_ENABLE_NTFY_ERROR BIT(31)
106106
#define UCSI_ENABLE_NTFY_ALL 0xdbe70000
107107

108108
/* SET_UOR command bits */

0 commit comments

Comments
 (0)