Commit e2f38ff2 authored by K V, Abhilash's avatar K V, Abhilash Committed by Greg Kroah-Hartman
Browse files

usb: typec: ucsi: Correct bit-mask for CCI



Bit 0 is reserved in CCI (Command Status & Connector Change Indicator)
register. So, change bit-mask for connector number field to 7..1
instead of 7..0.
There would be no functional change since we were anyways right-shifing
by 1 bit.

Signed-off-by: default avatarK V, Abhilash <abhilash.k.v@intel.com>
Signed-off-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20200423132058.6972-5-heikki.krogerus@linux.intel.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0db592b1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ struct ucsi_altmode;
#define UCSI_MESSAGE_OUT		32

/* Command Status and Connector Change Indication (CCI) bits */
#define UCSI_CCI_CONNECTOR(_c_)		(((_c_) & GENMASK(7, 0)) >> 1)
#define UCSI_CCI_CONNECTOR(_c_)		(((_c_) & GENMASK(7, 1)) >> 1)
#define UCSI_CCI_LENGTH(_c_)		(((_c_) & GENMASK(15, 8)) >> 8)
#define UCSI_CCI_NOT_SUPPORTED		BIT(25)
#define UCSI_CCI_CANCEL_COMPLETE	BIT(26)