linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging/wilc: fix Kconfig dependencies, second try
@ 2015-10-16 20:45 Arnd Bergmann
  2015-10-19  7:54 ` Tony Cho
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2015-10-16 20:45 UTC (permalink / raw)
  To: linux-arm-kernel

My first attempt to fix the Kconfig logic for wilc1000 was incomplete,
as it missed the case where SPI is built-in while SDIO is modular
and wilc1000 is configured as built-in in SPI mode (or vice versa),
which would still lead to a link failure.

This works around the problem by adding an intermediate Kconfig
symbol "WILC1000_DRIVER" that controls visibility of the SDIO and
SPI sub-drivers, so we can control the dependencies better.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 9535ebc5e9cc ("staging/wilc1000: fix Kconfig dependencies")

diff --git a/drivers/staging/wilc1000/Kconfig b/drivers/staging/wilc1000/Kconfig
index 59ccecc316df..ee51b4278088 100644
--- a/drivers/staging/wilc1000/Kconfig
+++ b/drivers/staging/wilc1000/Kconfig
@@ -1,14 +1,16 @@
-config WILC1000
-	tristate "WILC1000 support (WiFi only)"
-	depends on !S390
+config WILC1000_DRIVER
+	bool "WILC1000 support (WiFi only)"
 	depends on CFG80211 && WEXT_CORE && INET
-	depends on MMC || SPI
 	---help---
 	  This module only support IEEE 802.11n WiFi.
 
+if WILC1000_DRIVER
+
+config WILC1000
+	tristate
+
 choice
         prompt "Memory Allocation"
-        depends on WILC1000
         default WILC1000_PREALLOCATE_AT_LOADING_DRIVER
 
 config WILC1000_PREALLOCATE_AT_LOADING_DRIVER
@@ -29,12 +31,12 @@ endchoice
 
 choice
 	prompt "Bus Type"
-	depends on WILC1000
 	default WILC1000_SDIO
 
-	config WILC1000_SDIO
+config WILC1000_SDIO
 	bool "SDIO support"
 	depends on MMC
+	select WILC1000
 	---help---
 	  This module adds support for the SDIO interface of adapters using
 	  WILC1000 chipset. The Atmel WILC1000 SDIO is a full speed interface.
@@ -45,8 +47,9 @@ choice
 	  To use this interface, pin9 (SDIO_SPI_CFG) must be grounded. Select
 	  this if your platform is using the SDIO bus.
 
-	config WILC1000_SPI
+config WILC1000_SPI
 	depends on SPI
+	select WILC1000
 	bool "SPI support"
 	---help---
 	  This module adds support for the SPI interface of adapters using
@@ -60,7 +63,7 @@ endchoice
 
 config WILC1000_HW_OOB_INTR
 	bool "Use out of band interrupt"
-	depends on WILC1000 && WILC1000_SDIO
+	depends on WILC1000_SDIO
 	default n
 	---help---
 	  This option enables out-of-band interrupt support for the WILC1000
@@ -68,3 +71,5 @@ config WILC1000_HW_OOB_INTR
 	  mechanism for SDIO host controllers that don't support SDIO interrupt.
 	  Select this option If the SDIO host controller in your platform
 	  doesn't support SDIO time devision interrupt.
+
+endif

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

* [PATCH] staging/wilc: fix Kconfig dependencies, second try
  2015-10-16 20:45 [PATCH] staging/wilc: fix Kconfig dependencies, second try Arnd Bergmann
@ 2015-10-19  7:54 ` Tony Cho
  2015-10-19  9:39   ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Tony Cho @ 2015-10-19  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Arnd Bergmann,

When I apply this patch, I cannot make WILC1000 module (wilc1000.ko) because CONFIG_WILC1000 is y and also I can see some link errors for the cfg80211 APIs.

Can you consider this patch?

Thanks,

Tony.


