From de71b49e70320122a090134e5b2e18acdbb2fa3f Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Thu, 15 Dec 2022 12:13:47 +0000 Subject: zephyr: Kconfig: select SENSOR automatically There's only two EC drivers using the sensor API, set up Kconfig so that those enable the sensor subsystem automatically and drop a bunch of explicit config entries. BRANCH=none BUG=none TEST=zmake compare-builds -a Signed-off-by: Fabio Baltieri Change-Id: I444daf7b86cd0ef2ee3102ab085dbe3475f98c82 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4110699 Code-Coverage: Zoss Reviewed-by: Wai-Hong Tam --- zephyr/Kconfig.temperature | 1 + zephyr/program/brya/prj.conf | 1 - zephyr/program/intelrvp/mtlrvp/mtlrvpp_mchp/prj.conf | 1 - zephyr/program/intelrvp/prj.conf | 1 - zephyr/program/it8xxx2_evb/prj.conf | 3 --- zephyr/program/nissa/it8xxx2_program.conf | 1 - zephyr/program/nissa/npcx_program.conf | 1 - zephyr/program/npcx_evb/npcx7/prj.conf | 1 - zephyr/program/npcx_evb/npcx9/prj.conf | 1 - zephyr/program/rex/program.conf | 2 -- zephyr/program/skyrim/program.conf | 1 - zephyr/subsys/ap_pwrseq/Kconfig | 1 + 12 files changed, 2 insertions(+), 13 deletions(-) diff --git a/zephyr/Kconfig.temperature b/zephyr/Kconfig.temperature index 82bac6922f..b1f6e63c96 100644 --- a/zephyr/Kconfig.temperature +++ b/zephyr/Kconfig.temperature @@ -92,6 +92,7 @@ config PLATFORM_EC_FAN default y depends on DT_HAS_CROS_EC_FANS_ENABLED select PWM + select SENSOR help Enables support for fans. Allows periodic thermal task to automatically set the fan speed (control temperature). diff --git a/zephyr/program/brya/prj.conf b/zephyr/program/brya/prj.conf index 7658df1f42..eec0670295 100644 --- a/zephyr/program/brya/prj.conf +++ b/zephyr/program/brya/prj.conf @@ -53,7 +53,6 @@ CONFIG_PLATFORM_EC_CONSOLE_CMD_ACCEL_INFO=y CONFIG_PLATFORM_EC_CONSOLE_CMD_I2C_SPEED=y # Sensors -CONFIG_SENSOR=y CONFIG_SENSOR_SHELL=n CONFIG_PLATFORM_EC_MOTIONSENSE=y CONFIG_PLATFORM_EC_ACCEL_FIFO=y diff --git a/zephyr/program/intelrvp/mtlrvp/mtlrvpp_mchp/prj.conf b/zephyr/program/intelrvp/mtlrvp/mtlrvpp_mchp/prj.conf index 1992284d49..67fe94e3ed 100644 --- a/zephyr/program/intelrvp/mtlrvp/mtlrvpp_mchp/prj.conf +++ b/zephyr/program/intelrvp/mtlrvp/mtlrvpp_mchp/prj.conf @@ -32,7 +32,6 @@ CONFIG_PWM=y CONFIG_PWM_SHELL=n # Fan / PWM / TACH support -CONFIG_SENSOR=y CONFIG_SENSOR_SHELL=n # RTC diff --git a/zephyr/program/intelrvp/prj.conf b/zephyr/program/intelrvp/prj.conf index fdd9722f2f..ef58a3ac33 100644 --- a/zephyr/program/intelrvp/prj.conf +++ b/zephyr/program/intelrvp/prj.conf @@ -48,7 +48,6 @@ CONFIG_PLATFORM_EC_VOLUME_BUTTONS=y CONFIG_PLATFORM_EC_CMD_BUTTON=n # Sensors -CONFIG_SENSOR=y CONFIG_SENSOR_SHELL=n # Shell Commands diff --git a/zephyr/program/it8xxx2_evb/prj.conf b/zephyr/program/it8xxx2_evb/prj.conf index 7a608cb831..e6a1e866f9 100644 --- a/zephyr/program/it8xxx2_evb/prj.conf +++ b/zephyr/program/it8xxx2_evb/prj.conf @@ -13,9 +13,6 @@ CONFIG_AP_ARM_MTK_MT8192=y # Lid switch CONFIG_PLATFORM_EC_LID_SWITCH=y -# Fan -CONFIG_SENSOR=y - # Power Button CONFIG_PLATFORM_EC_POWER_BUTTON=y diff --git a/zephyr/program/nissa/it8xxx2_program.conf b/zephyr/program/nissa/it8xxx2_program.conf index f15e5123ab..241291112c 100644 --- a/zephyr/program/nissa/it8xxx2_program.conf +++ b/zephyr/program/nissa/it8xxx2_program.conf @@ -53,5 +53,4 @@ CONFIG_PLATFORM_EC_PD_MAX_VOLTAGE_MV=15000 CONFIG_PLATFORM_EC_USB_PD_DPS=n # VSENSE: PP3300_S5 & PP1050_PROC -CONFIG_SENSOR=y CONFIG_SENSOR_SHELL=n diff --git a/zephyr/program/nissa/npcx_program.conf b/zephyr/program/nissa/npcx_program.conf index 304ff7b378..ddbb267228 100644 --- a/zephyr/program/nissa/npcx_program.conf +++ b/zephyr/program/nissa/npcx_program.conf @@ -41,5 +41,4 @@ CONFIG_PLATFORM_EC_OCPC_DEF_RBATT_MOHMS=22 # VSENSE: PP3300_S5 & PP1050_PROC CONFIG_ADC_CMP_NPCX_WORKQUEUE=y CONFIG_ADC_CMP_NPCX_WORKQUEUE_PRIORITY=12 -CONFIG_SENSOR=y CONFIG_SENSOR_SHELL=n diff --git a/zephyr/program/npcx_evb/npcx7/prj.conf b/zephyr/program/npcx_evb/npcx7/prj.conf index f94c5ac2fa..2d26f9ad2f 100644 --- a/zephyr/program/npcx_evb/npcx7/prj.conf +++ b/zephyr/program/npcx_evb/npcx7/prj.conf @@ -19,7 +19,6 @@ CONFIG_PLATFORM_EC_VSTORE=n CONFIG_PLATFORM_EC_BOARD_VERSION_GPIO=y # Sensors -CONFIG_SENSOR=y CONFIG_SENSOR_SHELL=n # Console command diff --git a/zephyr/program/npcx_evb/npcx9/prj.conf b/zephyr/program/npcx_evb/npcx9/prj.conf index 73b263c830..68ef3b0e1d 100644 --- a/zephyr/program/npcx_evb/npcx9/prj.conf +++ b/zephyr/program/npcx_evb/npcx9/prj.conf @@ -23,7 +23,6 @@ CONFIG_PLATFORM_EC_WORKAROUND_FLASH_DOWNLOAD_API=y CONFIG_PLATFORM_EC_BOARD_VERSION_GPIO=y # Sensors -CONFIG_SENSOR=y CONFIG_SENSOR_SHELL=n # Console command diff --git a/zephyr/program/rex/program.conf b/zephyr/program/rex/program.conf index a6aec035c8..d62f675aea 100644 --- a/zephyr/program/rex/program.conf +++ b/zephyr/program/rex/program.conf @@ -51,7 +51,6 @@ CONFIG_AP_PWRSEQ_S0IX_ERROR_RECOVERY=y CONFIG_PLATFORM_EC_HOSTCMD_I2C_CONTROL=y # Temperature sensors -CONFIG_SENSOR=y CONFIG_PLATFORM_EC_TEMP_SENSOR_POWER=y # CBI EEPROM support @@ -127,7 +126,6 @@ CONFIG_PLATFORM_EC_CONSOLE_CMD_ACCEL_INFO=y CONFIG_PLATFORM_EC_CONSOLE_CMD_I2C_SPEED=y # Sensors -CONFIG_SENSOR=y CONFIG_SENSOR_SHELL=n CONFIG_PLATFORM_EC_MOTIONSENSE=y CONFIG_PLATFORM_EC_ACCEL_FIFO=y diff --git a/zephyr/program/skyrim/program.conf b/zephyr/program/skyrim/program.conf index dc8c604569..ef7f5d08e2 100644 --- a/zephyr/program/skyrim/program.conf +++ b/zephyr/program/skyrim/program.conf @@ -48,7 +48,6 @@ CONFIG_PLATFORM_EC_BACKLIGHT_LID=y CONFIG_PLATFORM_EC_BACKLIGHT_LID_ACTIVE_LOW=y # Sensors -CONFIG_SENSOR=y CONFIG_SENSOR_SHELL=n # Lid switch diff --git a/zephyr/subsys/ap_pwrseq/Kconfig b/zephyr/subsys/ap_pwrseq/Kconfig index 3e9edcf9be..e16637c263 100644 --- a/zephyr/subsys/ap_pwrseq/Kconfig +++ b/zephyr/subsys/ap_pwrseq/Kconfig @@ -27,6 +27,7 @@ config AP_PWRSEQ_SIGNAL_ADC bool default y depends on DT_HAS_INTEL_AP_PWRSEQ_ADC_ENABLED + select SENSOR help Helper symbol to enable ADC based power sequencing. -- cgit v1.2.1