emul: Migrate all emulation use to use DT_HAS_
Remove all enabling of CONFIG_EMUL_.* in favor of automatically enabling peripheral emulators based on the compatible string presence in the device tree and the one true CONFIG_EMUL. Zephyr has long since moved to a model of enabling drivers based on the presence of their associated IC's compatible string in the final devicetree overlay. There is no reason that emulators can't align in just the same way, and probably ought to to remove superfluous enabling of configs. Signed-off-by: Aaron Massey <aaronmassey@google.com>
This commit is contained in:
parent
5893606187
commit
07ee466591
|
@ -14,7 +14,9 @@ config MAX17048
|
||||||
|
|
||||||
config EMUL_MAX17048
|
config EMUL_MAX17048
|
||||||
bool "Emulate an MAX17048 fuel gague"
|
bool "Emulate an MAX17048 fuel gague"
|
||||||
|
default y
|
||||||
depends on EMUL
|
depends on EMUL
|
||||||
|
depends on MAX17048
|
||||||
help
|
help
|
||||||
It provides readings which follow a simple sequence, thus allowing
|
It provides readings which follow a simple sequence, thus allowing
|
||||||
test code to check that things are working as expected.
|
test code to check that things are working as expected.
|
||||||
|
|
|
@ -6,7 +6,9 @@
|
||||||
|
|
||||||
config EMUL_SBS_GAUGE
|
config EMUL_SBS_GAUGE
|
||||||
bool "Emulate an SBS 1.1 compliant smart battery fuel gauge"
|
bool "Emulate an SBS 1.1 compliant smart battery fuel gauge"
|
||||||
|
default y
|
||||||
depends on EMUL
|
depends on EMUL
|
||||||
|
depends on SBS_GAUGE_NEW_API || SBS_GAUGE
|
||||||
help
|
help
|
||||||
It provides readings which follow a simple sequence, thus allowing
|
It provides readings which follow a simple sequence, thus allowing
|
||||||
test code to check that things are working as expected.
|
test code to check that things are working as expected.
|
||||||
|
|
|
@ -11,6 +11,7 @@ config AKM09918C
|
||||||
|
|
||||||
config EMUL_AKM09918C
|
config EMUL_AKM09918C
|
||||||
bool "Emulator for AKM09918C"
|
bool "Emulator for AKM09918C"
|
||||||
|
default y
|
||||||
depends on AKM09918C
|
depends on AKM09918C
|
||||||
depends on EMUL
|
depends on EMUL
|
||||||
help
|
help
|
||||||
|
|
|
@ -214,7 +214,9 @@ endchoice
|
||||||
|
|
||||||
config EMUL_BMI160
|
config EMUL_BMI160
|
||||||
bool "Emulate a Bosch BMI160 accelerometer"
|
bool "Emulate a Bosch BMI160 accelerometer"
|
||||||
|
default y
|
||||||
depends on EMUL
|
depends on EMUL
|
||||||
|
depends on BMI160
|
||||||
help
|
help
|
||||||
This is an emulator for the Bosch BMI160 accelerometer.
|
This is an emulator for the Bosch BMI160 accelerometer.
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ config ICM42688
|
||||||
|
|
||||||
config EMUL_ICM42688
|
config EMUL_ICM42688
|
||||||
bool "Emulator for the ICM42688"
|
bool "Emulator for the ICM42688"
|
||||||
|
default y
|
||||||
depends on ICM42688
|
depends on ICM42688
|
||||||
depends on EMUL
|
depends on EMUL
|
||||||
help
|
help
|
||||||
|
|
|
@ -6,9 +6,10 @@
|
||||||
config EMUL_ESPI_HOST
|
config EMUL_ESPI_HOST
|
||||||
bool "Emulate an eSPI host"
|
bool "Emulate an eSPI host"
|
||||||
help
|
help
|
||||||
This is an emulator of the generic eSPI host. The emulator supports
|
This is an emulator of the generic eSPI host. The emulator supports basic host operations
|
||||||
basic host operations - virtual wires and writing to port 80. It can be
|
- virtual wires and writing to port 80. It can be extended. Note: Because this emulator is
|
||||||
extended.
|
not tied to a particular DT node, it does not make use of the DT_HAS_<compat>_ENABLED
|
||||||
|
macro.
|
||||||
|
|
||||||
if EMUL_ESPI_HOST
|
if EMUL_ESPI_HOST
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
CONFIG_EMUL=y
|
CONFIG_EMUL=y
|
||||||
CONFIG_EMUL_MAX17048=y
|
|
||||||
CONFIG_I2C=y
|
|
||||||
CONFIG_I2C_EMUL=y
|
|
||||||
|
|
|
@ -2,6 +2,3 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
CONFIG_EMUL=y
|
CONFIG_EMUL=y
|
||||||
CONFIG_EMUL_SBS_GAUGE=y
|
|
||||||
CONFIG_I2C=y
|
|
||||||
CONFIG_I2C_EMUL=y
|
|
||||||
|
|
|
@ -4,6 +4,5 @@
|
||||||
CONFIG_EMUL=y
|
CONFIG_EMUL=y
|
||||||
CONFIG_I2C=y
|
CONFIG_I2C=y
|
||||||
CONFIG_SPI=y
|
CONFIG_SPI=y
|
||||||
CONFIG_EMUL_BMI160=y
|
|
||||||
CONFIG_SENSOR=y
|
CONFIG_SENSOR=y
|
||||||
CONFIG_BMI160_TRIGGER_NONE=y
|
CONFIG_BMI160_TRIGGER_NONE=y
|
||||||
|
|
|
@ -13,4 +13,3 @@ CONFIG_SENSOR=y
|
||||||
|
|
||||||
# Enable emulation
|
# Enable emulation
|
||||||
CONFIG_EMUL=y
|
CONFIG_EMUL=y
|
||||||
CONFIG_EMUL_AKM09918C=y
|
|
||||||
|
|
|
@ -12,4 +12,3 @@ CONFIG_SENSOR=y
|
||||||
|
|
||||||
# Enable emulation
|
# Enable emulation
|
||||||
CONFIG_EMUL=y
|
CONFIG_EMUL=y
|
||||||
CONFIG_EMUL_ICM42688=y
|
|
||||||
|
|
|
@ -2,6 +2,3 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
CONFIG_EMUL=y
|
CONFIG_EMUL=y
|
||||||
CONFIG_EMUL_SBS_GAUGE=y
|
|
||||||
CONFIG_I2C=y
|
|
||||||
CONFIG_I2C_EMUL=y
|
|
||||||
|
|
|
@ -2,6 +2,3 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
CONFIG_EMUL=y
|
CONFIG_EMUL=y
|
||||||
CONFIG_EMUL_SBS_GAUGE=y
|
|
||||||
CONFIG_I2C=y
|
|
||||||
CONFIG_I2C_EMUL=y
|
|
||||||
|
|
|
@ -2,6 +2,3 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
CONFIG_EMUL=y
|
CONFIG_EMUL=y
|
||||||
CONFIG_EMUL_SBS_GAUGE=y
|
|
||||||
CONFIG_I2C=y
|
|
||||||
CONFIG_I2C_EMUL=y
|
|
||||||
|
|
|
@ -5,5 +5,4 @@
|
||||||
CONFIG_ZTEST=y
|
CONFIG_ZTEST=y
|
||||||
CONFIG_ZTEST_NEW_API=y
|
CONFIG_ZTEST_NEW_API=y
|
||||||
CONFIG_SENSOR=y
|
CONFIG_SENSOR=y
|
||||||
CONFIG_EMUL_BMI160=y
|
|
||||||
CONFIG_BMI160_TRIGGER_NONE=y
|
CONFIG_BMI160_TRIGGER_NONE=y
|
||||||
|
|
Loading…
Reference in a new issue