diff mbox series

[1/4] staging: wilc1000: use runtime configuration for sdio oob interrupt

Message ID 20191122205153.30723-1-adham.abozaeid@microchip.com (mailing list archive)
State Not Applicable
Delegated to: Johannes Berg
Headers show
Series [1/4] staging: wilc1000: use runtime configuration for sdio oob interrupt | expand

Commit Message

Adham Abozaeid Nov. 22, 2019, 8:52 p.m. UTC
From: Ajay Singh <ajay.kathat@microchip.com>

Set SDIO Out-of-band interrupt configuration at run time by passing
parameter during module load.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/staging/wilc1000/Kconfig | 10 ----------
 drivers/staging/wilc1000/sdio.c  |  7 ++++++-
 2 files changed, 6 insertions(+), 11 deletions(-)

Comments

Dan Carpenter Nov. 25, 2019, 6:54 a.m. UTC | #1
On Fri, Nov 22, 2019 at 08:52:02PM +0000, Adham.Abozaeid@microchip.com wrote:
> From: Ajay Singh <ajay.kathat@microchip.com>
> 
> Set SDIO Out-of-band interrupt configuration at run time by passing
> parameter during module load.
> 

This is barely an improvement at all...  Why not just make it auto
detect?

regards,
dan carpenter
Julian Calaby Nov. 25, 2019, 9:26 a.m. UTC | #2
Hi Adham,

On Sat, Nov 23, 2019 at 7:55 AM <Adham.Abozaeid@microchip.com> wrote:
>
> From: Ajay Singh <ajay.kathat@microchip.com>
>
> Set SDIO Out-of-band interrupt configuration at run time by passing
> parameter during module load.

The OOB interrupt is a GPIO and this is an SDIO card, so why not just
set the relevant pin in the devicetree and detect it based on that?

I'm pretty sure that the Broadcom fmac driver does something like this.

Thanks,
Adham Abozaeid Dec. 3, 2019, 7:10 p.m. UTC | #3
On 11/25/19 2:26 AM, Julian Calaby wrote:
> Hi Adham,
>
> The OOB interrupt is a GPIO and this is an SDIO card, so why not just
> set the relevant pin in the devicetree and detect it based on that?
>
> I'm pretty sure that the Broadcom fmac driver does something like this.
Thanks Julian and Dan for your feedback. We will go through the fmac driver to see how to improve OOB selection based on that, and send v2 of this patch.
Greg, will it be possible to ignore this patch for now and merge the rest of the patch series?

Thanks,
Adham
Greg Kroah-Hartman Dec. 10, 2019, 9:27 a.m. UTC | #4
On Tue, Dec 03, 2019 at 07:10:26PM +0000, Adham.Abozaeid@microchip.com wrote:
> 
> 
> On 11/25/19 2:26 AM, Julian Calaby wrote:
> > Hi Adham,
> >
> > The OOB interrupt is a GPIO and this is an SDIO card, so why not just
> > set the relevant pin in the devicetree and detect it based on that?
> >
> > I'm pretty sure that the Broadcom fmac driver does something like this.
> Thanks Julian and Dan for your feedback. We will go through the fmac driver to see how to improve OOB selection based on that, and send v2 of this patch.
> Greg, will it be possible to ignore this patch for now and merge the rest of the patch series?

Now ignored!
diff mbox series

Patch

diff --git a/drivers/staging/wilc1000/Kconfig b/drivers/staging/wilc1000/Kconfig
index 59e58550d139..e556d3c9039b 100644
--- a/drivers/staging/wilc1000/Kconfig
+++ b/drivers/staging/wilc1000/Kconfig
@@ -30,13 +30,3 @@  config WILC1000_SPI
 	  full-duplex slave synchronous serial interface that is available
 	  immediately following reset when pin 9 (SDIO_SPI_CFG) is tied to
 	  VDDIO. Select this if your platform is using the SPI bus.
-
-config WILC1000_HW_OOB_INTR
-	bool "WILC1000 out of band interrupt"
-	depends on WILC1000_SDIO
-	help
-	  This option enables out-of-band interrupt support for the WILC1000
-	  chipset. This OOB interrupt is intended to provide a faster interrupt
-	  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.
diff --git a/drivers/staging/wilc1000/sdio.c b/drivers/staging/wilc1000/sdio.c
index 319e039380b0..098094ab5156 100644
--- a/drivers/staging/wilc1000/sdio.c
+++ b/drivers/staging/wilc1000/sdio.c
@@ -11,6 +11,11 @@ 
 #include "netdev.h"
 #include "cfg80211.h"
 
+static bool enable_oob_interrupt;
+module_param(enable_oob_interrupt, bool, 0644);
+MODULE_PARM_DESC(enable_oob_interrupt,
+		 "enables sdio out-of-band interrupt support");
+
 #define SDIO_MODALIAS "wilc1000_sdio"
 
 #define SDIO_VENDOR_ID_WILC 0x0296
@@ -131,7 +136,7 @@  static int wilc_sdio_probe(struct sdio_func *func,
 	if (!sdio_priv)
 		return -ENOMEM;
 
-	if (IS_ENABLED(CONFIG_WILC1000_HW_OOB_INTR)) {
+	if (enable_oob_interrupt) {
 		gpio = gpiod_get(&func->dev, "irq", GPIOD_IN);
 		if (IS_ERR(gpio)) {
 			/* get the GPIO descriptor from hardcode GPIO number */