summaryrefslogtreecommitdiff
path: root/board/ampton
diff options
context:
space:
mode:
authorPatryk Duda <pdk@semihalf.com>2021-01-15 17:28:17 +0000
committerCommit Bot <commit-bot@chromium.org>2021-01-27 06:53:24 +0000
commit2ba0d4d708f2cada397288005c473476bb583ee8 (patch)
treece467e9a596f97cbb2778c8414f716c4f2e0fbee /board/ampton
parent5c6a14e956a2d66ecfa838ff9d7bc27fc0526b9c (diff)
downloadchrome-ec-2ba0d4d708f2cada397288005c473476bb583ee8.tar.gz
ampton: Check return value in board specific mux init
This patch adds checking if I2C writes to PS8751 muxer succeded. There are many reasons causing fail during mux_write(), one of them is that device is in standby mode. With this CL, problems will be reported to developer. BUG=b:151155658 BRANCH=none TEST=make -j buildall Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: Ide342ed8c713e58d91880d41a584c56866f95fec Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2633982 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'board/ampton')
-rw-r--r--board/ampton/board.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/board/ampton/board.c b/board/ampton/board.c
index 9010ed05a8..42c5a2351d 100644
--- a/board/ampton/board.c
+++ b/board/ampton/board.c
@@ -98,9 +98,10 @@ const struct usb_mux ampton_usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = {
static int tune_mux(const struct usb_mux *me)
{
/* Auto EQ disabled, compensate for channel lost up to 3.6dB */
- mux_write(me, PS8XXX_REG_MUX_DP_EQ_CONFIGURATION, 0x98);
+ RETURN_ERROR(mux_write(me, PS8XXX_REG_MUX_DP_EQ_CONFIGURATION, 0x98));
/* DP output swing adjustment +15% */
- mux_write(me, PS8XXX_REG_MUX_DP_OUTPUT_CONFIGURATION, 0xc0);
+ RETURN_ERROR(mux_write(me, PS8XXX_REG_MUX_DP_OUTPUT_CONFIGURATION,
+ 0xc0));
return EC_SUCCESS;
}