mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
wifi: wl1251: drop support for platform data
Remove support for configuring the device via platform data because there are no users of wl1251_platform_data left in the mainline kernel. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20221109224250.2885119-2-dmitry.torokhov@gmail.com
This commit is contained in:
parent
e14e4c933e
commit
06463f6e98
7 changed files with 4 additions and 108 deletions
|
@ -20665,7 +20665,6 @@ W: https://wireless.wiki.kernel.org/en/users/Drivers/wl12xx
|
||||||
W: https://wireless.wiki.kernel.org/en/users/Drivers/wl1251
|
W: https://wireless.wiki.kernel.org/en/users/Drivers/wl1251
|
||||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx.git
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx.git
|
||||||
F: drivers/net/wireless/ti/
|
F: drivers/net/wireless/ti/
|
||||||
F: include/linux/wl12xx.h
|
|
||||||
|
|
||||||
TIMEKEEPING, CLOCKSOURCE CORE, NTP, ALARMTIMER
|
TIMEKEEPING, CLOCKSOURCE CORE, NTP, ALARMTIMER
|
||||||
M: John Stultz <jstultz@google.com>
|
M: John Stultz <jstultz@google.com>
|
||||||
|
|
|
@ -18,12 +18,4 @@ source "drivers/net/wireless/ti/wl18xx/Kconfig"
|
||||||
# keep last for automatic dependencies
|
# keep last for automatic dependencies
|
||||||
source "drivers/net/wireless/ti/wlcore/Kconfig"
|
source "drivers/net/wireless/ti/wlcore/Kconfig"
|
||||||
|
|
||||||
config WILINK_PLATFORM_DATA
|
|
||||||
bool "TI WiLink platform data"
|
|
||||||
depends on WLCORE_SDIO || WL1251_SDIO
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
Small platform data bit needed to pass data to the sdio modules.
|
|
||||||
|
|
||||||
|
|
||||||
endif # WLAN_VENDOR_TI
|
endif # WLAN_VENDOR_TI
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-only
|
|
||||||
/*
|
|
||||||
* This file is part of wl12xx
|
|
||||||
*
|
|
||||||
* Copyright (C) 2010-2011 Texas Instruments, Inc.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/err.h>
|
|
||||||
#include <linux/wl12xx.h>
|
|
||||||
|
|
||||||
static struct wl1251_platform_data *wl1251_platform_data;
|
|
||||||
|
|
||||||
int __init wl1251_set_platform_data(const struct wl1251_platform_data *data)
|
|
||||||
{
|
|
||||||
if (wl1251_platform_data)
|
|
||||||
return -EBUSY;
|
|
||||||
if (!data)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
wl1251_platform_data = kmemdup(data, sizeof(*data), GFP_KERNEL);
|
|
||||||
if (!wl1251_platform_data)
|
|
||||||
return -ENOMEM;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct wl1251_platform_data *wl1251_get_platform_data(void)
|
|
||||||
{
|
|
||||||
if (!wl1251_platform_data)
|
|
||||||
return ERR_PTR(-ENODEV);
|
|
||||||
|
|
||||||
return wl1251_platform_data;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(wl1251_get_platform_data);
|
|
|
@ -12,7 +12,6 @@
|
||||||
#include <linux/mmc/sdio_func.h>
|
#include <linux/mmc/sdio_func.h>
|
||||||
#include <linux/mmc/sdio_ids.h>
|
#include <linux/mmc/sdio_ids.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.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/of.h>
|
#include <linux/of.h>
|
||||||
|
@ -197,7 +196,6 @@ static int wl1251_sdio_probe(struct sdio_func *func,
|
||||||
struct wl1251 *wl;
|
struct wl1251 *wl;
|
||||||
struct ieee80211_hw *hw;
|
struct ieee80211_hw *hw;
|
||||||
struct wl1251_sdio *wl_sdio;
|
struct wl1251_sdio *wl_sdio;
|
||||||
const struct wl1251_platform_data *wl1251_board_data;
|
|
||||||
struct device_node *np = func->dev.of_node;
|
struct device_node *np = func->dev.of_node;
|
||||||
|
|
||||||
hw = wl1251_alloc_hw();
|
hw = wl1251_alloc_hw();
|
||||||
|
@ -225,11 +223,7 @@ static int wl1251_sdio_probe(struct sdio_func *func,
|
||||||
wl->if_priv = wl_sdio;
|
wl->if_priv = wl_sdio;
|
||||||
wl->if_ops = &wl1251_sdio_ops;
|
wl->if_ops = &wl1251_sdio_ops;
|
||||||
|
|
||||||
wl1251_board_data = wl1251_get_platform_data();
|
if (np) {
|
||||||
if (!IS_ERR(wl1251_board_data)) {
|
|
||||||
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->use_eeprom = of_property_read_bool(np, "ti,wl1251-has-eeprom");
|
||||||
wl->irq = of_irq_get(np, 0);
|
wl->irq = of_irq_get(np, 0);
|
||||||
if (wl->irq == -EPROBE_DEFER) {
|
if (wl->irq == -EPROBE_DEFER) {
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
#include <linux/swab.h>
|
#include <linux/swab.h>
|
||||||
#include <linux/crc7.h>
|
#include <linux/crc7.h>
|
||||||
#include <linux/spi/spi.h>
|
#include <linux/spi/spi.h>
|
||||||
#include <linux/wl12xx.h>
|
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
#include <linux/of_gpio.h>
|
#include <linux/of_gpio.h>
|
||||||
|
@ -226,16 +225,13 @@ static const struct wl1251_if_operations wl1251_spi_ops = {
|
||||||
|
|
||||||
static int wl1251_spi_probe(struct spi_device *spi)
|
static int wl1251_spi_probe(struct spi_device *spi)
|
||||||
{
|
{
|
||||||
struct wl1251_platform_data *pdata = dev_get_platdata(&spi->dev);
|
|
||||||
struct device_node *np = spi->dev.of_node;
|
struct device_node *np = spi->dev.of_node;
|
||||||
struct ieee80211_hw *hw;
|
struct ieee80211_hw *hw;
|
||||||
struct wl1251 *wl;
|
struct wl1251 *wl;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!np && !pdata) {
|
if (!np)
|
||||||
wl1251_error("no platform data");
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
|
||||||
|
|
||||||
hw = wl1251_alloc_hw();
|
hw = wl1251_alloc_hw();
|
||||||
if (IS_ERR(hw))
|
if (IS_ERR(hw))
|
||||||
|
@ -259,14 +255,9 @@ static int wl1251_spi_probe(struct spi_device *spi)
|
||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (np) {
|
wl->use_eeprom = of_property_read_bool(np, "ti,wl1251-has-eeprom");
|
||||||
wl->use_eeprom = of_property_read_bool(np, "ti,wl1251-has-eeprom");
|
|
||||||
wl->power_gpio = of_get_named_gpio(np, "ti,power-gpio", 0);
|
|
||||||
} else if (pdata) {
|
|
||||||
wl->power_gpio = pdata->power_gpio;
|
|
||||||
wl->use_eeprom = pdata->use_eeprom;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
wl->power_gpio = of_get_named_gpio(np, "ti,power-gpio", 0);
|
||||||
if (wl->power_gpio == -EPROBE_DEFER) {
|
if (wl->power_gpio == -EPROBE_DEFER) {
|
||||||
ret = -EPROBE_DEFER;
|
ret = -EPROBE_DEFER;
|
||||||
goto out_free;
|
goto out_free;
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
#include <linux/swab.h>
|
#include <linux/swab.h>
|
||||||
#include <linux/crc7.h>
|
#include <linux/crc7.h>
|
||||||
#include <linux/spi/spi.h>
|
#include <linux/spi/spi.h>
|
||||||
#include <linux/wl12xx.h>
|
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/of_irq.h>
|
#include <linux/of_irq.h>
|
||||||
#include <linux/regulator/consumer.h>
|
#include <linux/regulator/consumer.h>
|
||||||
|
|
|
@ -1,44 +0,0 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
||||||
/*
|
|
||||||
* This file is part of wl12xx
|
|
||||||
*
|
|
||||||
* Copyright (C) 2009 Nokia Corporation
|
|
||||||
*
|
|
||||||
* Contact: Luciano Coelho <luciano.coelho@nokia.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _LINUX_WL12XX_H
|
|
||||||
#define _LINUX_WL12XX_H
|
|
||||||
|
|
||||||
#include <linux/err.h>
|
|
||||||
|
|
||||||
struct wl1251_platform_data {
|
|
||||||
int power_gpio;
|
|
||||||
/* SDIO only: IRQ number if WLAN_IRQ line is used, 0 for SDIO IRQs */
|
|
||||||
int irq;
|
|
||||||
bool use_eeprom;
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef CONFIG_WILINK_PLATFORM_DATA
|
|
||||||
|
|
||||||
int wl1251_set_platform_data(const struct wl1251_platform_data *data);
|
|
||||||
|
|
||||||
struct wl1251_platform_data *wl1251_get_platform_data(void);
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
static inline
|
|
||||||
int wl1251_set_platform_data(const struct wl1251_platform_data *data)
|
|
||||||
{
|
|
||||||
return -ENOSYS;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline
|
|
||||||
struct wl1251_platform_data *wl1251_get_platform_data(void)
|
|
||||||
{
|
|
||||||
return ERR_PTR(-ENODATA);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
Loading…
Add table
Reference in a new issue