summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorTing Shen <phoenixshen@google.com>2022-02-10 19:44:29 +0800
committerCommit Bot <commit-bot@chromium.org>2022-02-11 09:34:38 +0000
commitc85f728315b0b620de6da2a3ff3779e0b6b398ce (patch)
treef18b718eb9f6ec71053b36b7ed725ad3b90ba5e2 /driver
parenta791e60a12377543cc6421585006ff6feb5594d8 (diff)
downloadchrome-ec-c85f728315b0b620de6da2a3ff3779e0b6b398ce.tar.gz
ppc/rt1739: fix workaround code
fix a typo and incorrect bit flags (BIT4,5 -> BIT5,6) BUG=None TEST=krabby c1 can charge BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I9cb398e2771429497219f0630320a5f733c411ce Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3451699 Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r--driver/ppc/rt1739.c4
-rw-r--r--driver/ppc/rt1739.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/driver/ppc/rt1739.c b/driver/ppc/rt1739.c
index daad826919..14d1242fe9 100644
--- a/driver/ppc/rt1739.c
+++ b/driver/ppc/rt1739.c
@@ -172,9 +172,9 @@ static int rt1739_workaround(int port)
RT1739_OSC640K_FORCE_EN,
MASK_SET));
- RETURN_ERROR(write_reg(port, RT1739_VBUS_DAULT_DIS,
+ RETURN_ERROR(write_reg(port, RT1739_VBUS_FAULT_DIS,
+ RT1739_OVP_DISVBUS_EN |
RT1739_UVLO_DISVBUS_EN |
- RT1739_SRCP_DISVBUS_EN |
RT1739_SCP_DISVBUS_EN |
RT1739_OCPS_DISVBUS_EN));
break;
diff --git a/driver/ppc/rt1739.h b/driver/ppc/rt1739.h
index 43cc04f366..2870535d99 100644
--- a/driver/ppc/rt1739.h
+++ b/driver/ppc/rt1739.h
@@ -67,7 +67,7 @@
#define RT1739_HV_SINK_OCP_SEL_1_75A 1
#define RT1739_HV_SINK_OCP_SEL_3_3A 2
-#define RT1739_VBUS_DAULT_DIS 0x26
+#define RT1739_VBUS_FAULT_DIS 0x26
#define RT1739_OVP_DISVBUS_EN BIT(6)
#define RT1739_UVLO_DISVBUS_EN BIT(5)
#define RT1739_SRCP_DISVBUS_EN BIT(4)