From 2ba0d4d708f2cada397288005c473476bb583ee8 Mon Sep 17 00:00:00 2001 From: Patryk Duda Date: Fri, 15 Jan 2021 17:28:17 +0000 Subject: 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 Change-Id: Ide342ed8c713e58d91880d41a584c56866f95fec Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2633982 Reviewed-by: Aseda Aboagye Reviewed-by: Diana Z --- board/ampton/board.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'board/ampton') 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; } -- cgit v1.2.1