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

usb: phy: add USB_SUPPORT dependency

The driver now calls of_usb_get_dr_mode_by_phy, which is part of the
USB core layer, and it fails to build when that is not provided:

drivers/phy/phy-sun4i-usb.o: In function `sun4i_usb_phy_probe':
phy-sun4i-usb.c:(.text.sun4i_usb_phy_probe+0x140): undefined reference to `of_usb_get_dr_mode_by_phy'

We already have a couple of other PHY drivers with a dependency
on USB_SUPPORT, so that seems to be the easiest fix here.

An alternative would be to adjust the #ifdef in include/linux/usb/of.h
to also check for CONFIG_USB_SUPPORT.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Fixes: b33ecca87df9 ("phy-sun4i-usb: Add support for peripheral-only mode")
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>

authored by

Arnd Bergmann and committed by
Kishon Vijay Abraham I
cddbc4b7 d83614e4

+2
+2
drivers/phy/Kconfig
··· 267 267 depends on RESET_CONTROLLER 268 268 depends on EXTCON 269 269 depends on POWER_SUPPLY 270 + depends on USB_SUPPORT 270 271 select GENERIC_PHY 272 + select USB_COMMON 271 273 help 272 274 Enable this to support the transceiver that is part of Allwinner 273 275 sunxi SoCs.