Thread (18 messages) 18 messages, 3 authors, 2019-03-31

Re: [PATCH v2 4/6] usb: roles: add API to get usb_role_switch by node

From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Date: 2019-03-15 10:34:25
Also in: linux-devicetree, linux-mediatek, linux-usb, lkml

On Fri, Mar 15, 2019 at 05:32:59PM +0800, Chunfeng Yun wrote:
Hi,
On Fri, 2019-03-15 at 11:26 +0200, Heikki Krogerus wrote:
quoted
Hi Chunfeng,

On Fri, Mar 15, 2019 at 05:13:24PM +0800, Chunfeng Yun wrote:
quoted
I encounter a build error when CONFIG_USB_ROLE_SWITCH is not enabled,

drivers/usb/mtu3/mtu3_dr.o: In function `ssusb_role_sw_register':
./drivers/usb/mtu3/mtu3_dr.c:460: undefined reference to
`usb_role_switch_register'
drivers/usb/mtu3/mtu3_dr.o: In function `ssusb_otg_switch_exit':
./drivers/usb/mtu3/mtu3_dr.c:491: undefined reference to
`usb_role_switch_unregister'
So you need to add dependency on USB_ROLE_SWITCH, right?
Yes
quoted
--- a/drivers/usb/mtu3/Kconfig
+++ b/drivers/usb/mtu3/Kconfig
@@ -43,6 +43,7 @@ config USB_MTU3_DUAL_ROLE
        bool "Dual Role mode"
        depends on ((USB=y || USB=USB_MTU3) && (USB_GADGET=y || USB_GADGET=USB_MTU3))
        depends on (EXTCON=y || EXTCON=USB_MTU3)
+       depends on USB_ROLE_SWITCH
        help
          This is the default mode of working of MTU3 controller where
          both host and gadget features are enabled.
quoted
the following patch has fixed the issue, but seems not get into kernel,
[v3,08/12] usb: roles: Add usb role switch notifier.
https://patchwork.kernel.org/patch/10836525/
I don't understand how that fixes the problem? That patch will in any
case be targeting v5.2. We are in the middle of merge window, so
nothing is happening until v5.1-rc1 is tagged.
It provides some dummy inline functions when USB_ROLE_SWITCH is not
enabled, this will avoid build error
Ah, true. Those should brobable be introduced in their own patch.


thanks,

-- 
heikki

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help