From 707ae55cc0ded8e48bb34aa98213d39d739a4ac6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Sat, 20 Nov 2021 14:33:58 +0100
Subject: [PATCH 315/463] usb: typec: fusb302: Fix register definitions

MEASURE_VBUS bit is at position 6. MDAC bits are also wrong.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
 drivers/usb/typec/tcpm/fusb302_reg.h | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/usb/typec/tcpm/fusb302_reg.h b/drivers/usb/typec/tcpm/fusb302_reg.h
index edc0e4b0f1e6b..f37d226c5027f 100644
--- a/drivers/usb/typec/tcpm/fusb302_reg.h
+++ b/drivers/usb/typec/tcpm/fusb302_reg.h
@@ -27,14 +27,13 @@
 #define FUSB_REG_SWITCHES1_TXCC2_EN		BIT(1)
 #define FUSB_REG_SWITCHES1_TXCC1_EN		BIT(0)
 #define FUSB_REG_MEASURE			0x04
-#define FUSB_REG_MEASURE_MDAC5			BIT(7)
-#define FUSB_REG_MEASURE_MDAC4			BIT(6)
-#define FUSB_REG_MEASURE_MDAC3			BIT(5)
-#define FUSB_REG_MEASURE_MDAC2			BIT(4)
-#define FUSB_REG_MEASURE_MDAC1			BIT(3)
-#define FUSB_REG_MEASURE_MDAC0			BIT(2)
-#define FUSB_REG_MEASURE_VBUS			BIT(1)
-#define FUSB_REG_MEASURE_XXXX5			BIT(0)
+#define FUSB_REG_MEASURE_VBUS			BIT(6)
+#define FUSB_REG_MEASURE_MDAC5			BIT(5)
+#define FUSB_REG_MEASURE_MDAC4			BIT(4)
+#define FUSB_REG_MEASURE_MDAC3			BIT(3)
+#define FUSB_REG_MEASURE_MDAC2			BIT(2)
+#define FUSB_REG_MEASURE_MDAC1			BIT(1)
+#define FUSB_REG_MEASURE_MDAC0			BIT(0)
 #define FUSB_REG_CONTROL0			0x06
 #define FUSB_REG_CONTROL0_TX_FLUSH		BIT(6)
 #define FUSB_REG_CONTROL0_INT_MASK		BIT(5)
@@ -105,7 +104,6 @@
 #define FUSB_REG_STATUS0A_RX_SOFT_RESET		BIT(1)
 #define FUSB_REG_STATUS0A_RX_HARD_RESET		BIT(0)
 #define FUSB_REG_STATUS1A			0x3D
-#define FUSB_REG_STATUS1A_TOGSS			BIT(3)
 #define FUSB_REG_STATUS1A_TOGSS_RUNNING		0x0
 #define FUSB_REG_STATUS1A_TOGSS_SRC1		0x1
 #define FUSB_REG_STATUS1A_TOGSS_SRC2		0x2
-- 
2.46.0

