zephyr/drivers/gpio/Kconfig.emul
Jordan Yates c8d1e134ae gpio: emulated: default Kconfig value
Enable the emulated GPIO driver by default if instances exist in
devicetree. This removes the need to manually enable `CONFIG_GPIO_EMUL`
when `CONFIG_GPIO` is enabled.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-01-06 11:56:15 -05:00

22 lines
893 B
Plaintext

# Emulated GPIO configuration options
# Copyright (c) 2020 Friedt Professional Engineering Services, Inc
# SPDX-License-Identifier: Apache-2.0
# Workaround for not being able to have commas in macro arguments
DT_COMPAT_ZEPHYR_GPIO_EMUL := zephyr,gpio-emul
config GPIO_EMUL
bool "Emulated GPIO driver"
def_bool $(dt_compat_enabled,$(DT_COMPAT_ZEPHYR_GPIO_EMUL))
help
Enable the emulated GPIO driver. Mainly used for testing, this
driver allows for an arbitrary number of emulated GPIO controllers
to be instantiated. Furthermore, the emulated pins can be "wired"
using the regular GPIO callback API and the additional API
available in drivers/gpio/gpio_emul.h . Configuration for each
GPIO instance is accomplished using device tree and an example of
such a configuration is in
tests/drivers/gpio/gpio_basic_api/boards/native_posix_64.overlay
If unsure, say N.