usb: limit OMAP related USB options to OMAP2PLUS platforms
PATCH 1/1 usb: limit OMAP related USB options to OMAP2PLUS platforms
commit 57f6ce072e35770a63be0c5d5e82f90d8da7d665 ("usb: phy:
add a new driver for usb3 phy") added the new Kconfig option OMAP_USB3, but it had no dependencies whatsoever, and hence became available across all arch/platforms.
Which presumably caused this to show up in x86 randconfig:
warning: (USB_MUSB_HDRC && OMAP_USB3) selects \
OMAP_CONTROL_USB which has unmet direct \
dependencies (USB_SUPPORT && ARCH_OMAP2PLUS)Then commit 6992819feb39cb9adac72170555d957d07f869f2 ("usb: phy:
fix Kconfig warning") was added. However, this just deleted the ARCH_OMAP2PLUS dependency from OMAP_CONTROL_USB, further compounding the problem by opening up OMAP_CONTROL_USB to all arch/platforms as well.
Here we revert the change of 6992819feb to restore the dependency, and add the same ARCH_OMAP2PLUS dependency to the new OMAP_USB3.
Perhaps a more platform specific dependency could be chosen for OMAP_USB3, but at least this keeps it from bleeding out to other architectures and non-OMAP ARM platforms as it is currently doing.
--- drivers/usb/phy/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/phy/Kconfig +2 -0
@@ -17,6 +17,7 @@ config OMAP_USB2 config OMAP_USB3 tristate "OMAP USB3 PHY Driver" + depends on ARCH_OMAP2PLUS select USB_OTG_UTILS select OMAP_CONTROL_USB help
@@ -27,6 +28,7 @@ config OMAP_USB3 config OMAP_CONTROL_USB tristate "OMAP CONTROL USB Driver" + depends on ARCH_OMAP2PLUS help Enable this to add support for the USB part present in the control module. This driver has API to power on the USB2 PHY and to write to
Signature · 1 line
1.8.1.2
HI,
Quoted 46 lines · Paul Gortmaker
commit
57f6ce072e35770a63be0c5d5e82f90d8da7d665("usb: phy:
add a new driver for usb3 phy") added the newKconfigoptionOMAP_USB3, but it had no dependencies whatsoever, and hence became available across allarch/platforms.Which presumably caused this to show up in x86 randconfig:
warning: (USB_MUSB_HDRC && OMAP_USB3) selects \ OMAP_CONTROL_USB which has unmet direct \ dependencies (USB_SUPPORT && ARCH_OMAP2PLUS)Then commit
6992819feb39cb9adac72170555d957d07f869f2("usb: phy:
fixKconfigwarning") was added. However, this just deleted theARCH_OMAP2PLUSdependency fromOMAP_CONTROL_USB, further compounding the problem by opening upOMAP_CONTROL_USBto allarch/platformsas well.Here we revert the change of
6992819febto restore the dependency, and add the sameARCH_OMAP2PLUSdependency to the newOMAP_USB3.Perhaps a more platform specific dependency could be chosen for
OMAP_USB3, but at least this keeps it from bleeding out to other architectures and non-OMAP ARM platforms as it is currently doing.Cc Felipe Balbi <[email protected]>Cc Kishon Vijay Abraham I <[email protected]>Cc Moiz Sonasath <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Paul Gortmaker <[email protected]>--- drivers/usb/phy/Kconfig | 2 ++ 1 file changed, 2 insertions(+)drivers/usb/phy/Kconfig +1
-0@@ -17,6 +17,7 @@ config OMAP_USB2 config OMAP_USB3 tristate "OMAP USB3 PHY Driver" + depends on ARCH_OMAP2PLUS select USB_OTG_UTILS select OMAP_CONTROL_USB help
drivers/usb/phy/Kconfig config OMAP_USB3 · line 31
Quoted 4 lines
drivers/usb/phy/Kconfig +1
-0@@ -27,6 +28,7 @@ config OMAP_USB3 config OMAP_CONTROL_USB tristate "OMAP CONTROL USB Driver" + depends on ARCH_OMAP2PLUS
I rather not add dependencies here and fix the selections of OMAP_CONTROL_USB.
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130227/3330317a/attachment.sig>
Quoted 50 lines · Felipe Balbi
HI,
Quoted 47 lines · Paul Gortmaker
commit
57f6ce072e35770a63be0c5d5e82f90d8da7d665("usb: phy:
add a new driver for usb3 phy") added the newKconfigoptionOMAP_USB3, but it had no dependencies whatsoever, and hence became available across allarch/platforms.Which presumably caused this to show up in x86 randconfig:
warning: (USB_MUSB_HDRC && OMAP_USB3) selects \ OMAP_CONTROL_USB which has unmet direct \ dependencies (USB_SUPPORT && ARCH_OMAP2PLUS)Then commit
6992819feb39cb9adac72170555d957d07f869f2("usb: phy:
fixKconfigwarning") was added. However, this just deleted theARCH_OMAP2PLUSdependency fromOMAP_CONTROL_USB, further compounding the problem by opening upOMAP_CONTROL_USBto allarch/platformsas well.Here we revert the change of
6992819febto restore the dependency, and add the sameARCH_OMAP2PLUSdependency to the newOMAP_USB3.Perhaps a more platform specific dependency could be chosen for
OMAP_USB3, but at least this keeps it from bleeding out to other architectures and non-OMAP ARM platforms as it is currently doing.Cc Felipe Balbi <[email protected]>Cc Kishon Vijay Abraham I <[email protected]>Cc Moiz Sonasath <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Paul Gortmaker <[email protected]>--- drivers/usb/phy/Kconfig | 2 ++ 1 file changed, 2 insertions(+)drivers/usb/phy/Kconfig +1
-0@@ -17,6 +17,7 @@ config OMAP_USB2 config OMAP_USB3 tristate "OMAP USB3 PHY Driver" + depends on ARCH_OMAP2PLUS select USB_OTG_UTILS select OMAP_CONTROL_USB help@@ -27,6 +28,7 @@ config OMAP_USB3
Quoted 6 lines
drivers/usb/phy/Kconfig config OMAP_USB3 · line 31
Quoted 3 lines
drivers/usb/phy/Kconfig +1
-0config OMAP_CONTROL_USB tristate "OMAP CONTROL USB Driver" + depends on ARCH_OMAP2PLUSI rather not add dependencies here and fix the selections of
OMAP_CONTROL_USB.
I am not sure I understand what you mean, or why you wouldn't want sane dependencies in place like those given above. Perhaps you can send an alternate patch so there is no ambiguity?
Paul.
Quoted 1 line
Quoted 58 lines · Paul Gortmaker
Quoted 50 lines · Felipe Balbi
HI,
Quoted 47 lines · Paul Gortmaker
commit
57f6ce072e35770a63be0c5d5e82f90d8da7d665("usb: phy:
add a new driver for usb3 phy") added the newKconfigoptionOMAP_USB3, but it had no dependencies whatsoever, and hence became available across allarch/platforms.Which presumably caused this to show up in x86 randconfig:
warning: (USB_MUSB_HDRC && OMAP_USB3) selects \ OMAP_CONTROL_USB which has unmet direct \ dependencies (USB_SUPPORT && ARCH_OMAP2PLUS)Then commit
6992819feb39cb9adac72170555d957d07f869f2("usb: phy:
fixKconfigwarning") was added. However, this just deleted theARCH_OMAP2PLUSdependency fromOMAP_CONTROL_USB, further compounding the problem by opening upOMAP_CONTROL_USBto allarch/platformsas well.Here we revert the change of
6992819febto restore the dependency, and add the sameARCH_OMAP2PLUSdependency to the newOMAP_USB3.Perhaps a more platform specific dependency could be chosen for
OMAP_USB3, but at least this keeps it from bleeding out to other architectures and non-OMAP ARM platforms as it is currently doing.Cc Felipe Balbi <[email protected]>Cc Kishon Vijay Abraham I <[email protected]>Cc Moiz Sonasath <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Paul Gortmaker <[email protected]>--- drivers/usb/phy/Kconfig | 2 ++ 1 file changed, 2 insertions(+)drivers/usb/phy/Kconfig +1
-0@@ -17,6 +17,7 @@ config OMAP_USB2 config OMAP_USB3 tristate "OMAP USB3 PHY Driver" + depends on ARCH_OMAP2PLUS select USB_OTG_UTILS select OMAP_CONTROL_USB help@@ -27,6 +28,7 @@ config OMAP_USB3Quoted 6 lines
drivers/usb/phy/Kconfig config OMAP_USB3 · line 31
Quoted 3 lines
drivers/usb/phy/Kconfig +1
-0config OMAP_CONTROL_USB tristate "OMAP CONTROL USB Driver" + depends on ARCH_OMAP2PLUSI rather not add dependencies here and fix the selections of
OMAP_CONTROL_USB.
Quoted 3 lines
I am not sure I understand what you mean, or why you wouldn't want sane dependencies in place like those given above. Perhaps you can send an alternate patch so there is no ambiguity?
Hi Felipe,
I'm still seeing the OMAP settings in x86 builds on mainline from today, and since I'd not got a reply to the above, I'm still wondering what alternative you have in mind vs. my above patch. We can't be having the arch specific settings leaking out to the other arch where they make no sense[1].
Thanks,
Paul.
Hi,
Quoted 25 lines · Paul Gortmaker
Quoted 21 lines
Quoted 14 lines
Quoted 14 lines
drivers/usb/phy/Kconfig +1
-0@@ -17,6 +17,7 @@ config OMAP_USB2 config OMAP_USB3 tristate "OMAP USB3 PHY Driver" + depends on ARCH_OMAP2PLUS select USB_OTG_UTILS select OMAP_CONTROL_USB help@@ -27,6 +28,7 @@ config OMAP_USB3Quoted 6 lines
drivers/usb/phy/Kconfig config OMAP_USB3 · line 31
Quoted 3 lines
drivers/usb/phy/Kconfig +1
-0config OMAP_CONTROL_USB tristate "OMAP CONTROL USB Driver" + depends on ARCH_OMAP2PLUSI rather not add dependencies here and fix the selections of
OMAP_CONTROL_USB.Quoted 3 lines
I am not sure I understand what you mean, or why you wouldn't want sane dependencies in place like those given above. Perhaps you can send an alternate patch so there is no ambiguity?
Quoted 7 lines
Hi Felipe,
I'm still seeing the OMAP settings in x86 builds on mainline from today, and since I'd not got a reply to the above, I'm still wondering what alternative you have in mind vs. my above patch. We can't be having the arch specific settings leaking out to the other arch where they make no sense[1].
why not ? It forces people to write portable drivers, it forces people to avoid including the wrong headers and allows maintainers and patch authors to easily compile test their drivers.
On top of all that, it lets me better use linux-next as a big build testing before I send a pull request to Greg.
When you're going to build a product, you will come up with a proper .config anyway. Because of a bunch of these misused 'depends on' and 'select' statements that right now ARM multiplatform builds don't even compile cleanly if you enable all ARM-related drivers.
Until all of those are cleaned up, the best way is to force people to write drivers which compile in all architectures and make sure Kconfig doesn't add any ARCH dependency.
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130314/170926b3/attachment.sig>
Quoted 36 lines · Felipe Balbi
Hi,
Quoted 25 lines · Paul Gortmaker
Quoted 21 lines
Quoted 14 lines
Quoted 14 lines
drivers/usb/phy/Kconfig +1
-0@@ -17,6 +17,7 @@ config OMAP_USB2 config OMAP_USB3 tristate "OMAP USB3 PHY Driver" + depends on ARCH_OMAP2PLUS select USB_OTG_UTILS select OMAP_CONTROL_USB help@@ -27,6 +28,7 @@ config OMAP_USB3Quoted 6 lines
drivers/usb/phy/Kconfig config OMAP_USB3 · line 31
Quoted 3 lines
drivers/usb/phy/Kconfig +1
-0config OMAP_CONTROL_USB tristate "OMAP CONTROL USB Driver" + depends on ARCH_OMAP2PLUSI rather not add dependencies here and fix the selections of
OMAP_CONTROL_USB.Quoted 3 lines
I am not sure I understand what you mean, or why you wouldn't want sane dependencies in place like those given above. Perhaps you can send an alternate patch so there is no ambiguity?
Quoted 7 lines
Hi Felipe,
I'm still seeing the OMAP settings in x86 builds on mainline from today, and since I'd not got a reply to the above, I'm still wondering what alternative you have in mind vs. my above patch. We can't be having the arch specific settings leaking out to the other arch where they make no sense[1].
Quoted 3 lines
why not ? It forces people to write portable drivers, it forces people to avoid including the wrong headers and allows maintainers and patch authors to easily compile test their drivers.
Why not? That was covered in the link I'd referenced. What you list above is a very developer centric point of view. To quote Andrew Morton from that same link, in regards to dependencies and how they should be used:
"...offering useless stuff to non-kernel-developers has downsides with no balancing benefit, and we really should optimise things for our users because there are so many more of them than there are of us."
Look at what you've written. The key word above and below in your text is "force people". Showing no interest in simplifying things for our users and taking that approach is a good way to alienate our user base.
Paul.
--
Quoted 13 lines
On top of all that, it lets me better use linux-next as a big build testing before I send a pull request to Greg.
When you're going to build a product, you will come up with a proper .config anyway. Because of a bunch of these misused 'depends on' and 'select' statements that right now ARM multiplatform builds don't even compile cleanly if you enable all ARM-related drivers.
Until all of those are cleaned up, the best way is to force people to write drivers which compile in all architectures and make sure
Kconfigdoesn't add any ARCH dependency.