On 2015? 10? 17? 05:45, Arnd Bergmann wrote:
> My first attempt to fix the Kconfig logic for wilc1000 was incomplete,
> as it missed the case where SPI is built-in while SDIO is modular
> and wilc1000 is configured as built-in in SPI mode (or vice versa),
> which would still lead to a link failure.
>
> This works around the problem by adding an intermediate Kconfig
> symbol "WILC1000_DRIVER" that controls visibility of the SDIO and
> SPI sub-drivers, so we can control the dependencies better.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 9535ebc5e9cc ("staging/wilc1000: fix Kconfig dependencies")
>
> diff --git a/drivers/staging/wilc1000/Kconfig b/drivers/staging/wilc1000/Kconfig
> index 59ccecc316df..ee51b4278088 100644
> --- a/drivers/staging/wilc1000/Kconfig
> +++ b/drivers/staging/wilc1000/Kconfig
> @@ -1,14 +1,16 @@
> -config WILC1000
> -	tristate "WILC1000 support (WiFi only)"
> -	depends on !S390
> +config WILC1000_DRIVER
> +	bool "WILC1000 support (WiFi only)"
>   	depends on CFG80211 && WEXT_CORE && INET
> -	depends on MMC || SPI
>   	---help---
>   	  This module only support IEEE 802.11n WiFi.
>   
> +if WILC1000_DRIVER
> +
> +config WILC1000
> +	tristate
> +
>   choice
>           prompt "Memory Allocation"
> -        depends on WILC1000
>           default WILC1000_PREALLOCATE_AT_LOADING_DRIVER
>   
>   config WILC1000_PREALLOCATE_AT_LOADING_DRIVER
> @@ -29,12 +31,12 @@ endchoice
>   
>   choice
>   	prompt "Bus Type"
> -	depends on WILC1000
>   	default WILC1000_SDIO
>   
> -	config WILC1000_SDIO
> +config WILC1000_SDIO
>   	bool "SDIO support"
>   	depends on MMC
> +	select WILC1000
>   	---help---
>   	  This module adds support for the SDIO interface of adapters using
>   	  WILC1000 chipset. The Atmel WILC1000 SDIO is a full speed interface.
> @@ -45,8 +47,9 @@ choice
>   	  To use this interface, pin9 (SDIO_SPI_CFG) must be grounded. Select
>   	  this if your platform is using the SDIO bus.
>   
> -	config WILC1000_SPI
> +config WILC1000_SPI
>   	depends on SPI
> +	select WILC1000
>   	bool "SPI support"
>   	---help---
>   	  This module adds support for the SPI interface of adapters using
> @@ -60,7 +63,7 @@ endchoice
>   
>   config WILC1000_HW_OOB_INTR
>   	bool "Use out of band interrupt"
> -	depends on WILC1000 && WILC1000_SDIO
> +	depends on WILC1000_SDIO
>   	default n
>   	---help---
>   	  This option enables out-of-band interrupt support for the WILC1000
> @@ -68,3 +71,5 @@ config WILC1000_HW_OOB_INTR
>   	  mechanism for SDIO host controllers that don't support SDIO interrupt.
>   	  Select this option If the SDIO host controller in your platform
>   	  doesn't support SDIO time devision interrupt.
> +
> +endif
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] staging/wilc: fix Kconfig dependencies, second try
  2015-10-19  7:54 ` Tony Cho
@ 2015-10-19  9:39   ` Arnd Bergmann
  2015-10-19  9:53     ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2015-10-19  9:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday 19 October 2015 16:54:23 Tony Cho wrote:
> Hi Arnd Bergmann,
> 
> When I apply this patch, I cannot make WILC1000 module (wilc1000.ko) because CONFIG_WILC1000 is y and also I can see some link errors for the cfg80211 APIs.
> 
> Can you consider this patch?

Ah, you are right. I see the same thing now and don't know what caused me
to send the patch in an incomplete state.

I hope this snippet is the last missing piece:

