From c1592fff1a3b684f190e2b37f4fe5399c4497413 Mon Sep 17 00:00:00 2001 From: Aseda Aboagye Date: Thu, 5 Mar 2020 11:34:45 -0800 Subject: nb7v904m: Fix bug with CHIP_EN polarity The driver's set_low_power_mode() function had its logic inversed. If we want to enable low power mode, we need to clear the CHIP_EN bit. BUG=b:150822611,b:150875209 BRANCH=None TEST=Flash waddledoo with an AP FW that has the fixed VBT, flash the EC with an image that contains this patch, verify that external displays over USB-C are working and that hot plugging the displays are working as well. Signed-off-by: Aseda Aboagye Change-Id: Idc3c4d663365d0898b3e7c869b9c6e2dd088fa78 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2090082 Tested-by: Aseda Aboagye Auto-Submit: Aseda Aboagye Reviewed-by: Diana Z Commit-Queue: Diana Z --- driver/retimer/nb7v904m.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'driver') diff --git a/driver/retimer/nb7v904m.c b/driver/retimer/nb7v904m.c index e1cedede95..2defda52a2 100644 --- a/driver/retimer/nb7v904m.c +++ b/driver/retimer/nb7v904m.c @@ -41,9 +41,9 @@ static int set_low_power_mode(const struct usb_mux *me, bool enable) return rv; if (enable) - regval |= NB7V904M_CHIP_EN; - else regval &= ~NB7V904M_CHIP_EN; + else + regval |= NB7V904M_CHIP_EN; return nb7v904m_write(me, NB7V904M_REG_GEN_DEV_SETTINGS, regval); } -- cgit v1.2.1