From a04fc68e721c8165ce570d8929aef1330cf72df1 Mon Sep 17 00:00:00 2001 From: Nick Sanders Date: Fri, 28 Oct 2016 16:23:12 -0700 Subject: usb_i2c: refactor into common This combines stm32 and chip/g usb_i2c interfaces so they will not diverge. Note that this fixes the chip/g implementation to use 8-bit i2c addresses. BUG=chrome-os-partner:57059 BRANCH=none TEST=servod interacts with servo_micro and servo_v4 Change-Id: Ibff217d84b132556202c8a71e3d42c07d546c634 Reviewed-on: https://chromium-review.googlesource.com/405108 Commit-Ready: Nick Sanders Tested-by: Nick Sanders Reviewed-by: Mary Ruthven --- board/servo_v4/board.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'board/servo_v4/board.c') diff --git a/board/servo_v4/board.c b/board/servo_v4/board.c index 6b742d3ebd..eb884b4822 100644 --- a/board/servo_v4/board.c +++ b/board/servo_v4/board.c @@ -180,6 +180,7 @@ const void *const usb_strings[] = { [USB_STR_PRODUCT] = USB_STRING_DESC("Servo V4"), [USB_STR_SERIALNO] = USB_STRING_DESC("1234-a"), [USB_STR_VERSION] = USB_STRING_DESC(CROS_EC_VERSION32), + [USB_STR_I2C_NAME] = USB_STRING_DESC("I2C"), [USB_STR_CONSOLE_NAME] = USB_STRING_DESC("Servo EC Shell"), [USB_STR_USART3_STREAM_NAME] = USB_STRING_DESC("DUT UART"), [USB_STR_USART4_STREAM_NAME] = USB_STRING_DESC("Atmega UART"), @@ -202,8 +203,8 @@ const struct i2c_port_t i2c_ports[] = { }; const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); -USB_I2C_CONFIG(usb_i2c, USB_IFACE_I2C, USB_EP_I2C); - +int usb_i2c_board_enable(void) {return EC_SUCCESS; } +void usb_i2c_board_disable(int debounce) {} /****************************************************************************** -- cgit v1.2.1