linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: renesas: fix extcon dependency
@ 2015-01-28 21:47 Arnd Bergmann
  2015-01-29 11:41 ` Russell King - ARM Linux
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2015-01-28 21:47 UTC (permalink / raw)
  To: gregkh
  Cc: linux-usb, linux-arm-kernel, Felipe Balbi, Yoshihiro Shimoda,
	linux-kernel

The renesas usbhs driver calls extcon_get_edev_by_phandle(), which
is defined in drivers/extcon/extcon-class.c, and that can be a
loadable module. If the extcon-class support is disabled, usbhs
will work correctly for all devices that do not need extcon.

However, if extcon-class is a loadable module, and usbhs is
built-in, the kernel fails to link. In order to solve that,
we need a Kconfig dependency that allows extcon to be disabled
but does not allow usbhs built-in if extcon is a module.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

diff --git a/drivers/usb/renesas_usbhs/Kconfig b/drivers/usb/renesas_usbhs/Kconfig
index de83b9d0cd5c..0ea9040b9f10 100644
--- a/drivers/usb/renesas_usbhs/Kconfig
+++ b/drivers/usb/renesas_usbhs/Kconfig
@@ -6,6 +6,7 @@ config USB_RENESAS_USBHS
 	tristate 'Renesas USBHS controller'
 	depends on USB_GADGET
 	depends on ARCH_SHMOBILE || SUPERH || COMPILE_TEST
+	depends on EXTCON || !EXTCON # for module build if extcon is
 	default n
 	help
 	  Renesas USBHS is a discrete USB host and peripheral controller chip


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] usb: renesas: fix extcon dependency
  2015-01-28 21:47 [PATCH] usb: renesas: fix extcon dependency Arnd Bergmann
@ 2015-01-29 11:41 ` Russell King - ARM Linux
  2015-02-18 21:03   ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Russell King - ARM Linux @ 2015-01-29 11:41 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: gregkh, Yoshihiro Shimoda, linux-usb, Felipe Balbi,
	linux-arm-kernel, linux-kernel

On Wed, Jan 28, 2015 at 10:47:18PM +0100, Arnd Bergmann wrote:
> The renesas usbhs driver calls extcon_get_edev_by_phandle(), which
> is defined in drivers/extcon/extcon-class.c, and that can be a
> loadable module. If the extcon-class support is disabled, usbhs
> will work correctly for all devices that do not need extcon.
> 
> However, if extcon-class is a loadable module, and usbhs is
> built-in, the kernel fails to link. In order to solve that,
> we need a Kconfig dependency that allows extcon to be disabled
> but does not allow usbhs built-in if extcon is a module.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> diff --git a/drivers/usb/renesas_usbhs/Kconfig b/drivers/usb/renesas_usbhs/Kconfig
> index de83b9d0cd5c..0ea9040b9f10 100644
> --- a/drivers/usb/renesas_usbhs/Kconfig
> +++ b/drivers/usb/renesas_usbhs/Kconfig
> @@ -6,6 +6,7 @@ config USB_RENESAS_USBHS
>  	tristate 'Renesas USBHS controller'
>  	depends on USB_GADGET
>  	depends on ARCH_SHMOBILE || SUPERH || COMPILE_TEST
> +	depends on EXTCON || !EXTCON # for module build if extcon is

The comment doesn't make much sense on its own (and when I read it before
reading the above description, it was down right confusing.)  Maybe a
longer comment would be a good idea?

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] usb: renesas: fix extcon dependency
  2015-01-29 11:41 ` Russell King - ARM Linux
@ 2015-02-18 21:03   ` Arnd Bergmann
  0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2015-02-18 21:03 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Russell King - ARM Linux, gregkh, Yoshihiro Shimoda, linux-usb,
	linux-kernel, Felipe Balbi

On Thursday 29 January 2015 11:41:58 Russell King - ARM Linux wrote:
> On Wed, Jan 28, 2015 at 10:47:18PM +0100, Arnd Bergmann wrote:
> > The renesas usbhs driver calls extcon_get_edev_by_phandle(), which
> > is defined in drivers/extcon/extcon-class.c, and that can be a
> > loadable module. If the extcon-class support is disabled, usbhs
> > will work correctly for all devices that do not need extcon.
> > 
> > However, if extcon-class is a loadable module, and usbhs is
> > built-in, the kernel fails to link. In order to solve that,
> > we need a Kconfig dependency that allows extcon to be disabled
> > but does not allow usbhs built-in if extcon is a module.
> > 
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > 
> > diff --git a/drivers/usb/renesas_usbhs/Kconfig b/drivers/usb/renesas_usbhs/Kconfig
> > index de83b9d0cd5c..0ea9040b9f10 100644
> > --- a/drivers/usb/renesas_usbhs/Kconfig
> > +++ b/drivers/usb/renesas_usbhs/Kconfig
> > @@ -6,6 +6,7 @@ config USB_RENESAS_USBHS
> >       tristate 'Renesas USBHS controller'
> >       depends on USB_GADGET
> >       depends on ARCH_SHMOBILE || SUPERH || COMPILE_TEST
> > +     depends on EXTCON || !EXTCON # for module build if extcon is
> 
> The comment doesn't make much sense on its own (and when I read it before
> reading the above description, it was down right confusing.)  Maybe a
> longer comment would be a good idea?
> 

Sorry for the late reply.

We have a lot of these dependencies, and I never know what a particular
maintainer expects. Let me try to come up with something better.

	Arnd

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-02-18 21:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-28 21:47 [PATCH] usb: renesas: fix extcon dependency Arnd Bergmann
2015-01-29 11:41 ` Russell King - ARM Linux
2015-02-18 21:03   ` Arnd Bergmann

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).