ec/google/chromeec: Enclose Kconfig in 'if/endif' block

Instead of having things depend on EC_GOOGLE_CHROMEEC, just put an if/
endif block around the configs.

The 'source' line stays outside of the if block because the source
always happens, even if it's inside an if/endif block. Each of the
sub-Kconfigs here already has an if/endif block surrounding the
contents.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: If88ba7d36ae04d879332037292c5cf9a3c8c3cab
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81025
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
This commit is contained in:
Martin Roth 2024-03-03 15:45:46 -07:00 committed by Felix Held
parent cc5cef633d
commit 1b53eb1077

View File

@ -6,6 +6,8 @@ config EC_GOOGLE_CHROMEEC
help help
Google's Chrome EC Google's Chrome EC
if EC_GOOGLE_CHROMEEC
config EC_GOOGLE_CHROMEEC_ACPI_MEMMAP config EC_GOOGLE_CHROMEEC_ACPI_MEMMAP
depends on EC_GOOGLE_CHROMEEC_LPC depends on EC_GOOGLE_CHROMEEC_LPC
def_bool n def_bool n
@ -15,20 +17,17 @@ config EC_GOOGLE_CHROMEEC_ACPI_MEMMAP
the LPC bus. the LPC bus.
config EC_GOOGLE_CHROMEEC_ACPI_USB_PORT_POWER config EC_GOOGLE_CHROMEEC_ACPI_USB_PORT_POWER
depends on EC_GOOGLE_CHROMEEC
def_bool n def_bool n
help help
Expose methods for enabling and disabling port power on individual USB Expose methods for enabling and disabling port power on individual USB
ports through the EC. ports through the EC.
config EC_GOOGLE_CHROMEEC_BOARDID config EC_GOOGLE_CHROMEEC_BOARDID
depends on EC_GOOGLE_CHROMEEC
def_bool n def_bool n
help help
Provides common routine for reading boardid from Chrome EC. Provides common routine for reading boardid from Chrome EC.
config EC_GOOGLE_CHROMEEC_I2C config EC_GOOGLE_CHROMEEC_I2C
depends on EC_GOOGLE_CHROMEEC
bool bool
default n default n
help help
@ -51,7 +50,7 @@ config EC_GOOGLE_CHROMEEC_I2C_PROTO3
Use only proto3 for i2c EC communication. Use only proto3 for i2c EC communication.
config EC_GOOGLE_CHROMEEC_ESPI config EC_GOOGLE_CHROMEEC_ESPI
depends on EC_GOOGLE_CHROMEEC && ARCH_X86 # Needs Plug-and-play. depends on ARCH_X86 # Needs Plug-and-play.
def_bool n def_bool n
select EC_GOOGLE_CHROMEEC_LPC select EC_GOOGLE_CHROMEEC_LPC
help help
@ -62,7 +61,7 @@ config EC_GOOGLE_CHROMEEC_ESPI
still needs to correctly configure the bus transactions. still needs to correctly configure the bus transactions.
config EC_GOOGLE_CHROMEEC_LPC config EC_GOOGLE_CHROMEEC_LPC
depends on EC_GOOGLE_CHROMEEC && ARCH_X86 # Needs Plug-and-play. depends on ARCH_X86 # Needs Plug-and-play.
def_bool n def_bool n
help help
Google Chrome EC via LPC bus. Google Chrome EC via LPC bus.
@ -75,13 +74,11 @@ config EC_GOOGLE_CHROMEEC_MEC
Microchip EC variant for LPC register access. Microchip EC variant for LPC register access.
config EC_GOOGLE_CHROMEEC_PD config EC_GOOGLE_CHROMEEC_PD
depends on EC_GOOGLE_CHROMEEC
def_bool n def_bool n
help help
Indicates that Google's Chrome USB PD chip is present. Indicates that Google's Chrome USB PD chip is present.
config EC_GOOGLE_CHROMEEC_SPI config EC_GOOGLE_CHROMEEC_SPI
depends on EC_GOOGLE_CHROMEEC
def_bool n def_bool n
help help
Google's Chrome EC via SPI bus. Google's Chrome EC via SPI bus.
@ -108,7 +105,6 @@ config EC_GOOGLE_CHROMEEC_SKUID
Provides common routine for reporting the skuid to ChromeOS. Provides common routine for reporting the skuid to ChromeOS.
config EC_GOOGLE_CHROMEEC_BOARDNAME config EC_GOOGLE_CHROMEEC_BOARDNAME
depends on EC_GOOGLE_CHROMEEC
string "Chrome EC board name for EC" string "Chrome EC board name for EC"
default "" default ""
help help
@ -126,7 +122,6 @@ config EC_GOOGLE_CHROMEEC_PD_BOARDNAME
build the EC firmware and add it to the image. build the EC firmware and add it to the image.
config EC_GOOGLE_CHROMEEC_RTC config EC_GOOGLE_CHROMEEC_RTC
depends on EC_GOOGLE_CHROMEEC
bool "Enable ChromeOS EC RTC" bool "Enable ChromeOS EC RTC"
help help
Enable support for the real-time clock on the ChromeOS EC. This Enable support for the real-time clock on the ChromeOS EC. This
@ -134,7 +129,6 @@ config EC_GOOGLE_CHROMEEC_RTC
choice choice
prompt "Chrome EC firmware source" prompt "Chrome EC firmware source"
depends on EC_GOOGLE_CHROMEEC
default EC_GOOGLE_CHROMEEC_FIRMWARE_BUILTIN if EC_GOOGLE_CHROMEEC_BOARDNAME != "" default EC_GOOGLE_CHROMEEC_FIRMWARE_BUILTIN if EC_GOOGLE_CHROMEEC_BOARDNAME != ""
default EC_GOOGLE_CHROMEEC_FIRMWARE_NONE default EC_GOOGLE_CHROMEEC_FIRMWARE_NONE
@ -193,7 +187,7 @@ config EC_GOOGLE_CHROMEEC_PD_FIRMWARE_FILE
The path and filename of the PD firmware file to use. The path and filename of the PD firmware file to use.
config EC_GOOGLE_CHROMEEC_SWITCHES config EC_GOOGLE_CHROMEEC_SWITCHES
depends on EC_GOOGLE_CHROMEEC && VBOOT depends on VBOOT
bool bool
help help
Enable support for ChromeOS mode switches provided by the ChromeOS Enable support for ChromeOS mode switches provided by the ChromeOS
@ -207,9 +201,10 @@ config EC_GOOGLE_CHROMEEC_INCLUDE_SSFC_IN_FW_CONFIG
32 bits of firmware configuration. 32 bits of firmware configuration.
config EC_GOOGLE_CHROMEEC_AUTO_FAN_CTRL config EC_GOOGLE_CHROMEEC_AUTO_FAN_CTRL
depends on EC_GOOGLE_CHROMEEC
bool "Enable automatic fan control" bool "Enable automatic fan control"
help help
Put the fan in auto mode at boot. Put the fan in auto mode at boot.
endif # EC_GOOGLE_CHROMEEC
source "src/ec/google/chromeec/*/Kconfig" source "src/ec/google/chromeec/*/Kconfig"