linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Chen <hzpeterchen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Felipe Balbi <felipe.balbi-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Cc: kbuild test robot
	<fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Peter Chen <Peter.Chen-3arQi8VN3Tc@public.gmane.org>,
	John Youn <johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>,
	Bin Liu <b-liu-l0cyMroinI0@public.gmane.org>,
	Mathias Nyman
	<mathias.nyman-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	Alan Stern
	<stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>,
	kbuild-all-JC7UmRfGjtg@public.gmane.org,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [balbi-usb:testing/next 64/67] phy-generic.c:undefined reference to `usb_gadget_vbus_connect'
Date: Tue, 7 Jun 2016 17:50:08 +0800	[thread overview]
Message-ID: <20160607095008.GC17095@shlinux2> (raw)
In-Reply-To: <87wpm1basy.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>

On Tue, Jun 07, 2016 at 12:36:13PM +0300, Felipe Balbi wrote:
> 
> Hi,
> 
> Peter Chen <hzpeterchen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> > On Mon, Jun 06, 2016 at 04:16:17PM +0300, Felipe Balbi wrote:
> >> 
> >> Hi,
> >> 
> >> Felipe Balbi <felipe.balbi-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> writes:
> >> > [ Unknown signature status ]
> >> >
> >> > Hi,
> >> >
> >> > kbuild test robot <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> writes:
> >> >> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git testing/next
> >> >> head:   89fe2b5ab11cdf6a67d4492d893e70e330aa7060
> >> >> commit: 231b31ca34485552fe27e67dc6d30d06079c7648 [64/67] usb: gadget: move gadget API functions to udc-core
> >> >> config: x86_64-randconfig-s1-06061834 (attached as .config)
> >> >> compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
> >> >> reproduce:
> >> >>         git checkout 231b31ca34485552fe27e67dc6d30d06079c7648
> >> >>         # save the attached .config to linux build tree
> >> >>         make ARCH=x86_64 
> >> >>
> >> >> All errors (new ones prefixed by >>):
> >> >>
> >> >>    drivers/built-in.o: In function `nop_set_peripheral':
> >> >>>> phy-generic.c:(.text+0x14423f): undefined reference to `usb_gadget_vbus_connect'
> >> >>    drivers/built-in.o: In function `nop_gpio_vbus_thread':
> >> >>>> phy-generic.c:(.text+0x144742): undefined reference to `usb_gadget_vbus_disconnect'
> >> >
> >> > oh yeah, I have to fix this. I'll do it now.
> >> 
> >> In order to fix this, I'll have to add something like below:
> >> 
> >> diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig
> >> index 3644a3500b70..bd67e4ac4b61 100644
> >> --- a/drivers/usb/chipidea/Kconfig
> >> +++ b/drivers/usb/chipidea/Kconfig
> >> @@ -19,6 +19,7 @@ config USB_CHIPIDEA_OF
> >>  config USB_CHIPIDEA_PCI
> >>  	tristate
> >>  	depends on PCI
> >> +	depends on USB_GADGET=y || USB_GADGET=NOP_USB_XCEIV
> >>  	depends on NOP_USB_XCEIV
> >>  	default USB_CHIPIDEA
> >
> > Hi Felipe,
> >
> > It causes any drivers which use symbols from gadget.h needs to build
> > USB_GADGET even it only wants to be host function. Any significant
> > benefits after moving it to udc-core.c?
> 
> why is a host-only function calling into the gadget API?
> 

Well, Just like this case, the chipidea driver can be configured host
mode only, but it still uses generic phy.

Besides, we have some common code which handles vbus status, this code
will be built even at host-only mode, but will not be called since the
runtime condition is not satisfied, eg, dr_mode, device role at
register.

-- 

Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-06-07  9:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-06 12:54 [balbi-usb:testing/next 64/67] phy-generic.c:undefined reference to `usb_gadget_vbus_connect' kbuild test robot
     [not found] ` <201606062026.EQTlXIDR%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-06-06 12:53   ` Felipe Balbi
     [not found]     ` <87bn3ecwbz.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-06-06 13:16       ` Felipe Balbi
     [not found]         ` <878tyicva6.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-06-07  1:54           ` Peter Chen
2016-06-07  9:36             ` Felipe Balbi
     [not found]               ` <87wpm1basy.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-06-07  9:50                 ` Peter Chen [this message]
2016-06-07 10:22                   ` Felipe Balbi
     [not found]                     ` <87inxlb8nm.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-06-08  3:17                       ` Peter Chen
2016-06-08  9:50                         ` Felipe Balbi
     [not found]                           ` <87shwo9fge.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-06-08 10:14                             ` Peter Chen
2016-06-08 10:32                               ` Felipe Balbi
     [not found]                                 ` <87bn3c9dj6.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-06-08 12:25                                   ` Peter Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160607095008.GC17095@shlinux2 \
    --to=hzpeterchen-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=Peter.Chen-3arQi8VN3Tc@public.gmane.org \
    --cc=b-liu-l0cyMroinI0@public.gmane.org \
    --cc=felipe.balbi-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org \
    --cc=kbuild-all-JC7UmRfGjtg@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mathias.nyman-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).