Re: [PATCH v2] usb: chipidea: fix and improve dependencies if usb host or gadget support is built as module

2012-07-20 Thread Marc Kleine-Budde
On 07/20/2012 12:57 AM, Greg KH wrote:
[..]

 The problem is, one half of the functions comes from the USB host
 subsystem, the other half from the USB gadget subsystem.So the driver
 can only be built into the kernel (with host+udc support) if both USB
 host and USB gadget are built in.
 
 snip
 
 Ok what a mess.
 
 But, to top it all off, this patch doesn't apply to my tree.  Care to
 refresh it against usb-next so that I can apply it?

Done

regards,
Marc

-- 
Pengutronix e.K.  | Marc Kleine-Budde   |
Industrial Linux Solutions| Phone: +49-231-2826-924 |
Vertretung West/Dortmund  | Fax:   +49-5121-206917- |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |



signature.asc
Description: OpenPGP digital signature


Re: [PATCH v2] usb: chipidea: fix and improve dependencies if usb host or gadget support is built as module

2012-07-17 Thread Felipe Balbi
Hi,

On Mon, Jul 16, 2012 at 10:18:20PM +0200, Marc Kleine-Budde wrote:
 Since commit 5e0aa49 usb: chipidea: use generic map/unmap routines,
 the udc part of the chipidea driver needs the generic usb gadget helper
 functions. If the chipidea driver with udc support is built into the
 kernel and usb gadget is built a module, the linking of the kernel
 fails with:
 
 drivers/built-in.o: In function `_hardware_dequeue':
 drivers/usb/chipidea/udc.c:527:
 undefined reference to `usb_gadget_unmap_request'
 drivers/usb/chipidea/udc.c:1269:
 undefined reference to `usb_gadget_unmap_request'
 drivers/usb/chipidea/udc.c:1821:
 undefined reference to `usb_del_gadget_udc'
 drivers/usb/chipidea/udc.c:443:
 undefined reference to `usb_gadget_map_request'
 drivers/usb/chipidea/udc.c:1774:
 undefined reference to `usb_add_gadget_udc'
 
 This patch changes the dependencies, so that udc support can only be
 activated if the linux gadget support (USB_GADGET) is builtin or both
 chipidea driver and USB_GADGET are modular. Same dependencies for the
 chipidea host support and the linux host side USB support (USB).
 
 While there, fix the indention of chipidea the help text.
 
 Cc: Alexander Shishkin alexander.shish...@linux.intel.com
 Signed-off-by: Marc Kleine-Budde m...@pengutronix.de

this looks like it tackles everything. didn't test myself but still:

Reviewed-by: Felipe Balbi ba...@ti.com

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH v2] usb: chipidea: fix and improve dependencies if usb host or gadget support is built as module

2012-07-17 Thread Felipe Balbi
Hi,

On Tue, Jul 17, 2012 at 11:34:52AM +0200, Marc Kleine-Budde wrote:
 On 07/17/2012 11:15 AM, Felipe Balbi wrote:
  On Mon, Jul 16, 2012 at 10:18:20PM +0200, Marc Kleine-Budde wrote:
  Since commit 5e0aa49 usb: chipidea: use generic map/unmap routines,
  the udc part of the chipidea driver needs the generic usb gadget helper
  functions. If the chipidea driver with udc support is built into the
  kernel and usb gadget is built a module, the linking of the kernel
  fails with:
 
  drivers/built-in.o: In function `_hardware_dequeue':
  drivers/usb/chipidea/udc.c:527:
  undefined reference to `usb_gadget_unmap_request'
  drivers/usb/chipidea/udc.c:1269:
  undefined reference to `usb_gadget_unmap_request'
  drivers/usb/chipidea/udc.c:1821:
  undefined reference to `usb_del_gadget_udc'
  drivers/usb/chipidea/udc.c:443:
  undefined reference to `usb_gadget_map_request'
  drivers/usb/chipidea/udc.c:1774:
  undefined reference to `usb_add_gadget_udc'
 
  This patch changes the dependencies, so that udc support can only be
  activated if the linux gadget support (USB_GADGET) is builtin or both
  chipidea driver and USB_GADGET are modular. Same dependencies for the
  chipidea host support and the linux host side USB support (USB).
 
  While there, fix the indention of chipidea the help text.
 
  Cc: Alexander Shishkin alexander.shish...@linux.intel.com
  Signed-off-by: Marc Kleine-Budde m...@pengutronix.de
  
  this looks like it tackles everything. didn't test myself but still:
  
  Reviewed-by: Felipe Balbi ba...@ti.com
 
 Thanks. Is this for v3.5 or should I rebase to Greg's usb-tree?

