1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-08-17 04:14:42 +02:00

i2c_helper: Add support for the Linux I2C subsystem

See https://www.kernel.org/doc/Documentation/i2c/ for details.

This creates common interface for I2C access functions, and adds
implementation for linux I2C functions.

BUG=b:148746232
BRANCH=none
TEST=build success

Signed-off-by: Shiyu Sun <sshiyu@chromium.org>
Change-Id: Ie0487824dfb71970bede17f617dbbb30ddf78c12
Reviewed-on: https://review.coreboot.org/c/flashrom/+/39686
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
This commit is contained in:
Shiyu Sun
2020-03-19 16:59:52 +11:00
committed by Edward O'Callaghan
parent fe6b98b91c
commit dc2c83bbc7
4 changed files with 239 additions and 0 deletions

View File

@@ -290,6 +290,11 @@ if config_bitbang_spi
cargs += '-DCONFIG_BITBANG_SPI=1'
endif
if host_machine.system() == 'linux'
srcs += 'i2c_helper_linux.c'
cargs += '-DCONFIG_I2C_SUPPORT=1'
endif
# raw memory, MSR or PCI port I/O access
if need_raw_access
srcs += 'hwaccess.c'