Skip to content

Commit 1ec6be3

Browse files
ajaykathatajaysk
authored andcommitted
wilc1000: compile single driver for each bus type
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
1 parent 9e9ef43 commit 1ec6be3

8 files changed

Lines changed: 31 additions & 45 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
obj-$(CONFIG_WILC1000) += wilc1000/
2+
obj-$(CONFIG_WILC) += wilc1000/
Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,47 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
config WILC1000
2+
config WILC
33
tristate
4-
help
5-
Add support for the Atmel WILC1000 802.11 b/g/n SoC.
6-
This provides Wi-FI over an SDIO or SPI interface, and
7-
is usually found in IoT devices.
8-
9-
This module only support IEEE 802.11n WiFi.
104

11-
config WILC1000_SDIO
12-
tristate "Atmel WILC1000 SDIO (WiFi only)"
5+
config WILC_SDIO
6+
tristate "WILC SDIO"
137
depends on CFG80211 && INET && MMC
14-
select WILC1000
8+
select WILC
9+
select PWRSEQ_WILC
1510
help
1611
This module adds support for the SDIO interface of adapters using
17-
WILC1000 chipset. The Atmel WILC1000 SDIO is a full speed interface.
12+
WILC1000 & WILC3000 chipset. The Atmel WILC1000 SDIO is a full speed interface.
1813
It meets SDIO card specification version 2.0. The interface supports
1914
the 1-bit/4-bit SD transfer mode at the clock range of 0-50 MHz.
2015
The host can use this interface to read and write from any register
2116
within the chip as well as configure the WILC1000 for data DMA.
2217
To use this interface, pin9 (SDIO_SPI_CFG) must be grounded. Select
2318
this if your platform is using the SDIO bus.
19+
WILC3000 additionally supports BT 4.0 and BLE modes.
2420

25-
config WILC1000_SPI
26-
tristate "Atmel WILC1000 SPI (WiFi only)"
21+
config WILC_SPI
22+
tristate "WILC SPI"
2723
depends on CFG80211 && INET && SPI
28-
select WILC1000
24+
select WILC
25+
select PWRSEQ_WILC
2926
select CRC7
3027
select CRC_ITU_T
3128
help
3229
This module adds support for the SPI interface of adapters using
33-
WILC1000 chipset. The Atmel WILC1000 has a Serial Peripheral
30+
WILC1000 & WILC3000 chipset. The Atmel WILC1000 has a Serial Peripheral
3431
Interface (SPI) that operates as a SPI slave. This SPI interface can
3532
be used for control and for serial I/O of 802.11 data. The SPI is a
3633
full-duplex slave synchronous serial interface that is available
3734
immediately following reset when pin 9 (SDIO_SPI_CFG) is tied to
3835
VDDIO. Select this if your platform is using the SPI bus.
36+
WILC3000 additionally supports BT 4.0 and BLE modes.
3937

40-
config WILC1000_HW_OOB_INTR
41-
bool "WILC1000 out of band interrupt"
42-
depends on WILC1000_SDIO
38+
config WILC_HW_OOB_INTR
39+
bool "WILC out of band interrupt"
40+
depends on WILC_SDIO
41+
default n
4342
help
44-
This option enables out-of-band interrupt support for the WILC1000
45-
chipset. This OOB interrupt is intended to provide a faster interrupt
46-
mechanism for SDIO host controllers that don't support SDIO interrupt.
47-
Select this option If the SDIO host controller in your platform
48-
doesn't support SDIO time division interrupt.
43+
This option enables out-of-band interrupt support for the WILC1000 &
44+
WILC3000 chipset. This OOB interrupt is intended to provide a faster
45+
interrupt mechanism for SDIO host controllers that don't support SDIO
46+
interrupt. Select this option If the SDIO host controller in your
47+
platform doesn't support SDIO time division interrupt.
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# SPDX-License-Identifier: GPL-2.0
22
ccflags-y += -I$(src)/ -DWILC_DEBUGFS
33

4-
obj-$(CONFIG_WILC1000) += wilc1000.o
5-
6-
wilc1000-objs := cfg80211.o netdev.o mon.o \
4+
wilc-objs := cfg80211.o netdev.o mon.o \
75
hif.o wlan_cfg.o wlan.o sysfs.o power.o bt.o debugfs.o
86

9-
obj-$(CONFIG_WILC1000_SDIO) += wilc1000-sdio.o
10-
wilc1000-sdio-objs += sdio.o
7+
obj-$(CONFIG_WILC_SDIO) += wilc-sdio.o
8+
wilc-sdio-objs += $(wilc-objs)
9+
wilc-sdio-objs += sdio.o
1110

12-
obj-$(CONFIG_WILC1000_SPI) += wilc1000-spi.o
13-
wilc1000-spi-objs += spi.o
11+
obj-$(CONFIG_WILC_SPI) += wilc-spi.o
12+
wilc-spi-objs += $(wilc-objs)
13+
wilc-spi-objs += spi.o

drivers/net/wireless/microchip/wilc1000/bt.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,6 @@ int wilc_bt_power_up(struct wilc *wilc, int source)
470470
wilc_bt_power_down(wilc, DEV_BT);
471471
return ret;
472472
}
473-
EXPORT_SYMBOL_GPL(wilc_bt_power_up);
474473

