3cc74f1140
The emulated espi and i2c bus controllers do not depend on CONFIG_EMUL being enabled. When these fake bus controllers are enabled by their assoicated compatible in the devicetree without CONFIG_EMUL it results in linker failures for underlying peripheral emulators which may be difficult to understand. The SPI config already depends on EMUL. Make the ESPI and I2C emulated controllers depend on CONFIG_EMUL. Note: This still allows linker failures if CONFIG_EMUL=n, but the linker failures will be consistently at device driver instantiation due to a missing bus controller. Regardless, this will be easier to debug when someone forgets to enable CONFIG_EMUL. Signed-off-by: Aaron Massey <aaronmassey@google.com>
14 lines
439 B
Plaintext
14 lines
439 B
Plaintext
# Copyright 2020 Google LLC
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
config I2C_EMUL
|
|
bool "I2C emulator"
|
|
default y
|
|
depends on DT_HAS_ZEPHYR_I2C_EMUL_CONTROLLER_ENABLED
|
|
depends on EMUL
|
|
help
|
|
Enable the I2C emulator driver. This is a fake driver in that it
|
|
does not talk to real hardware. Instead it talks to emulation
|
|
drivers that pretend to be devices on the emulated I2C bus. It is
|
|
used for testing drivers for I2C devices.
|