diff options
author | Ruben Rodriguez Buchillon <coconutruben@chromium.org> | 2018-05-05 18:32:12 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-05-21 18:19:29 -0700 |
commit | cb4338e289389d699f26204c73aede4e24dd296e (patch) | |
tree | b9e0cc1882811a49ca36e72d3698e7a327cb1ff3 /chip | |
parent | e633c3c7dbc28cf92ae541f1426d0dac7a80901d (diff) | |
download | chrome-ec-cb4338e289389d699f26204c73aede4e24dd296e.tar.gz |
sweetberry: expose i2c over usb
Expose the i2c interface through usb so that we can read power rails
through servod leveraging the work being done there.
BRANCH=none
BUG=chromium:806148
TEST=manual testing
- powerlog still works
- i2c over usb using servod code works (other CLs needed)
Change-Id: I48876bc4839509a397ce77376b337c37c556ae40
Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1051136
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r-- | chip/stm32/build.mk | 1 | ||||
-rw-r--r-- | chip/stm32/usb_dwc_i2c.h | 13 |
2 files changed, 13 insertions, 1 deletions
diff --git a/chip/stm32/build.mk b/chip/stm32/build.mk index 9a6a280d81..e7f28309b3 100644 --- a/chip/stm32/build.mk +++ b/chip/stm32/build.mk @@ -75,7 +75,6 @@ chip-$(CONFIG_USB)+=usb_dwc.o usb_endpoints.o chip-$(CONFIG_USB_CONSOLE)+=usb_dwc_console.o chip-$(CONFIG_USB_POWER)+=usb_power.o chip-$(CONFIG_STREAM_USB)+=usb_dwc_stream.o -chip-$(CONFIG_USB_I2C)+=usb_dwc_i2c.o else chip-$(CONFIG_STREAM_USB)+=usb-stream.o chip-$(CONFIG_USB)+=usb.o usb-$(CHIP_FAMILY).o usb_endpoints.o diff --git a/chip/stm32/usb_dwc_i2c.h b/chip/stm32/usb_dwc_i2c.h new file mode 100644 index 0000000000..e44002268a --- /dev/null +++ b/chip/stm32/usb_dwc_i2c.h @@ -0,0 +1,13 @@ +/* Copyright 2018 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef __CROS_EC_USB_DWC_I2C_H +#define __CROS_EC_USB_DWC_I2C_H +#include "usb_i2c.h" + +/* I2C over USB interface. This gets declared in usb_i2c.c */ +extern struct dwc_usb_ep i2c_usb__ep_ctl; + +#endif /* __CROS_EC_USB_DWC_I2C_H */ |