usb_mux: Simplify logging to reduce code size
BRANCH=none
TEST=make buildall
Commit-Ready: Philip Chen
Tested-by: Philip Chen
@@ -24,7 +24,7 @@ void usb_mux_init(int port)
ASSERT(port >= 0 && port < CONFIG_USB_PD_PORT_COUNT);
res = mux->driver->init(mux->port_addr);
if (res)
- CPRINTS("Error initializing mux port(%d): %d", port, res);
+ CPRINTS("Err: init mux port(%d): %d", port, res);
/* Apply board specific initialization */
if (mux->board_init)
@@ -51,7 +51,7 @@ void usb_mux_set(int port, enum typec_mux mux_mode,
mux_state = polarity ? mux_mode | MUX_POLARITY_INVERTED : mux_mode;
res = mux->driver->set(mux->port_addr, mux_state);
if (res) {
- CPRINTS("Error setting mux port(%d): %d", port, res);
+ CPRINTS("Err: set mux port(%d): %d", port, res);
return;
}
@@ -70,7 +70,7 @@ int usb_mux_get(int port, const char **dp_str, const char **usb_str)
res = mux->driver->get(mux->port_addr, &mux_state);
if (res) {
- CPRINTS("Error getting mux port(%d): %d", port, res);
+ CPRINTS("Err: get mux port(%d): %d", port, res);
return 0;
}
@@ -91,7 +91,7 @@ void usb_mux_flip(int port)
res = mux->driver->get(mux->port_addr, &mux_state);
if (res) {
- CPRINTS("Error getting mux port(%d): %d", port, res);
+ CPRINTS("Err: get mux port(%d): %d", port, res);
return;
}
@@ -102,7 +102,7 @@ void usb_mux_flip(int port)
res = mux->driver->set(mux->port_addr, mux_state);
if (res)
- CPRINTS("Error setting mux port(%d): %d", port, res);
+ CPRINTS("Err: set mux port(%d): %d", port, res);
}
#ifdef CONFIG_CMD_TYPEC
