summaryrefslogtreecommitdiff
path: root/include/usb_mux.h
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2015-11-23 14:26:45 -0800
committerchrome-bot <chrome-bot@chromium.org>2015-11-24 11:02:49 -0800
commit1ea9dece80cd020a0cea2adc63daea086aba43b8 (patch)
treec3dbec4c783972828dcb8108f1250badaa363e74 /include/usb_mux.h
parent156461b212d4ecf2c39943923a1201942644a827 (diff)
downloadchrome-ec-1ea9dece80cd020a0cea2adc63daea086aba43b8.tar.gz
usb_mux: Add a callback for board specific init
This adds a callback for board specific initialization that is called after the driver init function. This will allow a board to apply port-specific tuning (such as USB EQ settings) to the mux chip. BUG=chrome-os-partner:47074 BRANCH=none TEST=build and boot on chell Change-Id: Ib162f9a2c5239678c46b80e5517823b336f6b66c Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/313746 Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'include/usb_mux.h')
-rw-r--r--include/usb_mux.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/usb_mux.h b/include/usb_mux.h
index 3cb5c4e49d..1524caa3fa 100644
--- a/include/usb_mux.h
+++ b/include/usb_mux.h
@@ -66,6 +66,15 @@ struct usb_mux {
const int port_addr;
/* Mux driver */
const struct usb_mux_driver *driver;
+
+ /**
+ * Board specific initialization for USB mux that is
+ * called after mux->driver->init() function.
+ *
+ * @param mux USB mux to tune
+ * @return EC_SUCCESS on success, non-zero error code on failure.
+ */
+ int (*board_init)(const struct usb_mux *mux);
};
/* Supported USB mux drivers */