summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolaus Voss <nikolaus.voss@loewensteinmedical.de>2019-06-28 11:01:08 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-14 08:01:11 +0200
commit582aa3acf081cf5ab49c4f4a5dfa4a14e4dfebc1 (patch)
tree72c5166f603fd49ace5f36d8c9c0994734a157ab
parentdf850cc6f22f88904d14c238038f89689936343d (diff)
drivers/usb/typec/tps6598x.c: fix portinfo width
commit 05da75fc651138e51ff74ace97174349910463f5 upstream. Portinfo bit field is 3 bits wide, not 2 bits. This led to a wrong driver configuration for some tps6598x configurations. Fixes: 0a4c005bd171 ("usb: typec: driver for TI TPS6598x USB Power Delivery controllers") Signed-off-by: Nikolaus Voss <nikolaus.voss@loewensteinmedical.de> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/typec/tps6598x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/typec/tps6598x.c b/drivers/usb/typec/tps6598x.c
index c674abe3cf99..a170c49c2542 100644
--- a/drivers/usb/typec/tps6598x.c
+++ b/drivers/usb/typec/tps6598x.c
@@ -41,7 +41,7 @@
#define TPS_STATUS_VCONN(s) (!!((s) & BIT(7)))
/* TPS_REG_SYSTEM_CONF bits */
-#define TPS_SYSCONF_PORTINFO(c) ((c) & 3)
+#define TPS_SYSCONF_PORTINFO(c) ((c) & 7)
enum {
TPS_PORTINFO_SINK,