475474
static void wilc_bt_firmware_download(struct wilc *wilc)
476475
{
@@ -681,7 +680,6 @@ void wilc_bt_init(struct wilc *wilc)
681680
pr_debug("at_pwr_dev: init\n");
682681
wilc_bt_create_device();
683682
}
684-
EXPORT_SYMBOL_GPL(wilc_bt_init);
685683

686684
void wilc_bt_deinit(void)
687685
{
@@ -697,4 +695,3 @@ void wilc_bt_deinit(void)
697695
unregister_chrdev_region(chc_dev_no, 1);
698696
pr_info("at_pwr_dev: unregistered\n");
699697
}
700-
EXPORT_SYMBOL_GPL(wilc_bt_deinit);

drivers/net/wireless/microchip/wilc1000/cfg80211.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static const struct ieee80211_txrx_stypes
4444
BIT(IEEE80211_STYPE_DISASSOC >> 4) |
4545
BIT(IEEE80211_STYPE_AUTH >> 4) |
4646
BIT(IEEE80211_STYPE_DEAUTH >> 4)
47-
}
47+
},
4848
};
4949

5050
#ifdef CONFIG_PM
@@ -2332,7 +2332,6 @@ int wilc_cfg80211_init(struct wilc **wilc, struct device *dev, int io_type,
23322332
wiphy_free(wl->wiphy);
23332333
return ret;
23342334
}
2335-
EXPORT_SYMBOL_GPL(wilc_cfg80211_init);
23362335

23372336
struct wilc *wilc_create_wiphy(struct device *dev)
23382337
{

drivers/net/wireless/microchip/wilc1000/netdev.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,6 @@ void wilc_netdev_cleanup(struct wilc *wilc)
13061306
wiphy_free(wilc->wiphy);
13071307
pr_info("Module_exit Done.\n");
13081308
}
1309-
EXPORT_SYMBOL_GPL(wilc_netdev_cleanup);
13101309

13111310
static u8 wilc_get_available_idx(struct wilc *wl)
13121311
{

drivers/net/wireless/microchip/wilc1000/power.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ int wilc_of_parse_power_pins(struct wilc *wilc)
4646
ret = devm_gpio_request(wilc->dev, power->gpios.reset, "RESET");
4747
return ret;
4848
}
49-
EXPORT_SYMBOL_GPL(wilc_of_parse_power_pins);
5049

5150
/**
5251
* wilc_wlan_power() - handle power on/off commands
@@ -75,4 +74,3 @@ void wilc_wlan_power(struct wilc *wilc, bool on)
7574
gpio_direction_output(wilc->power.gpios.reset, 0);
7675
}
7776
}
78-
EXPORT_SYMBOL_GPL(wilc_wlan_power);

drivers/net/wireless/microchip/wilc1000/wlan.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,6 @@ void chip_allow_sleep(struct wilc *wilc, int source)
727727
if (!ret)
728728
wilc->keep_awake[source] = false;
729729
}
730-
EXPORT_SYMBOL_GPL(chip_allow_sleep);
731730

732731
static void chip_wakeup_wilc1000(struct wilc *wilc, int source)
733732
{
@@ -861,7 +860,6 @@ void chip_wakeup(struct wilc *wilc, int source)
861860
else
862861
chip_wakeup_wilc3000(wilc, source);
863862
}
864-
EXPORT_SYMBOL_GPL(chip_wakeup);
865863

866864
void host_wakeup_notify(struct wilc *wilc, int source)
867865
{
@@ -874,7 +872,6 @@ void host_wakeup_notify(struct wilc *wilc, int source)
874872
1);
875873
release_bus(wilc, WILC_BUS_RELEASE_ONLY, source);
876874
}
877-
EXPORT_SYMBOL_GPL(host_wakeup_notify);
878875

879876
void host_sleep_notify(struct wilc *wilc, int source)
880877
{
@@ -887,7 +884,6 @@ void host_sleep_notify(struct wilc *wilc, int source)
887884
1);
888885
release_bus(wilc, WILC_BUS_RELEASE_ONLY, source);
889886
}
890-
EXPORT_SYMBOL_GPL(host_sleep_notify);
891887

892888
int wilc_wlan_handle_txq(struct wilc *wilc, u32 *txq_count)
893889
{
@@ -1393,7 +1389,6 @@ void wilc_handle_isr(struct wilc *wilc)
13931389

13941390
release_bus(wilc, WILC_BUS_RELEASE_ALLOW_SLEEP, DEV_WIFI);
13951391
}
1396-
EXPORT_SYMBOL_GPL(wilc_handle_isr);
13971392

13981393
int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer,
13991394
u32 buffer_size)
@@ -1836,7 +1831,6 @@ u32 wilc_get_chipid(struct wilc *wilc, bool update)
18361831

18371832
return wilc->chipid;
18381833
}
1839-
EXPORT_SYMBOL_GPL(wilc_get_chipid);
18401834

18411835
int wilc_wlan_init(struct net_device *dev)
18421836
{

0 commit comments

Comments
 (0)