stm32l: add i2c driver
(Derived from Vincent's original I2C slave CL)
This configures I2C port 2 as a slave device at 8-bit address 0xEC
(7-bit address is 0x76).
This CL only implements single-byte read and write transactions.
A master-initiated write will set EC mode, and a master-initiated read
will send bytes back depending on the mode.
BUG=chromium-os:28925
TEST=build on daisy and discovery; run on daisy
Change-Id: I1e9f28feb99e25bb7656b6e9ae8643d3ae285a28
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
3 files changed