linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hauke Mehrtens <hauke@hauke-m.de>
To: linus.walleij@linaro.org, kvalo@codeaurora.org
Cc: zajec5@gmail.com, nbd@openwrt.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH v2] bcma: switch GPIO portions to use GPIOLIB_IRQCHIP
Date: Sun, 02 Aug 2015 20:28:55 +0200	[thread overview]
Message-ID: <55BE6167.7090101@hauke-m.de> (raw)
In-Reply-To: <1438538405-9133-1-git-send-email-hauke@hauke-m.de>

On 08/02/2015 08:00 PM, Hauke Mehrtens wrote:
> From: Linus Walleij <linus.walleij@linaro.org>
> 
> This switches the BCMA GPIO driver to use GPIOLIB_IRQCHIP to
> handle its interrupts instead of rolling its own copy of the
> irqdomain handling etc.
> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
> ---
> 
> I fixed some bugs in the original patch, some of them are compile 
> errors and others caused some runtime problems. This patch worked on my 
> BCM4708 based device, I was able to receive an IRQ for a GPIO change 
> (button press).
> 
> I think this should go through the wireless tree.
> 
> @Linus could you please check if the changes I did are correct?
> 
>  drivers/bcma/Kconfig                        |   2 +-
>  drivers/bcma/driver_gpio.c                  | 105 ++++++++++++----------------
>  include/linux/bcma/bcma_driver_chipcommon.h |   1 -
>  3 files changed, 44 insertions(+), 64 deletions(-)
> 

.....

> @@ -218,9 +190,18 @@ int bcma_gpio_init(struct bcma_drv_cc *cc)
>  	chip->set		= bcma_gpio_set_value;
>  	chip->direction_input	= bcma_gpio_direction_input;
>  	chip->direction_output	= bcma_gpio_direction_output;
> -#if IS_BUILTIN(CONFIG_BCM47XX) || IS_BUILTIN(CONFIG_ARCH_BCM_5301X)
> -	chip->to_irq		= bcma_gpio_to_irq;
> -#endif
> +	chip->owner		= THIS_MODULE;
> +	switch (bus->hosttype) {
> +	case BCMA_HOSTTYPE_PCI:
> +		chip->dev	= &bus->host_pci->dev;
> +		break;
> +	case BCMA_HOSTTYPE_SOC:
> +		chip->dev	= &bus->host_pdev->dev;
> +		break;
> +	case BCMA_HOSTTYPE_SDIO:
> +		chip->dev	= &bus->host_sdio->dev;
> +		break;
> +	}

I will replace this part with a call to the newly introduced function
bcma_bus_get_host_dev() in a new version of this patch.

This function was introduced in "bcma: fix access to host_pdev for PCIe
devices"

.....

  reply	other threads:[~2015-08-02 18:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-21 21:04 [PATCH] bcma: switch GPIO portions to use GPIOLIB_IRQCHIP Linus Walleij
2015-07-23  0:24 ` Rafał Miłecki
2015-07-25 20:07 ` Hauke Mehrtens
2015-07-26 12:32   ` Hauke Mehrtens
2015-07-26 13:20     ` Hauke Mehrtens
2015-08-02 18:00 ` [PATCH v2] " Hauke Mehrtens
2015-08-02 18:28   ` Hauke Mehrtens [this message]
2015-08-13 11:18   ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55BE6167.7090101@hauke-m.de \
    --to=hauke@hauke-m.de \
    --cc=kvalo@codeaurora.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@openwrt.org \
    --cc=zajec5@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).