From b41c0159a88df8558ae6da3ee268afb19501f64d Mon Sep 17 00:00:00 2001 From: Vincenzo Frascino Date: Tue, 29 Nov 2016 11:13:49 +0000 Subject: [PATCH] watchdog: Refactor main Kconfig file This patch refactors the main Kconfig file in order to align it with the Zephyr code style and to make sure that each Kconfig configuration portion is easily identifiable. Change-Id: Ib226aaa9a98e9b08a47d9d1c329f18f4f6936620 Signed-off-by: Vincenzo Frascino --- drivers/watchdog/Kconfig | 30 ++-------------------- drivers/watchdog/Kconfig.qmsi | 46 ++++++++++++++++++++++++++++++++++ drivers/watchdog/Kconfig.stm32 | 28 ++++++++++----------- 3 files changed, 62 insertions(+), 42 deletions(-) create mode 100644 drivers/watchdog/Kconfig.qmsi diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 3a91b49e9ad..75262f046f1 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -24,37 +24,11 @@ menuconfig WATCHDOG prompt "Watchdog Support" default n help - Include support for watchdogs. + Include support for watchdogs. if WATCHDOG -config WDT_QMSI - bool "QMSI Watchdog driver" - default n - help - This option enables the QMSI watchdog driver. - This driver is simply a shim driver based on the watchdog - driver provided by the QMSI BSP. - -config WDT_0_NAME - string "Watchdog driver instance name" - default "WATCHDOG_0" - help - Watchdog driver instance name - -config WDT_0_IRQ_PRI - int "Interrupt priority" - depends on WDT_QMSI - help - Watchdog interrupt priority - -config WDT_QMSI_API_REENTRANCY - bool - prompt "WDT shim driver API reentrancy" - depends on WDT_QMSI - default n - help - Enable support for WDT shim driver API reentrancy. +source "drivers/watchdog/Kconfig.qmsi" source "drivers/watchdog/Kconfig.stm32" diff --git a/drivers/watchdog/Kconfig.qmsi b/drivers/watchdog/Kconfig.qmsi new file mode 100644 index 00000000000..0d4eb0bfacb --- /dev/null +++ b/drivers/watchdog/Kconfig.qmsi @@ -0,0 +1,46 @@ +# Kconfig - Watchdog configuration options for QMSI WDT +# +# +# Copyright (c) 2015 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +config WDT_QMSI + bool "QMSI Watchdog driver" + default n + help + This option enables the QMSI watchdog driver. + This driver is simply a shim driver based on the watchdog + driver provided by the QMSI BSP. + +config WDT_0_NAME + string "Watchdog driver instance name" + default "WATCHDOG_0" + depends on WDT_QMSI + help + Watchdog driver instance name + +config WDT_0_IRQ_PRI + int "Interrupt priority" + depends on WDT_QMSI + help + Watchdog interrupt priority + +config WDT_QMSI_API_REENTRANCY + bool + prompt "WDT shim driver API reentrancy" + depends on WDT_QMSI + default n + help + Enable support for WDT shim driver API reentrancy. diff --git a/drivers/watchdog/Kconfig.stm32 b/drivers/watchdog/Kconfig.stm32 index 95a4fece448..0d3c73a87d5 100644 --- a/drivers/watchdog/Kconfig.stm32 +++ b/drivers/watchdog/Kconfig.stm32 @@ -20,7 +20,7 @@ if SOC_FAMILY_STM32 config IWDG_STM32 bool "Independent Watchdog (IWDG) Driver for STM32 family of MCUs" help - Enable IWDG driver for STM32 line of MCUs + Enable IWDG driver for STM32 line of MCUs config IWDG_STM32_PRESCALER int "Prescaler divider for clock feeding the IWDG" @@ -28,11 +28,11 @@ config IWDG_STM32_PRESCALER default 4 range 4 256 help - Set the prescaler divider for the clock feeding the Independent - Watchdog. Higher values indicate that the watchdog will need to - be reloaded more frequently. Allowed values: 4, 8, 16, 32, 64, - 128, 256. This setting combined with reload counter defines the - watchdog countdown time. + Set the prescaler divider for the clock feeding the Independent + Watchdog. Higher values indicate that the watchdog will need to + be reloaded more frequently. Allowed values: 4, 8, 16, 32, 64, + 128, 256. This setting combined with reload counter defines the + watchdog countdown time. config IWDG_STM32_RELOAD_COUNTER int "Value for IWDG counter" @@ -40,25 +40,25 @@ config IWDG_STM32_RELOAD_COUNTER default 2048 range 0 4095 help - Configure the value to be loaded into the watchdog's counter each - time a reload operation is performed. This value combined with - prescaler setting defines the watchdog countdown time. + Configure the value to be loaded into the watchdog's counter each + time a reload operation is performed. This value combined with + prescaler setting defines the watchdog countdown time. config IWDG_STM32_START_AT_BOOT bool "Start IWDG during boot" depends on IWDG_STM32 default n help - Enable this setting to allow IWDG to be automatically started - during device initialization. Note that once IWDG is started - it must be reloaded before the counter reaches 0, otherwise - the MCU will be reset. + Enable this setting to allow IWDG to be automatically started + during device initialization. Note that once IWDG is started + it must be reloaded before the counter reaches 0, otherwise + the MCU will be reset. config IWDG_STM32_DEVICE_NAME string "Device name for Independent Watchdog (IWDG)" depends on IWDG_STM32 default "IWDG" help - Set the name used by IWDG device during registration. + Set the name used by IWDG device during registration. endif # SOC_FAMILY_STM32