diff --git a/drivers/staging/wilc1000/Kconfig b/drivers/staging/wilc1000/Kconfig
index ee51b4278088..e3f109655be4 100644
--- a/drivers/staging/wilc1000/Kconfig
+++ b/drivers/staging/wilc1000/Kconfig
@@ -1,6 +1,7 @@
 config WILC1000_DRIVER
-	bool "WILC1000 support (WiFi only)"
+	tristate "WILC1000 support (WiFi only)"
 	depends on CFG80211 && WEXT_CORE && INET
+	depends on MMC || SPI
 	---help---
 	  This module only support IEEE 802.11n WiFi.
 
@@ -35,7 +36,7 @@ choice
 
 config WILC1000_SDIO
 	bool "SDIO support"
-	depends on MMC
+	depends on MMC=y || (MMC=m && WILC1000_DRIVER=m)
 	select WILC1000
 	---help---
 	  This module adds support for the SDIO interface of adapters using

I'll do a few hundred more randconfig builds with this on top and submit
it once it succeeds.

	Arnd

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

* [PATCH] staging/wilc: fix Kconfig dependencies, second try
  2015-10-19  9:39   ` Arnd Bergmann
@ 2015-10-19  9:53     ` Arnd Bergmann
  2015-10-20 22:42       ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2015-10-19  9:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday 19 October 2015 11:39:31 Arnd Bergmann wrote:
> On Monday 19 October 2015 16:54:23 Tony Cho wrote:
> > Hi Arnd Bergmann,
> > 
> > When I apply this patch, I cannot make WILC1000 module (wilc1000.ko) because CONFIG_WILC1000 is y and also I can see some link errors for the cfg80211 APIs.
> > 
> > Can you consider this patch?
> 
> Ah, you are right. I see the same thing now and don't know what caused me
> to send the patch in an incomplete state.
> 
> I hope this snippet is the last missing piece:
> 

No, that was not it either, I'll start over to think this through.

The real solution of course is to make it possible to load both the
SPI and MMC front-ends at the same time and have a common base driver,
which I might have to do, in order to clear myself of the shame of sending
not one but two incorrect fixes for this problem ;-)

	Arnd

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

* [PATCH] staging/wilc: fix Kconfig dependencies, second try
  2015-10-19  9:53     ` Arnd Bergmann
@ 2015-10-20 22:42       ` Arnd Bergmann
  0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2015-10-20 22:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday 19 October 2015 11:53:40 Arnd Bergmann wrote:
> On Monday 19 October 2015 11:39:31 Arnd Bergmann wrote:
> > On Monday 19 October 2015 16:54:23 Tony Cho wrote:
> > > Hi Arnd Bergmann,
> > > 
> > > When I apply this patch, I cannot make WILC1000 module (wilc1000.ko) because CONFIG_WILC1000 is y and also I can see some link errors for the cfg80211 APIs.
> > > 
> > > Can you consider this patch?
> > 
> > Ah, you are right. I see the same thing now and don't know what caused me
> > to send the patch in an incomplete state.
> > 
> > I hope this snippet is the last missing piece:
> > 
> 
> No, that was not it either, I'll start over to think this through.
> 
> The real solution of course is to make it possible to load both the
> SPI and MMC front-ends at the same time and have a common base driver,
> which I might have to do, in order to clear myself of the shame of sending
> not one but two incorrect fixes for this problem 

I spent too much time on it now, but I have a series that should fix
this part for real and let you build both drivers into the kernel
(or as modules) in a single configuration.

	Arnd

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

end of thread, other threads:[~2015-10-20 22:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-16 20:45 [PATCH] staging/wilc: fix Kconfig dependencies, second try Arnd Bergmann
2015-10-19  7:54 ` Tony Cho
2015-10-19  9:39   ` Arnd Bergmann
2015-10-19  9:53     ` Arnd Bergmann
2015-10-20 22:42       ` 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).