That's up to Alex and Greg. My suggestion is that this can wait for
v3.6-rc cycle with a backport to stable. Greg and Alex have the final
saying.

-- 
balbi


signature.asc
Description: Digital signature


[PATCH v2] usb: chipidea: fix and improve dependencies if usb host or gadget support is built as module

2012-07-16 Thread Marc Kleine-Budde
Since commit 5e0aa49 usb: chipidea: use generic map/unmap routines,
the udc part of the chipidea driver needs the generic usb gadget helper
functions. If the chipidea driver with udc support is built into the
kernel and usb gadget is built a module, the linking of the kernel
fails with:

drivers/built-in.o: In function `_hardware_dequeue':
drivers/usb/chipidea/udc.c:527:
undefined reference to `usb_gadget_unmap_request'
drivers/usb/chipidea/udc.c:1269:
undefined reference to `usb_gadget_unmap_request'
drivers/usb/chipidea/udc.c:1821:
undefined reference to `usb_del_gadget_udc'
drivers/usb/chipidea/udc.c:443:
undefined reference to `usb_gadget_map_request'
drivers/usb/chipidea/udc.c:1774:
undefined reference to `usb_add_gadget_udc'

This patch changes the dependencies, so that udc support can only be
activated if the linux gadget support (USB_GADGET) is builtin or both
chipidea driver and USB_GADGET are modular. Same dependencies for the
chipidea host support and the linux host side USB support (USB).

While there, fix the indention of chipidea the help text.

Cc: Alexander Shishkin alexander.shish...@linux.intel.com
Signed-off-by: Marc Kleine-Budde m...@pengutronix.de
---

Changes since v1
- Do not depend on USB host support anymore (tnx Felipe for the input)
- Fix help text indention

 drivers/usb/chipidea/Kconfig |9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig
index fd36dc8..38305b2 100644
--- a/drivers/usb/chipidea/Kconfig
+++ b/drivers/usb/chipidea/Kconfig
@@ -1,9 +1,9 @@
 config USB_CHIPIDEA
tristate ChipIdea Highspeed Dual Role Controller
-   depends on USB
+   depends on USB || USB_GADGET
help
-  Say Y here if your system has a dual role high speed USB
-  controller based on ChipIdea silicon IP. Currently, only the
+ Say Y here if your system has a dual role high speed USB
+ controller based on ChipIdea silicon IP. Currently, only the
  peripheral mode is supported.
 
  When compiled dynamically, the module will be called ci-hdrc.ko.
@@ -12,7 +12,7 @@ if USB_CHIPIDEA
 
 config USB_CHIPIDEA_UDC
bool ChipIdea device controller
-   depends on USB_GADGET
+   depends on USB_GADGET=y || USB_GADGET=USB_CHIPIDEA
select USB_GADGET_DUALSPEED
help
  Say Y here to enable device controller functionality of the
@@ -20,6 +20,7 @@ config USB_CHIPIDEA_UDC
 
 config USB_CHIPIDEA_HOST
bool ChipIdea host controller
+   depends on USB=y || USB=USB_CHIPIDEA
help
  Say Y here to enable host controller functionality of the
  ChipIdea driver.
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html