From: "H. Nikolaus Schaller" <hns@goldelico.com>
To: Ulf Hansson <ulf.hansson@linaro.org>,
Kalle Valo <kvalo@codeaurora.org>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
"H. Nikolaus Schaller" <hns@goldelico.com>,
Thomas Gleixner <tglx@linutronix.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Alexios Zavras <alexios.zavras@intel.com>
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
letux-kernel@openphoenux.org, kernel@pyra-handheld.com
Subject: [PATCH v2 2/2] wl1251: remove ti,power-gpio for SDIO mode
Date: Tue, 17 Dec 2019 19:07:00 +0100 [thread overview]
Message-ID: <644b6f86c7ad5c24753a721cb262d8a9a371d914.1576606020.git.hns@goldelico.com> (raw)
In-Reply-To: <cover.1576606020.git.hns@goldelico.com>
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
next prev parent reply other threads:[~2019-12-17 18:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` H. Nikolaus Schaller [this message]
2019-12-19 22:34 ` [PATCH v2 0/2] wl1251: remove ti,power-gpio for sdio mode 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=644b6f86c7ad5c24753a721cb262d8a9a371d914.1576606020.git.hns@goldelico.com \
--to=hns@goldelico.com \
--cc=alexios.zavras@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel@pyra-handheld.com \
--cc=kvalo@codeaurora.org \
--cc=letux-kernel@openphoenux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=netdev@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=tglx@linutronix.de \
--cc=ulf.hansson@linaro.org \
/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).