summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Baltieri <fabiobaltieri@google.com>2022-04-14 13:27:51 +0000
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-04-14 20:33:29 +0000
commit982ccd411a167d3a9adc4777997d3742fad2dbf9 (patch)
tree72fce9434e92e61dcb6a27fd236789c851ae82a6
parent265691a2fe290e0fa54ecccba151a5c63dd73e47 (diff)
downloadchrome-ec-982ccd411a167d3a9adc4777997d3742fad2dbf9.tar.gz
zephyr: Kconfig: fix few choice symbols format
Choice entries expects a symbol (or nothing) as the argument. The symbol is only used to have choices in multiple files (which we don't) and for documentation referencing. This renames few instances of descriptions where there should be a symbol around various Kconfig files, and cleans up various choice/endchoice definition cosmetic inconsistencies. BUG=none BRANCH=none TEST=ninja menuconfig Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Link: https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html#kconfig-syntax Change-Id: I040bc9008d6c97bf96d8cf4f37384504ccda78b1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3586429 Reviewed-by: Sam Hurst <shurst@google.com>
-rw-r--r--zephyr/Kconfig4
-rw-r--r--zephyr/Kconfig.battery8
-rw-r--r--zephyr/Kconfig.charger10
-rw-r--r--zephyr/Kconfig.debug_assert5
-rw-r--r--zephyr/Kconfig.keyboard14
-rw-r--r--zephyr/Kconfig.pd_discharge4
-rw-r--r--zephyr/Kconfig.pd_frs4
-rw-r--r--zephyr/Kconfig.pd_meas_vbus4
-rw-r--r--zephyr/Kconfig.pd_usbc_device_type4
-rw-r--r--zephyr/Kconfig.pd_vbus_detection2
-rw-r--r--zephyr/Kconfig.tcpm4
-rw-r--r--zephyr/drivers/cros_rtc/Kconfig2
12 files changed, 33 insertions, 32 deletions
diff --git a/zephyr/Kconfig b/zephyr/Kconfig
index cbcb0bee4b..dacdb13e92 100644
--- a/zephyr/Kconfig
+++ b/zephyr/Kconfig
@@ -570,7 +570,7 @@ config PLATFORM_EC_RTC
to the outside world and can often obtain the current time when
desired.
-choice "SHA256 method"
+choice PLATFORM_EC_SHA256_MODE
prompt "Select method to use for computing SHA256 hashes"
help
The verified boot mechanism requests the hash of the entire read-write
@@ -594,7 +594,7 @@ config PLATFORM_EC_SHA256_HW_ACCELERATE
The chip support must implement the functions in sha256.h
-endchoice # SHA256 method
+endchoice # PLATFORM_EC_SHA256_MODE
config PLATFORM_EC_SWITCH
bool "Memory mapped switches"
diff --git a/zephyr/Kconfig.battery b/zephyr/Kconfig.battery
index 603542703e..6f99b99729 100644
--- a/zephyr/Kconfig.battery
+++ b/zephyr/Kconfig.battery
@@ -14,7 +14,7 @@ menuconfig PLATFORM_EC_BATTERY
if PLATFORM_EC_BATTERY
-choice "Battery select"
+choice PLATFORM_EC_BATTERY_SELECT
prompt "Select the battery to use"
help
Select the battery used on the board. If you are ensure, select the
@@ -30,9 +30,9 @@ config PLATFORM_EC_BATTERY_SMART
See here for the spec: http://sbs-forum.org/specs/sbdat110.pdf
-endchoice
+endchoice # PLATFORM_EC_BATTERY_SELECT
-choice "Battery presence detection"
+choice PLATFORM_EC_BATTERY_PRESENT_MODE
prompt "Method to use to detect the battery"
help
This selects the method to use to detect the presence of a battery.
@@ -70,7 +70,7 @@ config PLATFORM_EC_BATTERY_PRESENT_GPIO
/* gpio_map.h */
#define GPIO_BATT_PRES_ODL NAMED_GPIO(ec_batt_pres_odl)
-endchoice # battery presence
+endchoice # PLATFORM_EC_BATTERY_PRESENT_MODE
config PLATFORM_EC_USE_BATTERY_DEVICE_CHEMISTRY
bool "Provide information about battery chemistry"
diff --git a/zephyr/Kconfig.charger b/zephyr/Kconfig.charger
index 8b1b15d4ff..18b77cee52 100644
--- a/zephyr/Kconfig.charger
+++ b/zephyr/Kconfig.charger
@@ -35,7 +35,7 @@ config PLATFORM_EC_OCPC
Additionally, `chgnum` is assumed to be the same as the
charge port index.
-endchoice # PLATFORM_EC_CHARGER_TYPE
+endchoice # PLATFORM_EC_CHARGER_TYPE
config PLATFORM_EC_CHARGER_RUNTIME_CONFIG
bool "Allow charger configuration at runtime"
@@ -190,7 +190,7 @@ config PLATFORM_EC_CHARGER_DISCHARGE_ON_AC
if PLATFORM_EC_CHARGER_DISCHARGE_ON_AC
-choice "Discharge control method"
+choice PLATFORM_EC_CHARGER_DISCHARGE_MODE
prompt "Select the method of controlling discharge"
help
Select which method is provided to enable and disable the discharge
@@ -218,9 +218,9 @@ config PLATFORM_EC_CHARGER_DISCHARGE_ON_AC_CUSTOM
It should enable this feature if enabled is true, else disable it.
The function should return EC_SUCCESS
-endchoice # "Discharge control method"
+endchoice # PLATFORM_EC_CHARGER_DISCHARGE_MODE
-endif # PLATFORM_EC_CHARGER_DISCHARGE_ON_AC
+endif # PLATFORM_EC_CHARGER_DISCHARGE_ON_AC
config PLATFORM_EC_CHARGER_BQ25710_PSYS_SENSING
bool "Charger monitors PSYS"
@@ -598,7 +598,7 @@ config PLATFORM_EC_CHARGE_RAMP_SW
current needs of the device. It handles the user plugging chargers in
and removing them.
-endchoice # PLATFORM_EC_CHARGE_RAMP_TYPE
+endchoice # PLATFORM_EC_CHARGE_RAMP_TYPE
config PLATFORM_EC_CONSOLE_CMD_CHARGER_ADC_AMON_BMON
bool "Console command: amonbmon"
diff --git a/zephyr/Kconfig.debug_assert b/zephyr/Kconfig.debug_assert
index d568bc7e34..ad94f525f6 100644
--- a/zephyr/Kconfig.debug_assert
+++ b/zephyr/Kconfig.debug_assert
@@ -3,7 +3,8 @@
# found in the LICENSE file.
if PLATFORM_EC_DEBUG_ASSERT
-choice "Behaviour on assertion failure"
+
+choice PLATFORM_EC_DEBUG_ASSERT_MODE
prompt "Select behaviour on assertion failure"
help
This selects the action taken when the board hits an assertion
@@ -26,7 +27,7 @@ config PLATFORM_EC_DEBUG_ASSERT_BREAKPOINT
from there. If there is no debugger connected then the breakpoint
instruction will cause the board to reboot immediately.
-endchoice # "Behaviour on assertion failure"
+endchoice # PLATFORM_EC_DEBUG_ASSERT_MODE
config PLATFORM_EC_DEBUG_ASSERT_BRIEF
bool "Use brief assertion-failure messages"
diff --git a/zephyr/Kconfig.keyboard b/zephyr/Kconfig.keyboard
index 41805be43b..90c65e387d 100644
--- a/zephyr/Kconfig.keyboard
+++ b/zephyr/Kconfig.keyboard
@@ -19,7 +19,7 @@ menuconfig PLATFORM_EC_KEYBOARD
if PLATFORM_EC_KEYBOARD
-choice "Protocol select"
+choice PLATFORM_EC_KEYBOARD_PROTOCOL_MODE
prompt "Select the keyboard protocol to use"
help
Select the keyboard protocol used to communicate key presses to the
@@ -46,7 +46,7 @@ config PLATFORM_EC_KEYBOARD_PROTOCOL_MKBP
(row, col), to the AP and the kernel driver will map this scan code to
a key.
-endchoice # PLATFORM_EC_KEYBOARD
+endchoice # PLATFORM_EC_KEYBOARD_PROTOCOL_MODE
config PLATFORM_EC_KEYBOARD_DEBUG
bool "Enable keyboard debug prints"
@@ -76,7 +76,7 @@ config PLATFORM_EC_KEYBOARD_VIVALDI
- A response to EC_CMD_GET_KEYBD_CONFIG command.
- Boards can specify their custom layout for top keys.
-choice "Power button interference"
+choice PLATFORM_EC_KEYBOARD_PWRBTN_MODE
prompt "Select the impact of pressing the power button"
help
On some boards one of the keyboard-scan inputs is affected by pressing
@@ -103,7 +103,7 @@ config PLATFORM_EC_KEYBOARD_PWRBTN_ASSERTS_KSI3
power button is held. We must be aware of this case in order to
correctly handle recovery-mode key combinations.
-endchoice # "Power button interference"
+endchoice # PLATFORM_EC_KEYBOARD_PWRBTN_MODE
config PLATFORM_EC_KEYBOARD_COL2_INVERTED
bool "A mechanism for passing KSO2 to H1 which inverts the signal"
@@ -174,7 +174,7 @@ config PLATFORM_EC_CONSOLE_CMD_KEYBOARD
kblog - Print or toggle keyboard event log (current disabled)
typematic - Get/set typematic delays
-choice
+choice PLATFORM_EC_KBLIGHT_MODE
prompt "Keyboard backlight"
optional
help
@@ -195,7 +195,7 @@ config PLATFORM_EC_PWM_KBLIGHT
connected directly to the EC chipset. The board devicetree file must
define a "cros-ec,kblight-pwm" compatible device node.
-endchoice # Keyboard backlight
+endchoice # PLATFORM_EC_KBLIGHT_MODE
config PLATFORM_EC_KBLIGHT_ENABLE_PIN
bool "Keyboard backlight enable pin"
@@ -240,7 +240,7 @@ config PLATFORM_EC_RGBKBD_DEMO_DOT
left to right. After the entire matrix is traversed, it's repeated with
a new color.
-endchoice # PLATFORM_EC_RGBKBD_DEMO
+endchoice # PLATFORM_EC_RGBKBD_DEMO
config PLATFORM_EC_LED_DRIVER_IS31FL3743B
bool "Driver for IS31FL3743B LED controller"
diff --git a/zephyr/Kconfig.pd_discharge b/zephyr/Kconfig.pd_discharge
index f6b48404e3..3631beffa7 100644
--- a/zephyr/Kconfig.pd_discharge
+++ b/zephyr/Kconfig.pd_discharge
@@ -13,7 +13,7 @@ config PLATFORM_EC_USB_PD_DISCHARGE
GPIO-controlled discharge circuit, or through port controller
registers) to discharge VBUS rapidly on disconnect
-choice "Discharge method"
+choice PLATFORM_EC_USB_PD_DISCHARGE_MODE
prompt "Select the discharge method"
depends on PLATFORM_EC_USB_PD_DISCHARGE
@@ -36,7 +36,7 @@ config PLATFORM_EC_USB_PD_DISCHARGE_PPC
Enable this if the discharge circuit is using Power Delivery
resistors on the Power Path Controller.
-endchoice # Discharge method
+endchoice # PLATFORM_EC_USB_PD_DISCHARGE_MODE
endif # PLATFORM_EC_USB_POWER_DELIVERY
endif # PLATFORM_EC_USBC
diff --git a/zephyr/Kconfig.pd_frs b/zephyr/Kconfig.pd_frs
index 4d1ce5cacc..8883542c56 100644
--- a/zephyr/Kconfig.pd_frs
+++ b/zephyr/Kconfig.pd_frs
@@ -22,7 +22,7 @@ config PLATFORM_EC_USB_PD_FRS
if PLATFORM_EC_USB_PD_FRS
-choice "Trigger implementation"
+choice PLATFORM_EC_USB_PD_FRS_MODE
prompt "Select where the trigger is implemented"
help
The Fast Role Swap (protocol requires that a trigger be implemented to
@@ -42,7 +42,7 @@ config PLATFORM_EC_USB_PD_FRS_TCPC
Enable this if the Fast Role Swap trigger is implemented in the
Type-C Port Controller (TCPC).
-endchoice # Trigger implementation
+endchoice # PLATFORM_EC_USB_PD_FRS_MODE
endif # PLATFORM_EC_USB_PD_FRS
diff --git a/zephyr/Kconfig.pd_meas_vbus b/zephyr/Kconfig.pd_meas_vbus
index 7597e7045a..9cf0edec0a 100644
--- a/zephyr/Kconfig.pd_meas_vbus
+++ b/zephyr/Kconfig.pd_meas_vbus
@@ -5,7 +5,7 @@
if PLATFORM_EC_USBC
if PLATFORM_EC_USB_POWER_DELIVERY
-choice "Measuring VBUS voltage"
+choice PLATFORM_EC_USB_PD_VBUS_MEASURE_MODE
prompt "Select how VBUS voltage is measured"
optional
@@ -39,7 +39,7 @@ config PLATFORM_EC_USB_PD_VBUS_MEASURE_BY_BOARD
Enable this if there are different VBUS measurement approaches on
the board, and also `board_get_vbus_voltage()` has to be implemented.
-endchoice # Measuring VBUS voltage
+endchoice # PLATFORM_EC_USB_PD_VBUS_MEASURE_MODE
endif # PLATFORM_EC_USB_POWER_DELIVERY
endif # PLATFORM_EC_USBC
diff --git a/zephyr/Kconfig.pd_usbc_device_type b/zephyr/Kconfig.pd_usbc_device_type
index 1daa9fcb92..4bf1a2d442 100644
--- a/zephyr/Kconfig.pd_usbc_device_type
+++ b/zephyr/Kconfig.pd_usbc_device_type
@@ -5,7 +5,7 @@
if PLATFORM_EC_USBC
if PLATFORM_EC_USB_POWER_DELIVERY
-choice "USB-C device type"
+choice PLATFORM_EC_USB_DEVICE_TYPE
prompt "Select the USB-C device type"
default PLATFORM_EC_USB_DRP_ACC_TRYSRC
@@ -33,7 +33,7 @@ config PLATFORM_EC_USB_DRP_ACC_TRYSRC
a dual-role capacity, so that power can be accepted or supplied on
a port.
-endchoice # USB-C device type
+endchoice # PLATFORM_EC_USB_DEVICE_TYPE
endif # PLATFORM_EC_USB_POWER_DELIVERY
endif # PLATFORM_EC_USBC
diff --git a/zephyr/Kconfig.pd_vbus_detection b/zephyr/Kconfig.pd_vbus_detection
index dd3607aac6..f3f410c9dc 100644
--- a/zephyr/Kconfig.pd_vbus_detection
+++ b/zephyr/Kconfig.pd_vbus_detection
@@ -32,7 +32,7 @@ config PLATFORM_EC_USB_PD_VBUS_DETECT_PPC
Choose this option if the Power-Path Controller (PPC) can detect the
presence of VBUS
-endchoice # PLATFORM_EC_USB_PD_VBUS_DETECTION_TYPE
+endchoice # PLATFORM_EC_USB_PD_VBUS_DETECTION_TYPE
endif # PLATFORM_EC_USB_POWER_DELIVERY
endif # PLATFORM_EC_USBC
diff --git a/zephyr/Kconfig.tcpm b/zephyr/Kconfig.tcpm
index 4d0c13dbab..779941a460 100644
--- a/zephyr/Kconfig.tcpm
+++ b/zephyr/Kconfig.tcpm
@@ -4,7 +4,7 @@
if PLATFORM_EC_USBC
-choice "Type-C Port Manager (TCPM)"
+choice PLATFORM_EC_USB_PD_TCPM_TYPE
prompt "Choose a Type-C Port Manager (TCPM) to manage TCPC"
config PLATFORM_EC_USB_PD_TCPM_TCPCI
@@ -29,7 +29,7 @@ config PLATFORM_EC_USB_PD_TCPM_TCPCI
# CONFIG_USB_PD_TCPM_STM32GX
# CONFIG_USB_PD_TCPM_CCGXXF
-endchoice # Type-C Port Manager (TCPM)
+endchoice # PLATFORM_EC_USB_PD_TCPM_TYPE
if PLATFORM_EC_USB_PD_TCPM_TCPCI
diff --git a/zephyr/drivers/cros_rtc/Kconfig b/zephyr/drivers/cros_rtc/Kconfig
index 99cdb6b47d..50a4d00022 100644
--- a/zephyr/drivers/cros_rtc/Kconfig
+++ b/zephyr/drivers/cros_rtc/Kconfig
@@ -38,6 +38,6 @@ config CROS_RTC_RENESAS_IDT1337AG
This option enables a driver for providing the support of RENESAS
Real-Time Clock (RTC) on the the I2C bus.
-endchoice # RTC Select
+endchoice # CROS_RTC_TYPE
endif # PLATFORM_EC_RTC