Commit 346bdd8e authored by H. Nikolaus Schaller's avatar H. Nikolaus Schaller Committed by Kalle Valo

wl1251: remove ti,power-gpio for SDIO mode

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: default avatarH. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 57f0a29c
...@@ -15,9 +15,7 @@ ...@@ -15,9 +15,7 @@
#include <linux/wl12xx.h> #include <linux/wl12xx.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/pm_runtime.h> #include <linux/pm_runtime.h>
#include <linux/gpio.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_gpio.h>
#include <linux/of_irq.h> #include <linux/of_irq.h>
#include "wl1251.h" #include "wl1251.h"
...@@ -160,15 +158,6 @@ static int wl1251_sdio_set_power(struct wl1251 *wl, bool enable) ...@@ -160,15 +158,6 @@ static int wl1251_sdio_set_power(struct wl1251 *wl, bool enable)
int ret; int ret;
if (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); ret = pm_runtime_get_sync(&func->dev);
if (ret < 0) { if (ret < 0) {
pm_runtime_put_sync(&func->dev); pm_runtime_put_sync(&func->dev);
...@@ -186,9 +175,6 @@ static int wl1251_sdio_set_power(struct wl1251 *wl, bool enable) ...@@ -186,9 +175,6 @@ static int wl1251_sdio_set_power(struct wl1251 *wl, bool enable)
ret = pm_runtime_put_sync(&func->dev); ret = pm_runtime_put_sync(&func->dev);
if (ret < 0) if (ret < 0)
goto out; goto out;
if (gpio_is_valid(wl->power_gpio))
gpio_set_value(wl->power_gpio, false);
} }
out: out:
...@@ -241,31 +227,17 @@ static int wl1251_sdio_probe(struct sdio_func *func, ...@@ -241,31 +227,17 @@ static int wl1251_sdio_probe(struct sdio_func *func,
wl1251_board_data = wl1251_get_platform_data(); wl1251_board_data = wl1251_get_platform_data();
if (!IS_ERR(wl1251_board_data)) { if (!IS_ERR(wl1251_board_data)) {
wl->power_gpio = wl1251_board_data->power_gpio;
wl->irq = wl1251_board_data->irq; wl->irq = wl1251_board_data->irq;
wl->use_eeprom = wl1251_board_data->use_eeprom; wl->use_eeprom = wl1251_board_data->use_eeprom;
} else if (np) { } else if (np) {
wl->use_eeprom = of_property_read_bool(np, wl->use_eeprom = of_property_read_bool(np, "ti,wl1251-has-eeprom");
"ti,wl1251-has-eeprom");
wl->power_gpio = of_get_named_gpio(np, "ti,power-gpio", 0);
wl->irq = of_irq_get(np, 0); wl->irq = of_irq_get(np, 0);
if (wl->irq == -EPROBE_DEFER) {
if (wl->power_gpio == -EPROBE_DEFER ||
wl->irq == -EPROBE_DEFER) {
ret = -EPROBE_DEFER; ret = -EPROBE_DEFER;
goto disable; 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) { if (wl->irq) {
irq_set_status_flags(wl->irq, IRQ_NOAUTOEN); irq_set_status_flags(wl->irq, IRQ_NOAUTOEN);
ret = request_irq(wl->irq, wl1251_line_irq, 0, "wl1251", wl); ret = request_irq(wl->irq, wl1251_line_irq, 0, "wl1251", wl);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment