* [PATCH v2 0/2] wl1251: remove ti,power-gpio for sdio mode
@ 2019-12-17 18:06 H. Nikolaus Schaller
2019-12-17 18:06 ` [PATCH v2 1/2] DTS: bindings: wl1251: mark ti,power-gpio as optional H. Nikolaus Schaller
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: H. Nikolaus Schaller @ 2019-12-17 18:06 UTC (permalink / raw)
To: Ulf Hansson, Kalle Valo, Rob Herring, Mark Rutland,
H. Nikolaus Schaller, Thomas Gleixner, Greg Kroah-Hartman,
Alexios Zavras
Cc: linux-wireless, netdev, devicetree, linux-kernel, letux-kernel,
kernel
* use just "wl1251: " as title prefix - by Kalle Valo <kvalo@codeaurora.org>
* fix error handling: we still have to check for wl->irq returning -EPROBE_DEFER
PATCH V1 2019-11-24 11:35:48:
The driver has been updated to use the mmc/sdio core
which does full power control. So we do no longer need
the power control gipo.
Note that it is still needed for the SPI based interface
(N900).
Suggested by: Ulf Hansson <ulf.hansson@linaro.org>
Tested by: H. Nikolaus Schaller <hns@goldelico.com> # OpenPandora 600MHz
H. Nikolaus Schaller (2):
DTS: bindings: wl1251: mark ti,power-gpio as optional
wl1251: remove ti,power-gpio for SDIO mode
.../bindings/net/wireless/ti,wl1251.txt | 3 +-
drivers/net/wireless/ti/wl1251/sdio.c | 32 ++-----------------
2 files changed, 4 insertions(+), 31 deletions(-)
--
2.23.0
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH v2 1/2] DTS: bindings: wl1251: mark ti,power-gpio as optional 2019-12-17 18:06 [PATCH v2 0/2] wl1251: remove ti,power-gpio for sdio mode H. Nikolaus Schaller @ 2019-12-17 18:06 ` H. Nikolaus Schaller 2019-12-18 2:44 ` Rob Herring ` (2 more replies) 2019-12-17 18:07 ` [PATCH v2 2/2] wl1251: remove ti,power-gpio for SDIO mode H. Nikolaus Schaller 2019-12-19 22:34 ` [PATCH v2 0/2] wl1251: remove ti,power-gpio for sdio mode Ulf Hansson 2 siblings, 3 replies; 10+ messages in thread From: H. Nikolaus Schaller @ 2019-12-17 18:06 UTC (permalink / raw) To: Ulf Hansson, Kalle Valo, Rob Herring, Mark Rutland, H. Nikolaus Schaller, Thomas Gleixner, Greg Kroah-Hartman, Alexios Zavras Cc: linux-wireless, netdev, devicetree, linux-kernel, letux-kernel, kernel It is now only useful for SPI interface. Power control of SDIO mode is done through mmc core. Suggested by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> --- Documentation/devicetree/bindings/net/wireless/ti,wl1251.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/wireless/ti,wl1251.txt b/Documentation/devicetree/bindings/net/wireless/ti,wl1251.txt index f38950560982..88fd28d15eac 100644 --- a/Documentation/devicetree/bindings/net/wireless/ti,wl1251.txt +++ b/Documentation/devicetree/bindings/net/wireless/ti,wl1251.txt @@ -9,11 +9,12 @@ Required properties: - spi-max-frequency : Maximum SPI clocking speed of device in Hz - interrupts : Should contain interrupt line - vio-supply : phandle to regulator providing VIO -- ti,power-gpio : GPIO connected to chip's PMEN pin Optional properties: - ti,wl1251-has-eeprom : boolean, the wl1251 has an eeprom connected, which provides configuration data (calibration, MAC, ...) +- ti,power-gpio : GPIO connected to chip's PMEN pin if operated in + SPI mode - Please consult Documentation/devicetree/bindings/spi/spi-bus.txt for optional SPI connection related properties, -- 2.23.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/2] DTS: bindings: wl1251: mark ti,power-gpio as optional 2019-12-17 18:06 ` [PATCH v2 1/2] DTS: bindings: wl1251: mark ti,power-gpio as optional H. Nikolaus Schaller @ 2019-12-18 2:44 ` Rob Herring 2019-12-18 5:29 ` H. Nikolaus Schaller 2020-01-26 15:31 ` [PATCH v2 1/2] DTS: bindings: wl1251: mark ti, power-gpio " Kalle Valo [not found] ` <20200126153116.2E6E8C433A2@smtp.codeaurora.org> 2 siblings, 1 reply; 10+ messages in thread From: Rob Herring @ 2019-12-18 2:44 UTC (permalink / raw) To: H. Nikolaus Schaller Cc: Ulf Hansson, Kalle Valo, Mark Rutland, H. Nikolaus Schaller, Thomas Gleixner, Greg Kroah-Hartman, Alexios Zavras, linux-wireless, netdev, devicetree, linux-kernel, letux-kernel, kernel On Tue, 17 Dec 2019 19:06:59 +0100, "H. Nikolaus Schaller" wrote: > It is now only useful for SPI interface. > Power control of SDIO mode is done through mmc core. > > Suggested by: Ulf Hansson <ulf.hansson@linaro.org> > Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> > --- > Documentation/devicetree/bindings/net/wireless/ti,wl1251.txt | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > Please add Acked-by/Reviewed-by tags when posting new versions. However, there's no need to repost patches *only* to add the tags. The upstream maintainer will do that for acks received on the version they apply. If a tag was not added on purpose, please state why and what changed. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/2] DTS: bindings: wl1251: mark ti,power-gpio as optional 2019-12-18 2:44 ` Rob Herring @ 2019-12-18 5:29 ` H. Nikolaus Schaller 0 siblings, 0 replies; 10+ messages in thread From: H. Nikolaus Schaller @ 2019-12-18 5:29 UTC (permalink / raw) To: Rob Herring Cc: Ulf Hansson, Kalle Valo, Mark Rutland, Thomas Gleixner, Greg Kroah-Hartman, Alexios Zavras, linux-wireless, netdev, devicetree, linux-kernel, letux-kernel, kernel > Am 18.12.2019 um 03:44 schrieb Rob Herring <robh@kernel.org>: > > On Tue, 17 Dec 2019 19:06:59 +0100, "H. Nikolaus Schaller" wrote: >> It is now only useful for SPI interface. >> Power control of SDIO mode is done through mmc core. >> >> Suggested by: Ulf Hansson <ulf.hansson@linaro.org> >> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> >> --- >> Documentation/devicetree/bindings/net/wireless/ti,wl1251.txt | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> > > Please add Acked-by/Reviewed-by tags when posting new versions. However, > there's no need to repost patches *only* to add the tags. The upstream > maintainer will do that for acks received on the version they apply. > > If a tag was not added on purpose, please state why and what changed. Sorry, I just forgot to add. There was no change. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/2] DTS: bindings: wl1251: mark ti, power-gpio as optional 2019-12-17 18:06 ` [PATCH v2 1/2] DTS: bindings: wl1251: mark ti,power-gpio as optional H. Nikolaus Schaller 2019-12-18 2:44 ` Rob Herring @ 2020-01-26 15:31 ` Kalle Valo [not found] ` <20200126153116.2E6E8C433A2@smtp.codeaurora.org> 2 siblings, 0 replies; 10+ messages in thread From: Kalle Valo @ 2020-01-26 15:31 UTC (permalink / raw) To: H. Nikolaus Schaller Cc: Ulf Hansson, Rob Herring, Mark Rutland, H. Nikolaus Schaller, Thomas Gleixner, Greg Kroah-Hartman, Alexios Zavras, linux-wireless, netdev, devicetree, linux-kernel, letux-kernel, kernel "H. Nikolaus Schaller" <hns@goldelico.com> wrote: > It is now only useful for SPI interface. > Power control of SDIO mode is done through mmc core. > > Suggested by: Ulf Hansson <ulf.hansson@linaro.org> > Acked-by: Rob Herring <robh@kernel.org> > Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> Failed to apply to wireless-drivers-next, please rebase and resend. fatal: sha1 information is lacking or useless (drivers/net/wireless/ti/wl1251/sdio.c). error: could not build fake ancestor Applying: wl1251: remove ti,power-gpio for SDIO mode Patch failed at 0001 wl1251: remove ti,power-gpio for SDIO mode The copy of the patch that failed is found in: .git/rebase-apply/patch 2 patches set to Changes Requested. 11298403 [PATCH v2 1/2] DTS: bindings: wl1251: mark ti,power-gpio as optional 11298399 [v2,2/2] wl1251: remove ti,power-gpio for SDIO mode -- https://patchwork.kernel.org/patch/11298403/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <20200126153116.2E6E8C433A2@smtp.codeaurora.org>]
* Re: ***UNCHECKED*** Re: [PATCH v2 1/2] DTS: bindings: wl1251: mark ti, power-gpio as optional [not found] ` <20200126153116.2E6E8C433A2@smtp.codeaurora.org> @ 2020-01-26 16:03 ` H. Nikolaus Schaller 2020-01-26 16:16 ` Kalle Valo 0 siblings, 1 reply; 10+ messages in thread From: H. Nikolaus Schaller @ 2020-01-26 16:03 UTC (permalink / raw) To: Kalle Valo Cc: Ulf Hansson, Rob Herring, Mark Rutland, Thomas Gleixner, Greg Kroah-Hartman, Alexios Zavras, linux-wireless, netdev, devicetree, linux-kernel, letux-kernel, kernel Hi, > Am 26.01.2020 um 16:31 schrieb Kalle Valo <kvalo@codeaurora.org>: > > "H. Nikolaus Schaller" <hns@goldelico.com> wrote: > >> It is now only useful for SPI interface. >> Power control of SDIO mode is done through mmc core. >> >> Suggested by: Ulf Hansson <ulf.hansson@linaro.org> >> Acked-by: Rob Herring <robh@kernel.org> >> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> > > Failed to apply to wireless-drivers-next, please rebase and resend. On which commit and/or tree do you want to apply it? > fatal: sha1 information is lacking or useless (drivers/net/wireless/ti/wl1251/sdio.c). > error: could not build fake ancestor > Applying: wl1251: remove ti,power-gpio for SDIO mode > Patch failed at 0001 wl1251: remove ti,power-gpio for SDIO mode > The copy of the patch that failed is found in: .git/rebase-apply/patch > > 2 patches set to Changes Requested. > > 11298403 [PATCH v2 1/2] DTS: bindings: wl1251: mark ti,power-gpio as optional > 11298399 [v2,2/2] wl1251: remove ti,power-gpio for SDIO mode > > -- > https://patchwork.kernel.org/patch/11298403/ > > https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches BR and thanks, Nikolaus Schaller ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ***UNCHECKED*** Re: [PATCH v2 1/2] DTS: bindings: wl1251: mark ti, power-gpio as optional 2020-01-26 16:03 ` ***UNCHECKED*** " H. Nikolaus Schaller @ 2020-01-26 16:16 ` Kalle Valo 2020-01-26 19:59 ` H. Nikolaus Schaller 0 siblings, 1 reply; 10+ messages in thread From: Kalle Valo @ 2020-01-26 16:16 UTC (permalink / raw) To: H. Nikolaus Schaller Cc: Ulf Hansson, Rob Herring, Mark Rutland, Thomas Gleixner, Greg Kroah-Hartman, Alexios Zavras, linux-wireless, netdev, devicetree, linux-kernel, letux-kernel, kernel "H. Nikolaus Schaller" <hns@goldelico.com> writes: > Hi, > >> Am 26.01.2020 um 16:31 schrieb Kalle Valo <kvalo@codeaurora.org>: >> >> "H. Nikolaus Schaller" <hns@goldelico.com> wrote: >> >>> It is now only useful for SPI interface. >>> Power control of SDIO mode is done through mmc core. >>> >>> Suggested by: Ulf Hansson <ulf.hansson@linaro.org> >>> Acked-by: Rob Herring <robh@kernel.org> >>> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> >> >> Failed to apply to wireless-drivers-next, please rebase and resend. > > On which commit and/or tree do you want to apply it? I said it above, wireless-drivers-next: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/ -- https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ***UNCHECKED*** Re: [PATCH v2 1/2] DTS: bindings: wl1251: mark ti, power-gpio as optional 2020-01-26 16:16 ` Kalle Valo @ 2020-01-26 19:59 ` H. Nikolaus Schaller 0 siblings, 0 replies; 10+ messages in thread From: H. Nikolaus Schaller @ 2020-01-26 19:59 UTC (permalink / raw) To: Kalle Valo Cc: Ulf Hansson, Rob Herring, Mark Rutland, Thomas Gleixner, Greg Kroah-Hartman, Alexios Zavras, linux-wireless, netdev, devicetree, linux-kernel, letux-kernel, kernel Hi Kalle, > Am 26.01.2020 um 17:16 schrieb Kalle Valo <kvalo@codeaurora.org>: > > "H. Nikolaus Schaller" <hns@goldelico.com> writes: > >> Hi, >> >>> Am 26.01.2020 um 16:31 schrieb Kalle Valo <kvalo@codeaurora.org>: >>> >>> "H. Nikolaus Schaller" <hns@goldelico.com> wrote: >>> >>>> It is now only useful for SPI interface. >>>> Power control of SDIO mode is done through mmc core. >>>> >>>> Suggested by: Ulf Hansson <ulf.hansson@linaro.org> >>>> Acked-by: Rob Herring <robh@kernel.org> >>>> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> >>> >>> Failed to apply to wireless-drivers-next, please rebase and resend. >> >> On which commit and/or tree do you want to apply it? > > I said it above, wireless-drivers-next: > > https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/ Ah, sorry. I did overlook it. I could easily cherry pick it so I think that the guard lines of the original submission did not match. v3 (rebased on tag wireless-drivers-next-2020-01-26) coming immediately. BR and thanks, Nikolaus ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 2/2] wl1251: remove ti,power-gpio for SDIO mode 2019-12-17 18:06 [PATCH v2 0/2] wl1251: remove ti,power-gpio for sdio mode H. Nikolaus Schaller 2019-12-17 18:06 ` [PATCH v2 1/2] DTS: bindings: wl1251: mark ti,power-gpio as optional H. Nikolaus Schaller @ 2019-12-17 18:07 ` H. Nikolaus Schaller 2019-12-19 22:34 ` [PATCH v2 0/2] wl1251: remove ti,power-gpio for sdio mode Ulf Hansson 2 siblings, 0 replies; 10+ messages in thread From: H. Nikolaus Schaller @ 2019-12-17 18:07 UTC (permalink / raw) To: Ulf Hansson, Kalle Valo, Rob Herring, Mark Rutland, H. Nikolaus Schaller, Thomas Gleixner, Greg Kroah-Hartman, Alexios Zavras Cc: linux-wireless, netdev, devicetree, linux-kernel, letux-kernel, kernel Remove handling of this property from code. Note that wl->power_gpio is still needed in the header file for SPI mode (N900). Suggested by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> --- drivers/net/wireless/ti/wl1251/sdio.c | 32 ++------------------------- 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/drivers/net/wireless/ti/wl1251/sdio.c b/drivers/net/wireless/ti/wl1251/sdio.c index a032a1f92b57..4dff8bceb649 100644 --- a/drivers/net/wireless/ti/wl1251/sdio.c +++ b/drivers/net/wireless/ti/wl1251/sdio.c @@ -15,9 +15,7 @@ #include <linux/wl12xx.h> #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" @@ -162,15 +160,6 @@ static int wl1251_sdio_set_power(struct wl1251 *wl, bool enable) printk("%s %d\n", __func__, enable); if (enable) { - /* - * Power is controlled by runtime PM, but we still call board - * callback in case it wants to do any additional setup, - * for example enabling clock buffer for the module. - */ - if (gpio_is_valid(wl->power_gpio)) - gpio_set_value(wl->power_gpio, true); - - ret = pm_runtime_get_sync(&func->dev); if (ret < 0) { pm_runtime_put_sync(&func->dev); @@ -188,9 +177,6 @@ printk("%s %d\n", __func__, enable); ret = pm_runtime_put_sync(&func->dev); if (ret < 0) goto out; - - if (gpio_is_valid(wl->power_gpio)) - gpio_set_value(wl->power_gpio, false); } out: @@ -245,31 +231,17 @@ printk("%s: of=%pOFcC\n", __func__, np); wl1251_board_data = wl1251_get_platform_data(); if (!IS_ERR(wl1251_board_data)) { - 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); + wl->use_eeprom = of_property_read_bool(np, "ti,wl1251-has-eeprom"); wl->irq = of_irq_get(np, 0); - - if (wl->power_gpio == -EPROBE_DEFER || - wl->irq == -EPROBE_DEFER) { + if (wl->irq == -EPROBE_DEFER) { ret = -EPROBE_DEFER; goto disable; } } - if (gpio_is_valid(wl->power_gpio)) { - ret = devm_gpio_request(&func->dev, wl->power_gpio, - "wl1251 power"); - if (ret) { - wl1251_error("Failed to request gpio: %d\n", ret); - goto disable; - } - } - if (wl->irq) { irq_set_status_flags(wl->irq, IRQ_NOAUTOEN); ret = request_irq(wl->irq, wl1251_line_irq, 0, "wl1251", wl); -- 2.23.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2 0/2] wl1251: remove ti,power-gpio for sdio mode 2019-12-17 18:06 [PATCH v2 0/2] wl1251: remove ti,power-gpio for sdio mode H. Nikolaus Schaller 2019-12-17 18:06 ` [PATCH v2 1/2] DTS: bindings: wl1251: mark ti,power-gpio as optional H. Nikolaus Schaller 2019-12-17 18:07 ` [PATCH v2 2/2] wl1251: remove ti,power-gpio for SDIO mode H. Nikolaus Schaller @ 2019-12-19 22:34 ` Ulf Hansson 2 siblings, 0 replies; 10+ messages in thread From: Ulf Hansson @ 2019-12-19 22:34 UTC (permalink / raw) To: H. Nikolaus Schaller Cc: Kalle Valo, Rob Herring, Mark Rutland, Thomas Gleixner, Greg Kroah-Hartman, Alexios Zavras, linux-wireless, netdev, DTML, Linux Kernel Mailing List, Discussions about the Letux Kernel, kernel On Tue, 17 Dec 2019 at 19:07, H. Nikolaus Schaller <hns@goldelico.com> wrote: > > * use just "wl1251: " as title prefix - by Kalle Valo <kvalo@codeaurora.org> > * fix error handling: we still have to check for wl->irq returning -EPROBE_DEFER > > PATCH V1 2019-11-24 11:35:48: > The driver has been updated to use the mmc/sdio core > which does full power control. So we do no longer need > the power control gipo. > > Note that it is still needed for the SPI based interface > (N900). > > Suggested by: Ulf Hansson <ulf.hansson@linaro.org> > Tested by: H. Nikolaus Schaller <hns@goldelico.com> # OpenPandora 600MHz > > H. Nikolaus Schaller (2): > DTS: bindings: wl1251: mark ti,power-gpio as optional > wl1251: remove ti,power-gpio for SDIO mode > > .../bindings/net/wireless/ti,wl1251.txt | 3 +- > drivers/net/wireless/ti/wl1251/sdio.c | 32 ++----------------- > 2 files changed, 4 insertions(+), 31 deletions(-) > > -- > 2.23.0 > Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Kind regards Uffe ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-01-26 19:59 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-17 18:06 [PATCH v2 0/2] wl1251: remove ti,power-gpio for sdio mode H. Nikolaus Schaller
2019-12-17 18:06 ` [PATCH v2 1/2] DTS: bindings: wl1251: mark ti,power-gpio as optional H. Nikolaus Schaller
2019-12-18 2:44 ` Rob Herring
2019-12-18 5:29 ` H. Nikolaus Schaller
2020-01-26 15:31 ` [PATCH v2 1/2] DTS: bindings: wl1251: mark ti, power-gpio " Kalle Valo
[not found] ` <20200126153116.2E6E8C433A2@smtp.codeaurora.org>
2020-01-26 16:03 ` ***UNCHECKED*** " H. Nikolaus Schaller
2020-01-26 16:16 ` Kalle Valo
2020-01-26 19:59 ` H. Nikolaus Schaller
2019-12-17 18:07 ` [PATCH v2 2/2] wl1251: remove ti,power-gpio for SDIO mode H. Nikolaus Schaller
2019-12-19 22:34 ` [PATCH v2 0/2] wl1251: remove ti,power-gpio for sdio mode Ulf Hansson
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).