Commit 5a8d651a authored by Felipe Balbi's avatar Felipe Balbi

usb: gadget: move gadget API functions to udc-core

instead of defining all functions as static inlines,
let's move them to udc-core and export them with
EXPORT_SYMBOL_GPL, that way we can make sure that
only GPL drivers will use them.

As a side effect, it'll be nicer to add tracepoints
to the gadget API.

While at that, also fix Kconfig dependencies to
avoid randconfig build failures.
Acked-By: default avatarSebastian Reichel <sre@kernel.org>
Acked-by: default avatarPeter Chen <peter.chen@nxp.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent d6dc2e76
...@@ -176,6 +176,7 @@ config TWL4030_USB ...@@ -176,6 +176,7 @@ config TWL4030_USB
tristate "TWL4030 USB Transceiver Driver" tristate "TWL4030 USB Transceiver Driver"
depends on TWL4030_CORE && REGULATOR_TWL4030 && USB_MUSB_OMAP2PLUS depends on TWL4030_CORE && REGULATOR_TWL4030 && USB_MUSB_OMAP2PLUS
depends on USB_SUPPORT depends on USB_SUPPORT
depends on USB_GADGET || !USB_GADGET # if USB_GADGET=m, this can't 'y'
select GENERIC_PHY select GENERIC_PHY
select USB_PHY select USB_PHY
help help
......
...@@ -309,6 +309,7 @@ config BATTERY_RX51 ...@@ -309,6 +309,7 @@ config BATTERY_RX51
config CHARGER_ISP1704 config CHARGER_ISP1704
tristate "ISP1704 USB Charger Detection" tristate "ISP1704 USB Charger Detection"
depends on USB_PHY depends on USB_PHY
depends on USB_GADGET || !USB_GADGET # if USB_GADGET=m, this can't be 'y'
help help
Say Y to enable support for USB Charger Detection with Say Y to enable support for USB Charger Detection with
ISP1707/ISP1704 USB transceivers. ISP1707/ISP1704 USB transceivers.
......
This diff is collapsed.
...@@ -180,7 +180,7 @@ config USB_EHCI_MXC ...@@ -180,7 +180,7 @@ config USB_EHCI_MXC
config USB_EHCI_HCD_OMAP config USB_EHCI_HCD_OMAP
tristate "EHCI support for OMAP3 and later chips" tristate "EHCI support for OMAP3 and later chips"
depends on ARCH_OMAP depends on ARCH_OMAP
select NOP_USB_XCEIV depends on NOP_USB_XCEIV
default y default y
---help--- ---help---
Enables support for the on-chip EHCI controller on Enables support for the on-chip EHCI controller on
......
...@@ -21,6 +21,7 @@ config AB8500_USB ...@@ -21,6 +21,7 @@ config AB8500_USB
config FSL_USB2_OTG config FSL_USB2_OTG
bool "Freescale USB OTG Transceiver Driver" bool "Freescale USB OTG Transceiver Driver"
depends on USB_EHCI_FSL && USB_FSL_USB2 && USB_OTG_FSM && PM depends on USB_EHCI_FSL && USB_FSL_USB2 && USB_OTG_FSM && PM
depends on USB_GADGET || !USB_GADGET # if USB_GADGET=m, this can't be 'y'
select USB_PHY select USB_PHY
help help
Enable this to support Freescale USB OTG transceiver. Enable this to support Freescale USB OTG transceiver.
...@@ -29,6 +30,7 @@ config ISP1301_OMAP ...@@ -29,6 +30,7 @@ config ISP1301_OMAP
tristate "Philips ISP1301 with OMAP OTG" tristate "Philips ISP1301 with OMAP OTG"
depends on I2C && ARCH_OMAP_OTG depends on I2C && ARCH_OMAP_OTG
depends on USB depends on USB
depends on USB_GADGET || !USB_GADGET # if USB_GADGET=m, this can't be 'y'
select USB_PHY select USB_PHY
help help
If you say yes here you get support for the Philips ISP1301 If you say yes here you get support for the Philips ISP1301
...@@ -43,7 +45,7 @@ config ISP1301_OMAP ...@@ -43,7 +45,7 @@ config ISP1301_OMAP
config KEYSTONE_USB_PHY config KEYSTONE_USB_PHY
tristate "Keystone USB PHY Driver" tristate "Keystone USB PHY Driver"
depends on ARCH_KEYSTONE || COMPILE_TEST depends on ARCH_KEYSTONE || COMPILE_TEST
select NOP_USB_XCEIV depends on NOP_USB_XCEIV
help help
Enable this to support Keystone USB phy. This driver provides Enable this to support Keystone USB phy. This driver provides
interface to interact with USB 2.0 and USB 3.0 PHY that is part interface to interact with USB 2.0 and USB 3.0 PHY that is part
...@@ -51,6 +53,7 @@ config KEYSTONE_USB_PHY ...@@ -51,6 +53,7 @@ config KEYSTONE_USB_PHY
config NOP_USB_XCEIV config NOP_USB_XCEIV
tristate "NOP USB Transceiver Driver" tristate "NOP USB Transceiver Driver"
depends on USB_GADGET || !USB_GADGET # if USB_GADGET=m, NOP can't be built-in
select USB_PHY select USB_PHY
help help
This driver is to be used by all the usb transceiver which are either This driver is to be used by all the usb transceiver which are either
...@@ -63,9 +66,9 @@ config AM335X_CONTROL_USB ...@@ -63,9 +66,9 @@ config AM335X_CONTROL_USB
config AM335X_PHY_USB config AM335X_PHY_USB
tristate "AM335x USB PHY Driver" tristate "AM335x USB PHY Driver"
depends on ARM || COMPILE_TEST depends on ARM || COMPILE_TEST
depends on NOP_USB_XCEIV
select USB_PHY select USB_PHY
select AM335X_CONTROL_USB select AM335X_CONTROL_USB
select NOP_USB_XCEIV
select USB_COMMON select USB_COMMON
help help
This driver provides PHY support for that phy which part for the This driver provides PHY support for that phy which part for the
...@@ -92,6 +95,7 @@ config TWL6030_USB ...@@ -92,6 +95,7 @@ config TWL6030_USB
config USB_GPIO_VBUS config USB_GPIO_VBUS
tristate "GPIO based peripheral-only VBUS sensing 'transceiver'" tristate "GPIO based peripheral-only VBUS sensing 'transceiver'"
depends on GPIOLIB || COMPILE_TEST depends on GPIOLIB || COMPILE_TEST
depends on USB_GADGET || !USB_GADGET # if USB_GADGET=m, this can't be 'y'
select USB_PHY select USB_PHY
help help
Provides simple GPIO VBUS sensing for controllers with an Provides simple GPIO VBUS sensing for controllers with an
...@@ -112,6 +116,7 @@ config OMAP_OTG ...@@ -112,6 +116,7 @@ config OMAP_OTG
config TAHVO_USB config TAHVO_USB
tristate "Tahvo USB transceiver driver" tristate "Tahvo USB transceiver driver"
depends on MFD_RETU && EXTCON depends on MFD_RETU && EXTCON
depends on USB_GADGET || !USB_GADGET # if USB_GADGET=m, this can't be 'y'
select USB_PHY select USB_PHY
help help
Enable this to support USB transceiver on Tahvo. This is used Enable this to support USB transceiver on Tahvo. This is used
...@@ -140,6 +145,7 @@ config USB_ISP1301 ...@@ -140,6 +145,7 @@ config USB_ISP1301
config USB_MSM_OTG config USB_MSM_OTG
tristate "Qualcomm on-chip USB OTG controller support" tristate "Qualcomm on-chip USB OTG controller support"
depends on (USB || USB_GADGET) && (ARCH_QCOM || COMPILE_TEST) depends on (USB || USB_GADGET) && (ARCH_QCOM || COMPILE_TEST)
depends on USB_GADGET || !USB_GADGET # if USB_GADGET=m, this can't be 'y'
depends on RESET_CONTROLLER depends on RESET_CONTROLLER
depends on EXTCON depends on EXTCON
select USB_PHY select USB_PHY
...@@ -169,6 +175,7 @@ config USB_QCOM_8X16_PHY ...@@ -169,6 +175,7 @@ config USB_QCOM_8X16_PHY
config USB_MV_OTG config USB_MV_OTG
tristate "Marvell USB OTG support" tristate "Marvell USB OTG support"
depends on USB_EHCI_MV && USB_MV_UDC && PM && USB_OTG depends on USB_EHCI_MV && USB_MV_UDC && PM && USB_OTG
depends on USB_GADGET || !USB_GADGET # if USB_GADGET=m, this can't be 'y'
select USB_PHY select USB_PHY
help help
Say Y here if you want to build Marvell USB OTG transciever Say Y here if you want to build Marvell USB OTG transciever
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment