All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: "H. Nikolaus Schaller" <hns@goldelico.com>
Cc: "Benoît Cousson" <bcousson@baylibre.com>,
	"Tony Lindgren" <tony@atomide.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"Kalle Valo" <kvalo@codeaurora.org>,
	"Mike Rapoport" <rppt@linux.ibm.com>,
	"David Sterba" <dsterba@suse.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	"Petr Mladek" <pmladek@suse.com>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Kefeng Wang" <wangkefeng.wang@huawei.com>,
	"Yangtao Li" <tiny.windzz@gmail.com>,
	"Alexios Zavras" <alexios.zavras@intel.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Allison Randal" <allison@lohutok.net>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"John Stultz" <john.stultz@linaro.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	DTML <devicetree@vger.kernel.org>,
	"Discussions about the Letux Kernel"
	<letux-kernel@openphoenux.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	kernel@pyra-handheld.com,
	linux-wireless <linux-wireless@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	netdev <netdev@vger.kernel.org>,
	linux-omap <linux-omap@vger.kernel.org>,
	"Linux ARM" <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3 02/12] net: wireless: ti: wl1251 add device tree support
Date: Thu, 14 Nov 2019 15:12:48 +0100	[thread overview]
Message-ID: <CAPDyKFomoH5U0XevwKcaHRjf1hEyyqZfv4K_DZhCB7kpuXda2g@mail.gmail.com> (raw)
In-Reply-To: <c128cf34cf3858538eac8abffa02a2af8ce845b2.1573122644.git.hns@goldelico.com>

On Thu, 7 Nov 2019 at 11:31, H. Nikolaus Schaller <hns@goldelico.com> wrote:
>
> We will have the wl1251 defined as a child node of the mmc interface
> and can read setup for gpios, interrupts and the ti,use-eeprom
> property from there instead of pdata to be provided by pdata-quirks.
>
> Fixes: 81eef6ca9201 ("mmc: omap_hsmmc: Use dma_request_chan() for requesting DMA channel")
>
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> Acked-by: Kalle Valo <kvalo@codeaurora.org>
> ---
>  drivers/net/wireless/ti/wl1251/sdio.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/drivers/net/wireless/ti/wl1251/sdio.c b/drivers/net/wireless/ti/wl1251/sdio.c
> index 677f1146ccf0..c54a273713ed 100644
> --- a/drivers/net/wireless/ti/wl1251/sdio.c
> +++ b/drivers/net/wireless/ti/wl1251/sdio.c
> @@ -16,6 +16,9 @@
>  #include <linux/irq.h>
>  #include <linux/pm_runtime.h>
>  #include <linux/gpio.h>
> +#include <linux/of.h>
> +#include <linux/of_gpio.h>
> +#include <linux/of_irq.h>
>
>  #include "wl1251.h"
>
> @@ -217,6 +220,7 @@ static int wl1251_sdio_probe(struct sdio_func *func,
>         struct ieee80211_hw *hw;
>         struct wl1251_sdio *wl_sdio;
>         const struct wl1251_platform_data *wl1251_board_data;
> +       struct device_node *np = func->dev.of_node;
>
>         hw = wl1251_alloc_hw();
>         if (IS_ERR(hw))
> @@ -248,6 +252,15 @@ static int wl1251_sdio_probe(struct sdio_func *func,
>                 wl->power_gpio = wl1251_board_data->power_gpio;
>                 wl->irq = wl1251_board_data->irq;
>                 wl->use_eeprom = wl1251_board_data->use_eeprom;
> +       } else if (np) {
> +               wl->use_eeprom =of_property_read_bool(np, "ti,wl1251-has-eeprom");
> +               wl->power_gpio = of_get_named_gpio(np, "ti,power-gpio", 0);

This isn't needed as it seems. Perhaps remove or keep it as optional?

> +               wl->irq = of_irq_get(np, 0);
> +
> +               if (wl->power_gpio == -EPROBE_DEFER || wl->irq == -EPROBE_DEFER) {
> +                       ret = -EPROBE_DEFER;
> +                       goto disable;
> +               }
>         }
>
>         if (gpio_is_valid(wl->power_gpio)) {
> --

Kind regards
Uffe

WARNING: multiple messages have this Message-ID (diff)
From: Ulf Hansson <ulf.hansson@linaro.org>
To: "H. Nikolaus Schaller" <hns@goldelico.com>
Cc: "Benoît Cousson" <bcousson@baylibre.com>,
	"Tony Lindgren" <tony@atomide.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"Kalle Valo" <kvalo@codeaurora.org>,
	"Mike Rapoport" <rppt@linux.ibm.com>,
	"David Sterba" <dsterba@suse.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	"Petr Mladek" <pmladek@suse.com>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Kefeng Wang" <wangkefeng.wang@huawei.com>,
	"Yangtao Li" <tiny.windzz@gmail.com>,
	"Alexios Zavras" <alexios.zavras@intel.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Allison Randal" <allison@lohutok.net>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"John Stultz" <john.stultz@linaro.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>
Subject: Re: [PATCH v3 02/12] net: wireless: ti: wl1251 add device tree support
Date: Thu, 14 Nov 2019 15:12:48 +0100	[thread overview]
Message-ID: <CAPDyKFomoH5U0XevwKcaHRjf1hEyyqZfv4K_DZhCB7kpuXda2g@mail.gmail.com> (raw)
In-Reply-To: <c128cf34cf3858538eac8abffa02a2af8ce845b2.1573122644.git.hns@goldelico.com>

On Thu, 7 Nov 2019 at 11:31, H. Nikolaus Schaller <hns@goldelico.com> wrote:
>
> We will have the wl1251 defined as a child node of the mmc interface
> and can read setup for gpios, interrupts and the ti,use-eeprom
> property from there instead of pdata to be provided by pdata-quirks.
>
> Fixes: 81eef6ca9201 ("mmc: omap_hsmmc: Use dma_request_chan() for requesting DMA channel")
>
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> Acked-by: Kalle Valo <kvalo@codeaurora.org>
> ---
>  drivers/net/wireless/ti/wl1251/sdio.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/drivers/net/wireless/ti/wl1251/sdio.c b/drivers/net/wireless/ti/wl1251/sdio.c
> index 677f1146ccf0..c54a273713ed 100644
> --- a/drivers/net/wireless/ti/wl1251/sdio.c
> +++ b/drivers/net/wireless/ti/wl1251/sdio.c
> @@ -16,6 +16,9 @@
>  #include <linux/irq.h>
>  #include <linux/pm_runtime.h>
>  #include <linux/gpio.h>
> +#include <linux/of.h>
> +#include <linux/of_gpio.h>
> +#include <linux/of_irq.h>
>
>  #include "wl1251.h"
>
> @@ -217,6 +220,7 @@ static int wl1251_sdio_probe(struct sdio_func *func,
>         struct ieee80211_hw *hw;
>         struct wl1251_sdio *wl_sdio;
>         const struct wl1251_platform_data *wl1251_board_data;
> +       struct device_node *np = func->dev.of_node;
>
>         hw = wl1251_alloc_hw();
>         if (IS_ERR(hw))
> @@ -248,6 +252,15 @@ static int wl1251_sdio_probe(struct sdio_func *func,
>                 wl->power_gpio = wl1251_board_data->power_gpio;
>                 wl->irq = wl1251_board_data->irq;
>                 wl->use_eeprom = wl1251_board_data->use_eeprom;
> +       } else if (np) {
> +               wl->use_eeprom =of_property_read_bool(np, "ti,wl1251-has-eeprom");
> +               wl->power_gpio = of_get_named_gpio(np, "ti,power-gpio", 0);

This isn't needed as it seems. Perhaps remove or keep it as optional?

> +               wl->irq = of_irq_get(np, 0);
> +
> +               if (wl->power_gpio == -EPROBE_DEFER || wl->irq == -EPROBE_DEFER) {
> +                       ret = -EPROBE_DEFER;
> +                       goto disable;
> +               }
>         }
>
>         if (gpio_is_valid(wl->power_gpio)) {
> --

Kind regards
Uffe

WARNING: multiple messages have this Message-ID (diff)
From: Ulf Hansson <ulf.hansson@linaro.org>
To: "H. Nikolaus Schaller" <hns@goldelico.com>
Cc: "Mark Rutland" <mark.rutland@arm.com>,
	"Kefeng Wang" <wangkefeng.wang@huawei.com>,
	DTML <devicetree@vger.kernel.org>,
	"Tony Lindgren" <tony@atomide.com>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	netdev <netdev@vger.kernel.org>,
	linux-omap <linux-omap@vger.kernel.org>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"Mike Rapoport" <rppt@linux.ibm.com>,
	"Yangtao Li" <tiny.windzz@gmail.com>,
	"Kalle Valo" <kvalo@codeaurora.org>,
	"Petr Mladek" <pmladek@suse.com>,
	"Benoît Cousson" <bcousson@baylibre.com>,
	"Alexios Zavras" <alexios.zavras@intel.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"John Stultz" <john.stultz@linaro.org>,
	"David Sterba" <dsterba@suse.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Discussions about the Letux Kernel"
	<letux-kernel@openphoenux.org>,
	"Allison Randal" <allison@lohutok.net>,
	"Linux ARM" <linux-arm-kernel@lists.infradead.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	kernel@pyra-handheld.com
Subject: Re: [PATCH v3 02/12] net: wireless: ti: wl1251 add device tree support
Date: Thu, 14 Nov 2019 15:12:48 +0100	[thread overview]
Message-ID: <CAPDyKFomoH5U0XevwKcaHRjf1hEyyqZfv4K_DZhCB7kpuXda2g@mail.gmail.com> (raw)
In-Reply-To: <c128cf34cf3858538eac8abffa02a2af8ce845b2.1573122644.git.hns@goldelico.com>

On Thu, 7 Nov 2019 at 11:31, H. Nikolaus Schaller <hns@goldelico.com> wrote:
>
> We will have the wl1251 defined as a child node of the mmc interface
> and can read setup for gpios, interrupts and the ti,use-eeprom
> property from there instead of pdata to be provided by pdata-quirks.
>
> Fixes: 81eef6ca9201 ("mmc: omap_hsmmc: Use dma_request_chan() for requesting DMA channel")
>
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> Acked-by: Kalle Valo <kvalo@codeaurora.org>
> ---
>  drivers/net/wireless/ti/wl1251/sdio.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/drivers/net/wireless/ti/wl1251/sdio.c b/drivers/net/wireless/ti/wl1251/sdio.c
> index 677f1146ccf0..c54a273713ed 100644
> --- a/drivers/net/wireless/ti/wl1251/sdio.c
> +++ b/drivers/net/wireless/ti/wl1251/sdio.c
> @@ -16,6 +16,9 @@
>  #include <linux/irq.h>
>  #include <linux/pm_runtime.h>
>  #include <linux/gpio.h>
> +#include <linux/of.h>
> +#include <linux/of_gpio.h>
> +#include <linux/of_irq.h>
>
>  #include "wl1251.h"
>
> @@ -217,6 +220,7 @@ static int wl1251_sdio_probe(struct sdio_func *func,
>         struct ieee80211_hw *hw;
>         struct wl1251_sdio *wl_sdio;
>         const struct wl1251_platform_data *wl1251_board_data;
> +       struct device_node *np = func->dev.of_node;
>
>         hw = wl1251_alloc_hw();
>         if (IS_ERR(hw))
> @@ -248,6 +252,15 @@ static int wl1251_sdio_probe(struct sdio_func *func,
>                 wl->power_gpio = wl1251_board_data->power_gpio;
>                 wl->irq = wl1251_board_data->irq;
>                 wl->use_eeprom = wl1251_board_data->use_eeprom;
> +       } else if (np) {
> +               wl->use_eeprom =of_property_read_bool(np, "ti,wl1251-has-eeprom");
> +               wl->power_gpio = of_get_named_gpio(np, "ti,power-gpio", 0);

This isn't needed as it seems. Perhaps remove or keep it as optional?

> +               wl->irq = of_irq_get(np, 0);
> +
> +               if (wl->power_gpio == -EPROBE_DEFER || wl->irq == -EPROBE_DEFER) {
> +                       ret = -EPROBE_DEFER;
> +                       goto disable;
> +               }
>         }
>
>         if (gpio_is_valid(wl->power_gpio)) {
> --

Kind regards
Uffe

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-11-14 14:13 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07 10:30 [PATCH v3 00/12] OpenPandora: make wl1251 connected to mmc3 sdio port of OpenPandora work again H. Nikolaus Schaller
2019-11-07 10:30 ` H. Nikolaus Schaller
2019-11-07 10:30 ` H. Nikolaus Schaller
2019-11-07 10:30 ` [PATCH v3 01/12] Documentation: dt: wireless: update wl1251 for sdio H. Nikolaus Schaller
2019-11-07 10:30   ` H. Nikolaus Schaller
2019-11-07 10:30   ` H. Nikolaus Schaller
2019-11-13 13:33   ` Rob Herring
2019-11-13 13:33     ` Rob Herring
2019-11-13 13:33     ` Rob Herring
2019-11-14 14:11   ` Ulf Hansson
2019-11-14 14:11     ` Ulf Hansson
2019-11-14 14:11     ` Ulf Hansson
2019-11-07 10:30 ` [PATCH v3 02/12] net: wireless: ti: wl1251 add device tree support H. Nikolaus Schaller
2019-11-07 10:30   ` H. Nikolaus Schaller
2019-11-07 10:30   ` H. Nikolaus Schaller
2019-11-14 14:12   ` Ulf Hansson [this message]
2019-11-14 14:12     ` Ulf Hansson
2019-11-14 14:12     ` Ulf Hansson
2019-11-07 10:30 ` [PATCH v3 03/12] ARM: dts: pandora-common: define wl1251 as child node of mmc3 H. Nikolaus Schaller
2019-11-07 10:30   ` H. Nikolaus Schaller
2019-11-07 10:30   ` H. Nikolaus Schaller
2019-11-08 17:10   ` Tony Lindgren
2019-11-08 17:10     ` Tony Lindgren
2019-11-08 17:10     ` Tony Lindgren
2019-11-07 10:30 ` [PATCH v3 04/12] mmc: host: omap_hsmmc: add code for special init of wl1251 to get rid of pandora_wl1251_init_card H. Nikolaus Schaller
2019-11-07 10:30   ` H. Nikolaus Schaller
2019-11-07 10:30   ` H. Nikolaus Schaller
2019-11-07 10:30 ` [PATCH v3 05/12] omap: pdata-quirks: revert pandora specific gpiod additions H. Nikolaus Schaller
2019-11-07 10:30   ` H. Nikolaus Schaller
2019-11-07 10:30   ` H. Nikolaus Schaller
2019-11-08 17:10   ` Tony Lindgren
2019-11-08 17:10     ` Tony Lindgren
2019-11-08 17:10     ` Tony Lindgren
2019-11-07 10:30 ` [PATCH v3 06/12] omap: pdata-quirks: remove openpandora quirks for mmc3 and wl1251 H. Nikolaus Schaller
2019-11-07 10:30   ` H. Nikolaus Schaller
2019-11-07 10:30   ` H. Nikolaus Schaller
2019-11-08 17:11   ` Tony Lindgren
2019-11-08 17:11     ` Tony Lindgren
2019-11-08 17:11     ` Tony Lindgren
2019-11-07 10:30 ` [PATCH v3 07/12] omap: remove omap2_hsmmc_info in old hsmmc.[ch] and update Makefile H. Nikolaus Schaller
2019-11-07 10:30   ` H. Nikolaus Schaller
2019-11-07 10:30   ` H. Nikolaus Schaller
2019-11-08 17:11   ` Tony Lindgren
2019-11-08 17:11     ` Tony Lindgren
2019-11-08 17:11     ` Tony Lindgren
2019-11-07 10:30 ` [PATCH v3 08/12] mmc: host: omap-hsmmc: remove init_card pdata callback from pdata H. Nikolaus Schaller
2019-11-07 10:30   ` H. Nikolaus Schaller
2019-11-07 10:30   ` H. Nikolaus Schaller
2019-11-07 10:30 ` [PATCH v3 09/12] mmc: sdio: fix wl1251 vendor id H. Nikolaus Schaller
2019-11-07 10:30   ` H. Nikolaus Schaller
2019-11-07 10:30   ` H. Nikolaus Schaller
2019-11-07 10:30 ` [PATCH v3 10/12] mmc: core: fix wl1251 sdio quirks H. Nikolaus Schaller
2019-11-07 10:30   ` H. Nikolaus Schaller
2019-11-07 10:30   ` H. Nikolaus Schaller
2019-11-07 10:30 ` [PATCH v3 11/12] net: wireless: ti: wl1251 use new SDIO_VENDOR_ID_TI_WL1251 definition H. Nikolaus Schaller
2019-11-07 10:30   ` H. Nikolaus Schaller
2019-11-07 10:30   ` H. Nikolaus Schaller
2019-11-07 10:30 ` [PATCH v3 12/12] net: wireless: ti: remove local VENDOR_ID and DEVICE_ID definitions H. Nikolaus Schaller
2019-11-07 10:30   ` H. Nikolaus Schaller
2019-11-07 10:30   ` H. Nikolaus Schaller
2019-11-14 14:18 ` [PATCH v3 00/12] OpenPandora: make wl1251 connected to mmc3 sdio port of OpenPandora work again Ulf Hansson
2019-11-14 14:18   ` Ulf Hansson
2019-11-14 14:18   ` Ulf Hansson
2019-11-14 15:15   ` H. Nikolaus Schaller
2019-11-14 15:15     ` H. Nikolaus Schaller
2019-11-14 15:15     ` H. Nikolaus Schaller
2019-11-15  9:29     ` Ulf Hansson
2019-11-15  9:29       ` Ulf Hansson
2019-11-15  9:29       ` Ulf Hansson

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=CAPDyKFomoH5U0XevwKcaHRjf1hEyyqZfv4K_DZhCB7kpuXda2g@mail.gmail.com \
    --to=ulf.hansson@linaro.org \
    --cc=alexios.zavras@intel.com \
    --cc=allison@lohutok.net \
    --cc=bcousson@baylibre.com \
    --cc=bhelgaas@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dsterba@suse.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hns@goldelico.com \
    --cc=john.stultz@linaro.org \
    --cc=kernel@pyra-handheld.com \
    --cc=kvalo@codeaurora.org \
    --cc=letux-kernel@openphoenux.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=robh+dt@kernel.org \
    --cc=rppt@linux.ibm.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tglx@linutronix.de \
    --cc=tiny.windzz@gmail.com \
    --cc=tony@atomide.com \
    --cc=wangkefeng.wang@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.