mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-05 06:21:53 +00:00
Use two suitable GPIOs to implement a simple arbitration scheme. Each side owns one of the GPIOs, which are normally pulled high. When one side wants to use I2C as a master, it pulls its GPIO low, waits for a short period to make sure that the other side is not also pulling its GPIO low, and then goes ahead with the transaction. When the transaction is over, the GPIO is released, thus freeing the I2C bus up for use by the other end. For simplicity the terminolgy used here is EC for us, and AP for the other end. BUG=chrome-os-partner:10888 TEST=manual: build for all boards boot on snow (cannot test i2c as it is broken) Change-Id: I97d9fbd5aba8248c8c1240baaec17db22860665c Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/26142