Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

phy: fix Kconfig dependencies

DM816x PHY uses usb_phy_* methods and because
of that, it must select USB_PHY, however, because
the drivers in question (DM816x, TWL4030 and
OMAP_USB2) sit outside of drivers/usb/ directory,
meaning they can be built even if USB_SUPPORT=n.

This patches fixes the dependencies by adding
USB_SUPPORT as a dependency and making all drivers
select USB_PHY (which cannot be selected through
menuconfig).

Note that this fixes some linking breakages when
building with randconfig.

Cc: Tony Lindgren <tony@atomide.com>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>

authored by

Felipe Balbi and committed by
Kishon Vijay Abraham I
7f7a4d30 4d051f74

+6 -2
+6 -2
drivers/phy/Kconfig
··· 38 38 config PHY_DM816X_USB 39 39 tristate "TI dm816x USB PHY driver" 40 40 depends on ARCH_OMAP2PLUS 41 + depends on USB_SUPPORT 41 42 select GENERIC_PHY 43 + select USB_PHY 42 44 help 43 45 Enable this for dm816x USB to work. 44 46 ··· 99 97 config OMAP_USB2 100 98 tristate "OMAP USB2 PHY Driver" 101 99 depends on ARCH_OMAP2PLUS 102 - depends on USB_PHY 100 + depends on USB_SUPPORT 103 101 select GENERIC_PHY 102 + select USB_PHY 104 103 select OMAP_CONTROL_PHY 105 104 depends on OMAP_OCP2SCP 106 105 help ··· 125 122 config TWL4030_USB 126 123 tristate "TWL4030 USB Transceiver Driver" 127 124 depends on TWL4030_CORE && REGULATOR_TWL4030 && USB_MUSB_OMAP2PLUS 128 - depends on USB_PHY 125 + depends on USB_SUPPORT 129 126 select GENERIC_PHY 127 + select USB_PHY 130 128 help 131 129 Enable this to support the USB OTG transceiver on TWL4030 132 130 family chips (including the TWL5030 and TPS659x0 devices).