aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorK V, Abhilash <[email protected]>2020-04-23 16:20:56 +0300
committerGreg Kroah-Hartman <[email protected]>2020-04-23 15:33:34 +0200
commite2f38ff2f41fb88e3b5e81bbf51aeabe4a0d1188 (patch)
tree9b715febef36e3b98cc0b91a192d4e974321b439
parent0db592b1a3b7b513e16920a9cf8545e6732189c9 (diff)
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: K V, Abhilash <[email protected]> Signed-off-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/usb/typec/ucsi/ucsi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/typec/ucsi/ucsi.h b/drivers/usb/typec/ucsi/ucsi.h
index 8e831108f481..f068356cc325 100644
--- a/drivers/usb/typec/ucsi/ucsi.h
+++ b/drivers/usb/typec/ucsi/ucsi.h
@@ -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)