Linus Walleij aeffd2c3b0 usb: fotg210: Compile into one module
It is since ages perfectly possible to compile both of these
modules into the same kernel, which makes no sense since it
is one piece of hardware.

Compile one module named "fotg210.ko" for both HCD and UDC
drivers by collecting the init calls into a fotg210-core.c
file and start to centralize things handling one and the same
piece of hardware.

Stub out the initcalls if one or the other part of the driver
was not selected.

Tested by compiling one or the other or both of the drivers
into the kernel and as modules.

Cc: Fabian Vogt <fabian@ritter-vogt.de>
Cc: Yuan-Hsin Chen <yhchen@faraday-tech.com>
Cc: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20221023144708.3596563-2-linus.walleij@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-11-09 12:38:09 +01:00

37 lines
1.1 KiB
Plaintext

# SPDX-License-Identifier: GPL-2.0
config USB_FOTG210
tristate "Faraday FOTG210 USB2 Dual Role controller"
depends on USB || USB_GADGET
depends on HAS_DMA && HAS_IOMEM
default ARCH_GEMINI
help
Faraday FOTG210 is a dual-mode USB controller that can act
in both host controller and peripheral controller mode.
if USB_FOTG210
config USB_FOTG210_HCD
bool "Faraday FOTG210 USB Host Controller support"
depends on USB
help
Faraday FOTG210 is an OTG controller which can be configured as
an USB2.0 host. It is designed to meet USB2.0 EHCI specification
with minor modification.
To compile this driver as a module, choose M here: the
module will be called fotg210-hcd.
config USB_FOTG210_UDC
depends on USB_GADGET
bool "Faraday FOTG210 USB Peripheral Controller support"
help
Faraday USB2.0 OTG controller which can be configured as
high speed or full speed USB device. This driver suppports
Bulk Transfer so far.
Say "y" to link the driver statically, or "m" to build a
dynamically linked module called "fotg210-udc".
endif