From 78e24541e6d397a0420dc1e6c7852aacc2b1dcb8 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Sun, 9 Oct 2022 11:48:58 +0200 Subject: [PATCH] drivers/periph_usbdev: move Kconfig to a separate file --- drivers/periph_common/Kconfig | 34 +-------------------- drivers/periph_common/Kconfig.usbdev | 45 ++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 33 deletions(-) create mode 100644 drivers/periph_common/Kconfig.usbdev diff --git a/drivers/periph_common/Kconfig b/drivers/periph_common/Kconfig index 67d5d8667f..4a9306642e 100644 --- a/drivers/periph_common/Kconfig +++ b/drivers/periph_common/Kconfig @@ -156,39 +156,7 @@ config MODULE_PERIPH_INIT_TEMPERATURE depends on MODULE_PERIPH_TEMPERATURE rsource "Kconfig.uart" - -config MODULE_PERIPH_USBDEV - bool "USBDEV peripheral driver" - depends on HAS_PERIPH_USBDEV - select MODULE_PERIPH_COMMON - select MODULE_PERIPH_USBDEV_CLK - -config MODULE_PERIPH_INIT_USBDEV - bool "Auto initialize USBDEV peripheral" - default y if MODULE_PERIPH_INIT - depends on MODULE_PERIPH_USBDEV - -config MODULE_PERIPH_USBDEV_HS_ULPI - bool "Use USB HS pripheral with UPLI HS PHY" - depends on HAS_PERIPH_USBDEV_HS_ULPI - depends on MODULE_PERIPH_USBDEV - -config MODULE_PERIPH_INIT_USBDEV_HS_ULPI - bool - default y if MODULE_PERIPH_INIT && MODULE_PERIPH_USBDEV_HS_ULPI - depends on HAS_PERIPH_USBDEV_HS_ULPI - depends on MODULE_PERIPH_USBDEV - -config MODULE_PERIPH_USBDEV_CLK - bool - depends on HAS_PERIPH_USBDEV - help - Enable the USB device specific clock settings, if there are any - -config MODULE_PERIPH_INIT_USBDEV_CLK - bool - default y if MODULE_PERIPH_INIT && MODULE_PERIPH_USBDEV_CLK - depends on HAS_PERIPH_USBDEV +rsource "Kconfig.usbdev" endif # TEST_KCONFIG diff --git a/drivers/periph_common/Kconfig.usbdev b/drivers/periph_common/Kconfig.usbdev new file mode 100644 index 0000000000..2a94fe7ed0 --- /dev/null +++ b/drivers/periph_common/Kconfig.usbdev @@ -0,0 +1,45 @@ +# Copyright (c) 2020 HAW Hamburg +# 2022 Gunar Schorcht +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. +# + +menuconfig MODULE_PERIPH_USBDEV + bool "USBDEV peripheral driver" + depends on HAS_PERIPH_USBDEV + select MODULE_PERIPH_COMMON + select MODULE_PERIPH_USBDEV_CLK + +if MODULE_PERIPH_USBDEV + +# TODO: the 'init' modules are actually just artifacts from the way +# periph_init_% modules are handled in Makefile. We need to define them to keep +# the list the same for now. We should be able to remove them later on. + +config MODULE_PERIPH_INIT_USBDEV + bool "Auto initialize USBDEV peripheral" + default y if MODULE_PERIPH_INIT + +config MODULE_PERIPH_USBDEV_HS_ULPI + bool "Use USB HS peripheral with ULPI HS PHY" + depends on HAS_PERIPH_USBDEV_HS_ULPI + +config MODULE_PERIPH_INIT_USBDEV_HS_ULPI + bool + depends on MODULE_PERIPH_USBDEV_HS_ULPI + default y if MODULE_PERIPH_INIT + +endif + +config MODULE_PERIPH_USBDEV_CLK + bool + depends on HAS_PERIPH_USBDEV + help + Enable the USB device specific clock settings, if there are any + +config MODULE_PERIPH_INIT_USBDEV_CLK + bool + depends on MODULE_PERIPH_USBDEV_CLK + default y if MODULE_PERIPH_INIT