* [PATCH 0/3] usb: geneirc Kconfig fixes
@ 2010-10-19 8:04 Felipe Contreras
2010-10-19 8:04 ` [PATCH 1/3] usb: fix Kconfig warning Felipe Contreras
` (2 more replies)
0 siblings, 3 replies; 15+ messages in thread
From: Felipe Contreras @ 2010-10-19 8:04 UTC (permalink / raw)
To: linux-usb, linux-main; +Cc: Greg KH, Felipe Balbi, Felipe Contreras
Hi,
This gets rid of some warnings, makes defconfigs smarter by having more proper
dependencies, and general cleanups.
BTW, this is the reason USB_GADGET_MUSB_HDRC sometimes is not selected:
http://article.gmane.org/gmane.linux.kbuild.devel/5480
Felipe Contreras (3):
usb: fix Kconfig warning
usb: trivial Kconfig cleanups
drivers: cleanup Kconfig stuff
drivers/mfd/Kconfig | 4 +++-
drivers/usb/core/Kconfig | 3 ---
drivers/usb/gadget/Kconfig | 18 +++---------------
drivers/usb/musb/Kconfig | 19 +++++--------------
4 files changed, 11 insertions(+), 33 deletions(-)
--
1.7.3.1.2.g7fe2b
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 1/3] usb: fix Kconfig warning
2010-10-19 8:04 [PATCH 0/3] usb: geneirc Kconfig fixes Felipe Contreras
@ 2010-10-19 8:04 ` Felipe Contreras
2010-10-19 8:20 ` Felipe Balbi
2010-10-19 8:04 ` [PATCH 2/3] usb: trivial Kconfig cleanups Felipe Contreras
2010-10-19 8:04 ` [PATCH 3/3] drivers: cleanup Kconfig stuff Felipe Contreras
2 siblings, 1 reply; 15+ messages in thread
From: Felipe Contreras @ 2010-10-19 8:04 UTC (permalink / raw)
To: linux-usb, linux-main; +Cc: Greg KH, Felipe Balbi, Felipe Contreras
warning: (USB_MUSB_HDRC_HCD && USB_SUPPORT && USB_MUSB_HDRC &&
(USB_MUSB_HOST || USB_MUSB_OTG) && USB_GADGET_MUSB_HDRC || USB_MUSB_OTG
&& <choice> && USB && USB_GADGET && PM && EXPERIMENTAL) selects USB_OTG
which has unmet direct dependencies (USB_GADGET_OMAP && ARCH_OMAP_OTG &&
USB_OHCI_HCD)
This doesn't seem to happen on 2.6.36-rc8, but still doesn't make sense
to keep this useless config.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
drivers/usb/gadget/Kconfig | 11 -----------
1 files changed, 0 insertions(+), 11 deletions(-)
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index cd27f9b..19a6eb6 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -209,17 +209,6 @@ config USB_OMAP
default USB_GADGET
select USB_GADGET_SELECTED
-config USB_OTG
- boolean "OTG Support"
- depends on USB_GADGET_OMAP && ARCH_OMAP_OTG && USB_OHCI_HCD
- help
- The most notable feature of USB OTG is support for a
- "Dual-Role" device, which can act as either a device
- or a host. The initial role choice can be changed
- later, when two dual-role devices talk to each other.
-
- Select this only if your OMAP board has a Mini-AB connector.
-
config USB_GADGET_PXA25X
boolean "PXA 25x or IXP 4xx"
depends on (ARCH_PXA && PXA25x) || ARCH_IXP4XX
--
1.7.3.1.2.g7fe2b
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 2/3] usb: trivial Kconfig cleanups
2010-10-19 8:04 [PATCH 0/3] usb: geneirc Kconfig fixes Felipe Contreras
2010-10-19 8:04 ` [PATCH 1/3] usb: fix Kconfig warning Felipe Contreras
@ 2010-10-19 8:04 ` Felipe Contreras
2010-10-19 8:15 ` Felipe Balbi
2010-10-19 8:04 ` [PATCH 3/3] drivers: cleanup Kconfig stuff Felipe Contreras
2 siblings, 1 reply; 15+ messages in thread
From: Felipe Contreras @ 2010-10-19 8:04 UTC (permalink / raw)
To: linux-usb, linux-main; +Cc: Greg KH, Felipe Balbi, Felipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
drivers/usb/core/Kconfig | 3 ---
drivers/usb/gadget/Kconfig | 2 +-
drivers/usb/musb/Kconfig | 17 ++++-------------
3 files changed, 5 insertions(+), 17 deletions(-)
diff --git a/drivers/usb/core/Kconfig b/drivers/usb/core/Kconfig
index 9eed5b5..8f57a26 100644
--- a/drivers/usb/core/Kconfig
+++ b/drivers/usb/core/Kconfig
@@ -110,8 +110,6 @@ config USB_OTG
bool
depends on USB && EXPERIMENTAL
depends on USB_SUSPEND
- default n
-
config USB_OTG_WHITELIST
bool "Rely on OTG Targeted Peripherals List"
@@ -139,4 +137,3 @@ config USB_OTG_BLACKLIST_HUB
external hubs. OTG hosts are allowed to reduce hardware
and software costs by not supporting external hubs. So
are "Embedded Hosts" that don't offer OTG support.
-
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 19a6eb6..c530bc6 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -125,7 +125,6 @@ choice
config USB_GADGET_AT91
boolean "Atmel AT91 USB Device Port"
depends on ARCH_AT91 && !ARCH_AT91SAM9RL && !ARCH_AT91CAP9 && !ARCH_AT91SAM9G45
- select USB_GADGET_SELECTED
help
Many Atmel AT91 processors (such as the AT91RM2000) have a
full speed USB Device Port with support for five configurable
@@ -139,6 +138,7 @@ config USB_AT91
tristate
depends on USB_GADGET_AT91
default USB_GADGET
+ select USB_GADGET_SELECTED
config USB_GADGET_ATMEL_USBA
boolean "Atmel USBA"
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index cfd38ed..20895c4 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -8,12 +8,12 @@ comment "Enable Host or Gadget support to see Inventra options"
# (M)HDRC = (Multipoint) Highspeed Dual-Role Controller
config USB_MUSB_HDRC
+ tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)'
depends on (USB || USB_GADGET)
depends on (ARM || (BF54x && !BF544) || (BF52x && !BF522 && !BF523))
select NOP_USB_XCEIV if (ARCH_DAVINCI || MACH_OMAP3EVM || BLACKFIN)
select TWL4030_USB if MACH_OMAP_3430SDP
select USB_OTG_UTILS
- tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)'
help
Say Y here if your system has a dual role high speed USB
controller based on the Mentor Graphics silicon IP. Then
@@ -79,8 +79,8 @@ choice
# use USB_MUSB_HDRC_HCD not USB_MUSB_HOST to #ifdef host side support;
# OTG needs both roles, not just USB_MUSB_HOST.
config USB_MUSB_HOST
- depends on USB
bool "USB Host"
+ depends on USB
help
Say Y here if your system supports the USB host role.
If it has a USB "A" (rectangular), "Mini-A" (uncommon),
@@ -90,8 +90,8 @@ config USB_MUSB_HOST
# use USB_GADGET_MUSB_HDRC not USB_MUSB_PERIPHERAL to #ifdef peripheral
# side support ... OTG needs both roles
config USB_MUSB_PERIPHERAL
- depends on USB_GADGET
bool "USB Peripheral (gadget stack)"
+ depends on USB_GADGET
select USB_GADGET_MUSB_HDRC
help
Say Y here if your system supports the USB peripheral role.
@@ -100,8 +100,8 @@ config USB_MUSB_PERIPHERAL
(With a "Mini-AB" connector, you should enable USB OTG.)
config USB_MUSB_OTG
- depends on USB && USB_GADGET && PM && EXPERIMENTAL
bool "Both host and peripheral: USB OTG (On The Go) Device"
+ depends on USB && USB_GADGET && PM && EXPERIMENTAL
select USB_GADGET_MUSB_HDRC
select USB_OTG
help
@@ -125,14 +125,6 @@ config USB_MUSB_OTG
endchoice
-# enable peripheral support (including with OTG)
-config USB_GADGET_MUSB_HDRC
- bool
- depends on USB_MUSB_HDRC && (USB_MUSB_PERIPHERAL || USB_MUSB_OTG)
-# default y
-# select USB_GADGET_DUALSPEED
-# select USB_GADGET_SELECTED
-
# enables host support (including with OTG)
config USB_MUSB_HDRC_HCD
bool
@@ -140,7 +132,6 @@ config USB_MUSB_HDRC_HCD
select USB_OTG if USB_GADGET_MUSB_HDRC
default y
-
config MUSB_PIO_ONLY
bool 'Disable DMA (always use PIO)'
depends on USB_MUSB_HDRC
--
1.7.3.1.2.g7fe2b
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 3/3] drivers: cleanup Kconfig stuff
2010-10-19 8:04 [PATCH 0/3] usb: geneirc Kconfig fixes Felipe Contreras
2010-10-19 8:04 ` [PATCH 1/3] usb: fix Kconfig warning Felipe Contreras
2010-10-19 8:04 ` [PATCH 2/3] usb: trivial Kconfig cleanups Felipe Contreras
@ 2010-10-19 8:04 ` Felipe Contreras
2010-10-19 8:18 ` Felipe Balbi
2 siblings, 1 reply; 15+ messages in thread
From: Felipe Contreras @ 2010-10-19 8:04 UTC (permalink / raw)
To: linux-usb, linux-main; +Cc: Greg KH, Felipe Balbi, Felipe Contreras
Add missing dependencies, and remove redundant ones.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
drivers/mfd/Kconfig | 4 +++-
drivers/usb/gadget/Kconfig | 5 ++---
drivers/usb/musb/Kconfig | 2 +-
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index db51ea1..523df52 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -156,6 +156,8 @@ config MENELAUS
config TWL4030_CORE
bool "Texas Instruments TWL4030/TWL5030/TWL6030/TPS659x0 Support"
depends on I2C=y && GENERIC_HARDIRQS
+ depends on ARCH_OMAP3 || ARCH_OMAP4
+ default y
help
Say yes here if you have TWL4030 / TWL6030 family chip on your board.
This core driver provides register access and IRQ handling
@@ -169,7 +171,7 @@ config TWL4030_CORE
config TWL4030_POWER
bool "Support power resources on TWL4030 family chips"
- depends on TWL4030_CORE && ARM
+ depends on TWL4030_CORE
help
Say yes here if you want to use the power resources on the
TWL4030 family chips. Most of these resources are regulators,
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index c530bc6..1fb074f 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -111,7 +111,6 @@ config USB_GADGET_SELECTED
#
choice
prompt "USB Peripheral Controller"
- depends on USB_GADGET
help
A USB device uses a controller to talk to its host.
Systems should have only one such upstream link.
@@ -191,7 +190,6 @@ config USB_GADGET_OMAP
boolean "OMAP USB Device Controller"
depends on ARCH_OMAP
select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3 || MACH_OMAP_H4_OTG
- select USB_OTG_UTILS if ARCH_OMAP
help
Many Texas Instruments OMAP processors have flexible full
speed USB device controllers, with support for up to 30
@@ -842,7 +840,8 @@ config USB_CDC_COMPOSITE
config USB_G_NOKIA
tristate "Nokia composite gadget"
- depends on PHONET
+ depends on PHONET && MACH_NOKIA_RX51
+ depends on USB_GADGET_MUSB_HDRC
help
The Nokia composite gadget provides support for acm, obex
and phonet in only one composite gadget driver.
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index 20895c4..5484258 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -12,7 +12,7 @@ config USB_MUSB_HDRC
depends on (USB || USB_GADGET)
depends on (ARM || (BF54x && !BF544) || (BF52x && !BF522 && !BF523))
select NOP_USB_XCEIV if (ARCH_DAVINCI || MACH_OMAP3EVM || BLACKFIN)
- select TWL4030_USB if MACH_OMAP_3430SDP
+ select TWL4030_USB if ARCH_OMAP3
select USB_OTG_UTILS
help
Say Y here if your system has a dual role high speed USB
--
1.7.3.1.2.g7fe2b
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/3] usb: trivial Kconfig cleanups
2010-10-19 8:04 ` [PATCH 2/3] usb: trivial Kconfig cleanups Felipe Contreras
@ 2010-10-19 8:15 ` Felipe Balbi
2010-10-19 8:25 ` Felipe Contreras
0 siblings, 1 reply; 15+ messages in thread
From: Felipe Balbi @ 2010-10-19 8:15 UTC (permalink / raw)
To: Felipe Contreras; +Cc: linux-usb, linux-main, Greg KH, Balbi, Felipe
hi,
On Tue, Oct 19, 2010 at 03:04:25AM -0500, Felipe Contreras wrote:
>@@ -125,14 +125,6 @@ config USB_MUSB_OTG
>
> endchoice
>
>-# enable peripheral support (including with OTG)
>-config USB_GADGET_MUSB_HDRC
>- bool
>- depends on USB_MUSB_HDRC && (USB_MUSB_PERIPHERAL || USB_MUSB_OTG)
>-# default y
>-# select USB_GADGET_DUALSPEED
>-# select USB_GADGET_SELECTED
>-
$ git grep -e CONFIG_USB_GADGET_MUSB_HDRC drivers/usb/
drivers/usb/gadget/gadget_chips.h:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
drivers/usb/musb/Makefile:ifeq ($(CONFIG_USB_GADGET_MUSB_HDRC),y)
drivers/usb/musb/am35x.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
drivers/usb/musb/da8xx.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
drivers/usb/musb/musb_core.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
drivers/usb/musb/musb_core.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
drivers/usb/musb/musb_core.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
drivers/usb/musb/musb_core.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
drivers/usb/musb/musb_core.c:#endif /* CONFIG_USB_GADGET_MUSB_HDRC */
drivers/usb/musb/musb_core.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
drivers/usb/musb/musb_core.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
drivers/usb/musb/musb_core.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
drivers/usb/musb/musb_core.c:#elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
drivers/usb/musb/musb_core.h:#ifndef CONFIG_USB_GADGET_MUSB_HDRC
drivers/usb/musb/musb_core.h:#error bogus Kconfig output ... select CONFIG_USB_GADGET_MUSB_HDRC
drivers/usb/musb/musb_core.h:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
drivers/usb/musb/musb_core.h:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
drivers/usb/musb/musb_core.h:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
drivers/usb/musb/musb_core.h:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
drivers/usb/musb/musb_core.h:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
drivers/usb/musb/musb_core.h:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
drivers/usb/musb/tusb6010.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
drivers/usb/musb/tusb6010.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
drivers/usb/musb/tusb6010.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
NAK
--
balbi
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/3] drivers: cleanup Kconfig stuff
2010-10-19 8:04 ` [PATCH 3/3] drivers: cleanup Kconfig stuff Felipe Contreras
@ 2010-10-19 8:18 ` Felipe Balbi
2010-10-19 8:34 ` Felipe Contreras
0 siblings, 1 reply; 15+ messages in thread
From: Felipe Balbi @ 2010-10-19 8:18 UTC (permalink / raw)
To: Felipe Contreras; +Cc: linux-usb, linux-main, Greg KH, Balbi, Felipe
Hi,
On Tue, Oct 19, 2010 at 03:04:26AM -0500, Felipe Contreras wrote:
>diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
>index db51ea1..523df52 100644
>--- a/drivers/mfd/Kconfig
>+++ b/drivers/mfd/Kconfig
>@@ -156,6 +156,8 @@ config MENELAUS
> config TWL4030_CORE
> bool "Texas Instruments TWL4030/TWL5030/TWL6030/TPS659x0 Support"
> depends on I2C=y && GENERIC_HARDIRQS
>+ depends on ARCH_OMAP3 || ARCH_OMAP4
It's just an i2c chip, not depending on OMAP will allow us for a much
needed compile test on linux-next with different architectures.
>@@ -169,7 +171,7 @@ config TWL4030_CORE
>
> config TWL4030_POWER
> bool "Support power resources on TWL4030 family chips"
>- depends on TWL4030_CORE && ARM
>+ depends on TWL4030_CORE
ok.
>@@ -191,7 +190,6 @@ config USB_GADGET_OMAP
> boolean "OMAP USB Device Controller"
> depends on ARCH_OMAP
> select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3 || MACH_OMAP_H4_OTG
>- select USB_OTG_UTILS if ARCH_OMAP
ok.
>@@ -842,7 +840,8 @@ config USB_CDC_COMPOSITE
>
> config USB_G_NOKIA
> tristate "Nokia composite gadget"
>- depends on PHONET
>+ depends on PHONET && MACH_NOKIA_RX51
no. g_nokia only depends on PHONET, if someone else wants to use on
another board, it's fine by me. Otherwise we will have to keep on adding
more and more boards.
>+ depends on USB_GADGET_MUSB_HDRC
this gadget also works on controllers other than musb. As long as they
support enough endpoints and alternate settings, it should just work.
It was fine as it was before. NAK
>diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
>index 20895c4..5484258 100644
>--- a/drivers/usb/musb/Kconfig
>+++ b/drivers/usb/musb/Kconfig
>@@ -12,7 +12,7 @@ config USB_MUSB_HDRC
> depends on (USB || USB_GADGET)
> depends on (ARM || (BF54x && !BF544) || (BF52x && !BF522 && !BF523))
> select NOP_USB_XCEIV if (ARCH_DAVINCI || MACH_OMAP3EVM || BLACKFIN)
>- select TWL4030_USB if MACH_OMAP_3430SDP
>+ select TWL4030_USB if ARCH_OMAP3
we have omap3-based boards which don't use twl4030-usb, they use
nop-usb-xceiv. How do you want to handle that ?? NAK
--
balbi
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/3] usb: fix Kconfig warning
2010-10-19 8:04 ` [PATCH 1/3] usb: fix Kconfig warning Felipe Contreras
@ 2010-10-19 8:20 ` Felipe Balbi
0 siblings, 0 replies; 15+ messages in thread
From: Felipe Balbi @ 2010-10-19 8:20 UTC (permalink / raw)
To: Felipe Contreras; +Cc: linux-usb, linux-main, Greg KH, Balbi, Felipe
On Tue, Oct 19, 2010 at 03:04:24AM -0500, Felipe Contreras wrote:
>warning: (USB_MUSB_HDRC_HCD && USB_SUPPORT && USB_MUSB_HDRC &&
>(USB_MUSB_HOST || USB_MUSB_OTG) && USB_GADGET_MUSB_HDRC || USB_MUSB_OTG
>&& <choice> && USB && USB_GADGET && PM && EXPERIMENTAL) selects USB_OTG
>which has unmet direct dependencies (USB_GADGET_OMAP && ARCH_OMAP_OTG &&
>USB_OHCI_HCD)
>
>This doesn't seem to happen on 2.6.36-rc8, but still doesn't make sense
>to keep this useless config.
>
>Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
>---
> drivers/usb/gadget/Kconfig | 11 -----------
> 1 files changed, 0 insertions(+), 11 deletions(-)
>
>diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
>index cd27f9b..19a6eb6 100644
>--- a/drivers/usb/gadget/Kconfig
>+++ b/drivers/usb/gadget/Kconfig
>@@ -209,17 +209,6 @@ config USB_OMAP
> default USB_GADGET
> select USB_GADGET_SELECTED
>
>-config USB_OTG
>- boolean "OTG Support"
>- depends on USB_GADGET_OMAP && ARCH_OMAP_OTG && USB_OHCI_HCD
>- help
>- The most notable feature of USB OTG is support for a
>- "Dual-Role" device, which can act as either a device
>- or a host. The initial role choice can be changed
>- later, when two dual-role devices talk to each other.
>-
>- Select this only if your OMAP board has a Mini-AB connector.
>-
ok since this is replicated on drivers/usb/core/Kconfig but it's not
reflected on changelog. Could you add some extra comment ?
--
balbi
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/3] usb: trivial Kconfig cleanups
2010-10-19 8:15 ` Felipe Balbi
@ 2010-10-19 8:25 ` Felipe Contreras
2010-10-19 8:29 ` Felipe Balbi
0 siblings, 1 reply; 15+ messages in thread
From: Felipe Contreras @ 2010-10-19 8:25 UTC (permalink / raw)
To: balbi; +Cc: linux-usb, linux-main, Greg KH
On Tue, Oct 19, 2010 at 11:15 AM, Felipe Balbi <balbi@ti.com> wrote:
> On Tue, Oct 19, 2010 at 03:04:25AM -0500, Felipe Contreras wrote:
>>
>> @@ -125,14 +125,6 @@ config USB_MUSB_OTG
>>
>> endchoice
>>
>> -# enable peripheral support (including with OTG)
>> -config USB_GADGET_MUSB_HDRC
>> - bool
>> - depends on USB_MUSB_HDRC && (USB_MUSB_PERIPHERAL || USB_MUSB_OTG)
>> -# default y
>> -# select USB_GADGET_DUALSPEED
>> -# select USB_GADGET_SELECTED
>> -
>
> $ git grep -e CONFIG_USB_GADGET_MUSB_HDRC drivers/usb/
> drivers/usb/gadget/gadget_chips.h:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
> drivers/usb/musb/Makefile:ifeq ($(CONFIG_USB_GADGET_MUSB_HDRC),y)
> drivers/usb/musb/am35x.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
> drivers/usb/musb/da8xx.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
> drivers/usb/musb/musb_core.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
> drivers/usb/musb/musb_core.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
> drivers/usb/musb/musb_core.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
> drivers/usb/musb/musb_core.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
> drivers/usb/musb/musb_core.c:#endif /* CONFIG_USB_GADGET_MUSB_HDRC */
> drivers/usb/musb/musb_core.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
> drivers/usb/musb/musb_core.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
> drivers/usb/musb/musb_core.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
> drivers/usb/musb/musb_core.c:#elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
> drivers/usb/musb/musb_core.h:#ifndef CONFIG_USB_GADGET_MUSB_HDRC
> drivers/usb/musb/musb_core.h:#error bogus Kconfig output ... select
> CONFIG_USB_GADGET_MUSB_HDRC
> drivers/usb/musb/musb_core.h:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
> drivers/usb/musb/musb_core.h:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
> drivers/usb/musb/musb_core.h:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
> drivers/usb/musb/musb_core.h:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
> drivers/usb/musb/musb_core.h:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
> drivers/usb/musb/musb_core.h:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
> drivers/usb/musb/tusb6010.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
> drivers/usb/musb/tusb6010.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
> drivers/usb/musb/tusb6010.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
So?
% git grep USB_GADGET_MUSB_HDRC -- '*/Kconfig'
drivers/usb/gadget/Kconfig:config USB_GADGET_MUSB_HDRC
drivers/usb/musb/Kconfig:# use USB_GADGET_MUSB_HDRC not
USB_MUSB_PERIPHERAL to #ifdef peripheral
drivers/usb/musb/Kconfig: select USB_GADGET_MUSB_HDRC
drivers/usb/musb/Kconfig: select USB_GADGET_MUSB_HDRC
drivers/usb/musb/Kconfig:config USB_GADGET_MUSB_HDRC
drivers/usb/musb/Kconfig: select USB_OTG if USB_GADGET_MUSB_HDRC
(it's defined twice)
--
Felipe Contreras
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/3] usb: trivial Kconfig cleanups
2010-10-19 8:25 ` Felipe Contreras
@ 2010-10-19 8:29 ` Felipe Balbi
0 siblings, 0 replies; 15+ messages in thread
From: Felipe Balbi @ 2010-10-19 8:29 UTC (permalink / raw)
To: Felipe Contreras; +Cc: Balbi, Felipe, linux-usb, linux-main, Greg KH
On Tue, Oct 19, 2010 at 03:25:27AM -0500, Felipe Contreras wrote:
>On Tue, Oct 19, 2010 at 11:15 AM, Felipe Balbi <balbi@ti.com> wrote:
>> On Tue, Oct 19, 2010 at 03:04:25AM -0500, Felipe Contreras wrote:
>>>
>>> @@ -125,14 +125,6 @@ config USB_MUSB_OTG
>>>
>>> endchoice
>>>
>>> -# enable peripheral support (including with OTG)
>>> -config USB_GADGET_MUSB_HDRC
>>> - bool
>>> - depends on USB_MUSB_HDRC && (USB_MUSB_PERIPHERAL || USB_MUSB_OTG)
>>> -# default y
>>> -# select USB_GADGET_DUALSPEED
>>> -# select USB_GADGET_SELECTED
>>> -
>>
>> $ git grep -e CONFIG_USB_GADGET_MUSB_HDRC drivers/usb/
>> drivers/usb/gadget/gadget_chips.h:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
>> drivers/usb/musb/Makefile:ifeq ($(CONFIG_USB_GADGET_MUSB_HDRC),y)
>> drivers/usb/musb/am35x.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
>> drivers/usb/musb/da8xx.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
>> drivers/usb/musb/musb_core.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
>> drivers/usb/musb/musb_core.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
>> drivers/usb/musb/musb_core.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
>> drivers/usb/musb/musb_core.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
>> drivers/usb/musb/musb_core.c:#endif /* CONFIG_USB_GADGET_MUSB_HDRC */
>> drivers/usb/musb/musb_core.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
>> drivers/usb/musb/musb_core.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
>> drivers/usb/musb/musb_core.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
>> drivers/usb/musb/musb_core.c:#elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
>> drivers/usb/musb/musb_core.h:#ifndef CONFIG_USB_GADGET_MUSB_HDRC
>> drivers/usb/musb/musb_core.h:#error bogus Kconfig output ... select
>> CONFIG_USB_GADGET_MUSB_HDRC
>> drivers/usb/musb/musb_core.h:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
>> drivers/usb/musb/musb_core.h:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
>> drivers/usb/musb/musb_core.h:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
>> drivers/usb/musb/musb_core.h:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
>> drivers/usb/musb/musb_core.h:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
>> drivers/usb/musb/musb_core.h:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
>> drivers/usb/musb/tusb6010.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
>> drivers/usb/musb/tusb6010.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
>> drivers/usb/musb/tusb6010.c:#ifdef CONFIG_USB_GADGET_MUSB_HDRC
>
>So?
>
>% git grep USB_GADGET_MUSB_HDRC -- '*/Kconfig'
>drivers/usb/gadget/Kconfig:config USB_GADGET_MUSB_HDRC
>drivers/usb/musb/Kconfig:# use USB_GADGET_MUSB_HDRC not
>USB_MUSB_PERIPHERAL to #ifdef peripheral
>drivers/usb/musb/Kconfig: select USB_GADGET_MUSB_HDRC
>drivers/usb/musb/Kconfig: select USB_GADGET_MUSB_HDRC
>drivers/usb/musb/Kconfig:config USB_GADGET_MUSB_HDRC
>drivers/usb/musb/Kconfig: select USB_OTG if USB_GADGET_MUSB_HDRC
>
>(it's defined twice)
you're right, had missed that. This is ok too.
--
balbi
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/3] drivers: cleanup Kconfig stuff
2010-10-19 8:18 ` Felipe Balbi
@ 2010-10-19 8:34 ` Felipe Contreras
2010-10-19 9:01 ` Felipe Balbi
0 siblings, 1 reply; 15+ messages in thread
From: Felipe Contreras @ 2010-10-19 8:34 UTC (permalink / raw)
To: balbi; +Cc: linux-usb, linux-main, Greg KH
On Tue, Oct 19, 2010 at 11:18 AM, Felipe Balbi <balbi@ti.com> wrote:
> On Tue, Oct 19, 2010 at 03:04:26AM -0500, Felipe Contreras wrote:
>>
>> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
>> index db51ea1..523df52 100644
>> --- a/drivers/mfd/Kconfig
>> +++ b/drivers/mfd/Kconfig
>> @@ -156,6 +156,8 @@ config MENELAUS
>> config TWL4030_CORE
>> bool "Texas Instruments TWL4030/TWL5030/TWL6030/TPS659x0 Support"
>> depends on I2C=y && GENERIC_HARDIRQS
>> + depends on ARCH_OMAP3 || ARCH_OMAP4
>
> It's just an i2c chip, not depending on OMAP will allow us for a much
> needed compile test on linux-next with different architectures.
Ok.
>> @@ -842,7 +840,8 @@ config USB_CDC_COMPOSITE
>>
>> config USB_G_NOKIA
>> tristate "Nokia composite gadget"
>> - depends on PHONET
>> + depends on PHONET && MACH_NOKIA_RX51
>
> no. g_nokia only depends on PHONET, if someone else wants to use on
> another board, it's fine by me. Otherwise we will have to keep on adding
> more and more boards.
Ok.
>> + depends on USB_GADGET_MUSB_HDRC
>
> this gadget also works on controllers other than musb. As long as they
> support enough endpoints and alternate settings, it should just work.
>
> It was fine as it was before. NAK
It's not fine. You can build with CONFIG_USB_G_NOKIA=y, and it doesn't
work. Definitely some dependency is missing.
>> diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
>> index 20895c4..5484258 100644
>> --- a/drivers/usb/musb/Kconfig
>> +++ b/drivers/usb/musb/Kconfig
>> @@ -12,7 +12,7 @@ config USB_MUSB_HDRC
>> depends on (USB || USB_GADGET)
>> depends on (ARM || (BF54x && !BF544) || (BF52x && !BF522 &&
>> !BF523))
>> select NOP_USB_XCEIV if (ARCH_DAVINCI || MACH_OMAP3EVM || BLACKFIN)
>> - select TWL4030_USB if MACH_OMAP_3430SDP
>> + select TWL4030_USB if ARCH_OMAP3
>
> we have omap3-based boards which don't use twl4030-usb, they use
> nop-usb-xceiv. How do you want to handle that ?? NAK
How do you handle USB_MUSB_HDRC=y and NOP_USB_XCEIV=n and TWL4030_USB=n?
depends on (NOP_USB_XCEIV || TWL4030_USB) ?
--
Felipe Contreras
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/3] drivers: cleanup Kconfig stuff
2010-10-19 8:34 ` Felipe Contreras
@ 2010-10-19 9:01 ` Felipe Balbi
2010-10-19 9:55 ` Felipe Contreras
0 siblings, 1 reply; 15+ messages in thread
From: Felipe Balbi @ 2010-10-19 9:01 UTC (permalink / raw)
To: Felipe Contreras; +Cc: Balbi, Felipe, linux-usb, linux-main, Greg KH
Hi,
On Tue, Oct 19, 2010 at 03:34:55AM -0500, Felipe Contreras wrote:
>> It was fine as it was before. NAK
>
>It's not fine. You can build with CONFIG_USB_G_NOKIA=y, and it doesn't
>work. Definitely some dependency is missing.
if phonet is not set it should not build. If phonet is set to module and
g_nokia to built-in, then it's your mistake.
>How do you handle USB_MUSB_HDRC=y and NOP_USB_XCEIV=n and TWL4030_USB=n?
>
>depends on (NOP_USB_XCEIV || TWL4030_USB) ?
you're selecting, not depending on this patch. What I mean is that you
will enable a useless driver on some boards if you "select TWL4030_USB
if ARCH_OMAP3"
--
balbi
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/3] drivers: cleanup Kconfig stuff
2010-10-19 9:01 ` Felipe Balbi
@ 2010-10-19 9:55 ` Felipe Contreras
2010-10-19 10:12 ` Felipe Balbi
0 siblings, 1 reply; 15+ messages in thread
From: Felipe Contreras @ 2010-10-19 9:55 UTC (permalink / raw)
To: balbi; +Cc: linux-usb, linux-main, Greg KH
On Tue, Oct 19, 2010 at 12:01 PM, Felipe Balbi <balbi@ti.com> wrote:
> On Tue, Oct 19, 2010 at 03:34:55AM -0500, Felipe Contreras wrote:
>>>
>>> It was fine as it was before. NAK
>>
>> It's not fine. You can build with CONFIG_USB_G_NOKIA=y, and it doesn't
>> work. Definitely some dependency is missing.
>
> if phonet is not set it should not build. If phonet is set to module and
> g_nokia to built-in, then it's your mistake.
I'm not talking about phonet, I replied to your comment regarding
USB_GADGET_MUSB_HDRC. For me USB_GADGET_MUSB_HDRC=n USB_G_NOKIA=y
doesn't work, but the Kconfig allows it.
>> How do you handle USB_MUSB_HDRC=y and NOP_USB_XCEIV=n and TWL4030_USB=n?
>>
>> depends on (NOP_USB_XCEIV || TWL4030_USB) ?
>
> you're selecting, not depending on this patch. What I mean is that you
> will enable a useless driver on some boards if you "select TWL4030_USB
> if ARCH_OMAP3"
Ok, I'll make it: depends on (NOP_USB_XCEIV || TWL4030_USB)
BTW, if you want to try this:
./scripts/kconfig/conf --defconfig=usb_defconfig arch/arm/Kconfig
usb_defconfig:
CONFIG_ARCH_OMAP=y
CONFIG_EXPERIMENTAL=y
CONFIG_NET=y
CONFIG_PHONET=y
CONFIG_USB=y
CONFIG_USB_GADGET=y
CONFIG_USB_MUSB_OTG=y
CONFIG_USB_MUSB_HDRC=y
CONFIG_USB_G_NOKIA=y
# TODO USB_MUSB_OTG should select this
CONFIG_USB_GADGET_MUSB_HDRC=y
I expect TWL4030_USB and USB_OTG to be automatically selected.
--
Felipe Contreras
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/3] drivers: cleanup Kconfig stuff
2010-10-19 9:55 ` Felipe Contreras
@ 2010-10-19 10:12 ` Felipe Balbi
2010-10-19 10:52 ` Felipe Contreras
0 siblings, 1 reply; 15+ messages in thread
From: Felipe Balbi @ 2010-10-19 10:12 UTC (permalink / raw)
To: Felipe Contreras; +Cc: Balbi, Felipe, linux-usb, linux-main, Greg KH
Hi,
On Tue, Oct 19, 2010 at 04:55:04AM -0500, Felipe Contreras wrote:
>I'm not talking about phonet, I replied to your comment regarding
>USB_GADGET_MUSB_HDRC. For me USB_GADGET_MUSB_HDRC=n USB_G_NOKIA=y
>doesn't work, but the Kconfig allows it.
I see, that's a problem for sure.
>Ok, I'll make it: depends on (NOP_USB_XCEIV || TWL4030_USB)
>
>BTW, if you want to try this:
>./scripts/kconfig/conf --defconfig=usb_defconfig arch/arm/Kconfig
>
>usb_defconfig:
>CONFIG_ARCH_OMAP=y
>CONFIG_EXPERIMENTAL=y
>CONFIG_NET=y
>CONFIG_PHONET=y
>
>CONFIG_USB=y
>CONFIG_USB_GADGET=y
>CONFIG_USB_MUSB_OTG=y
>CONFIG_USB_MUSB_HDRC=y
>CONFIG_USB_G_NOKIA=y
>
># TODO USB_MUSB_OTG should select this
>CONFIG_USB_GADGET_MUSB_HDRC=y
>
>I expect TWL4030_USB and USB_OTG to be automatically selected.
could be, but that's a board-by-board thing. It's not mandatory to have
twl4030-usb, it's mandatory to have a transceiver, not matter which one
it is.
--
balbi
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/3] drivers: cleanup Kconfig stuff
2010-10-19 10:12 ` Felipe Balbi
@ 2010-10-19 10:52 ` Felipe Contreras
2010-10-19 11:28 ` Felipe Balbi
0 siblings, 1 reply; 15+ messages in thread
From: Felipe Contreras @ 2010-10-19 10:52 UTC (permalink / raw)
To: balbi; +Cc: linux-usb, linux-main, Greg KH
On Tue, Oct 19, 2010 at 1:12 PM, Felipe Balbi <balbi@ti.com> wrote:
> On Tue, Oct 19, 2010 at 04:55:04AM -0500, Felipe Contreras wrote:
>>
>> I'm not talking about phonet, I replied to your comment regarding
>> USB_GADGET_MUSB_HDRC. For me USB_GADGET_MUSB_HDRC=n USB_G_NOKIA=y
>> doesn't work, but the Kconfig allows it.
>
> I see, that's a problem for sure.
>
>> Ok, I'll make it: depends on (NOP_USB_XCEIV || TWL4030_USB)
>>
>> BTW, if you want to try this:
>> ./scripts/kconfig/conf --defconfig=usb_defconfig arch/arm/Kconfig
>>
>> usb_defconfig:
>> CONFIG_ARCH_OMAP=y
>> CONFIG_EXPERIMENTAL=y
>> CONFIG_NET=y
>> CONFIG_PHONET=y
>>
>> CONFIG_USB=y
>> CONFIG_USB_GADGET=y
>> CONFIG_USB_MUSB_OTG=y
>> CONFIG_USB_MUSB_HDRC=y
>> CONFIG_USB_G_NOKIA=y
>>
>> # TODO USB_MUSB_OTG should select this
>> CONFIG_USB_GADGET_MUSB_HDRC=y
>>
>> I expect TWL4030_USB and USB_OTG to be automatically selected.
>
> could be, but that's a board-by-board thing. It's not mandatory to have
> twl4030-usb, it's mandatory to have a transceiver, not matter which one
> it is.
I see, but is it possible that in a board you have the two? If not,
there must be a way to find the correct transceiver based on the
configuration. If yes, then there must be a way to select a sensible
one by default, rather than not having any.
This way, for example it would be possible to get rid of some lines in
a minimal n900_defconfig (used in MeeGo[1]), and eventually hopefully
get rid of all of them (except CONFIG_SND_OMAP_SOC_RX51=y).
[1] http://meego.gitorious.org/meego-os-base/kernel-source/blobs/master/config-arm-n900
--
Felipe Contreras
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/3] drivers: cleanup Kconfig stuff
2010-10-19 10:52 ` Felipe Contreras
@ 2010-10-19 11:28 ` Felipe Balbi
0 siblings, 0 replies; 15+ messages in thread
From: Felipe Balbi @ 2010-10-19 11:28 UTC (permalink / raw)
To: Felipe Contreras; +Cc: Balbi, Felipe, linux-usb, linux-main, Greg KH
Hi,
On Tue, Oct 19, 2010 at 05:52:10AM -0500, Felipe Contreras wrote:
>I see, but is it possible that in a board you have the two? If not,
Yes. N900 is one of them :-) It has twl4030-usb for VBUS/ID (id isn't
used) and isp1707 for data lines. It's insane but it's becoming more and
more common to see a HW with two transceivers.
>there must be a way to find the correct transceiver based on the
>configuration. If yes, then there must be a way to select a sensible
>one by default, rather than not having any.
True, but currently that's not the case. We needed a real usb
transceiver "class" (or something else) where you have something like:
struct usb_xceiv {
struct list_head head;
struct device dev;
unsigned capabilities;
...
};
then you define a transceiver with:
struct usb_xceiv twl4030_usb {
.name = "twl4030-usb",
.capabilities = USB_XCEIV_CAP_VBUS
| USB_XCEIV_CAP_DETECT_CHARGER
| USB_XCEIV_CAP_DATA
| USB_XCEIV_CAP_WHATEVER_BOARD_NEEDS,
...
};
capabilities will also be board-specific in most cases, so you could
bring that from platform_data. Currently there's no such thing and I'm
too busy with musb/ehci/ohci/UDC Class to start that.
BTW, this also means the otg_transceiver is a mis-name as a transceiver
is needed in any connection is isn't TLL (transceiver-less link), so you
have usb transceiver in host-only and gadget-only configurations too.
If nobody starts the usb_xceiv class, I'll do it at some point and while
doing that drivers/usb/otg will be renamed to drivers/usb/xceiv together
with all structures and headers. Drivers/usb/otg will hold real otg
peculiarities.
>This way, for example it would be possible to get rid of some lines in
>a minimal n900_defconfig (used in MeeGo[1]), and eventually hopefully
>get rid of all of them (except CONFIG_SND_OMAP_SOC_RX51=y).
true, it would also allow you to have one binary for all your products
:-) althought not so optimal, it's good to ease development/testing.
--
balbi
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2010-10-19 11:28 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-19 8:04 [PATCH 0/3] usb: geneirc Kconfig fixes Felipe Contreras
2010-10-19 8:04 ` [PATCH 1/3] usb: fix Kconfig warning Felipe Contreras
2010-10-19 8:20 ` Felipe Balbi
2010-10-19 8:04 ` [PATCH 2/3] usb: trivial Kconfig cleanups Felipe Contreras
2010-10-19 8:15 ` Felipe Balbi
2010-10-19 8:25 ` Felipe Contreras
2010-10-19 8:29 ` Felipe Balbi
2010-10-19 8:04 ` [PATCH 3/3] drivers: cleanup Kconfig stuff Felipe Contreras
2010-10-19 8:18 ` Felipe Balbi
2010-10-19 8:34 ` Felipe Contreras
2010-10-19 9:01 ` Felipe Balbi
2010-10-19 9:55 ` Felipe Contreras
2010-10-19 10:12 ` Felipe Balbi
2010-10-19 10:52 ` Felipe Contreras
2010-10-19 11:28 ` Felipe Balbi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®