wifi: ath9k: remove platform_data support
v2 cover wifi: ath9k: remove platform_data support
This series removes platform_data support as it's deprecated, unused, and replaced by OF.
v2: just remove platform data.
Rosen Penev (3):
wifi: ath9k: eeprom: remove platform data
wifi: ath9k: btcoex: remove platform_data
wifi: ath9k: remove ath9k_platform_data
.../wireless/ath/ath9k/ath9k_pci_owl_loader.c | 1 - drivers/net/wireless/ath/ath9k/btcoex.c | 16 ++---- drivers/net/wireless/ath/ath9k/eeprom.c | 12 ----- drivers/net/wireless/ath/ath9k/hw.c | 2 +- drivers/net/wireless/ath/ath9k/init.c | 52 +------------------ include/linux/ath9k_platform.h | 51 ------------------ 6 files changed, 6 insertions(+), 128 deletions(-) delete mode 100644 include/linux/ath9k_platform.h
Signature · 1 line
2.46.0
PATCH v2 1/3 wifi: ath9k: eeprom: remove platform data
There are no more board files defining platform data for this driver and eeprom support through NVMEM has already been implemented. No need to keep this old functionality around.
--- drivers/net/wireless/ath/ath9k/eeprom.c | 12 ------------ 1 file changed, 12 deletions(-)
drivers/net/wireless/ath/ath9k/eeprom.c +0 -12
@@ -15,7 +15,6 @@*/ #include "hw.h" -#include <linux/ath9k_platform.h> void ath9k_hw_analog_shift_regwrite (struct ath_hw *ah,u32 reg,u32 val) {
@@ -119,14 +118,6 @@ static bool ath9k_hw_nvram_read_array(u16 *blob, size_t blob_size,return true; } -static bool ath9k_hw_nvram_read_pdata (struct ath9k_platform_data *pdata, -off_t offset,u16 *data) -{ -return ath9k_hw_nvram_read_array (pdata->eeprom_data, -ARRAY_SIZE (pdata->eeprom_data), - offset, data); -} -static bool ath9k_hw_nvram_read_firmware (const struct firmware *eeprom_blob,off_t offset,u16 *data) {
@@ -146,15 +137,12 @@ static bool ath9k_hw_nvram_read_nvmem(struct ath_hw *ah, off_t offset,bool ath9k_hw_nvram_read (struct ath_hw *ah,u32 off,u16 *data) {struct ath_common *common =ath9k_hw_common (ah); -struct ath9k_platform_data *pdata = ah->dev->platform_data;bool ret;if (ah->nvmem_blob) ret =ath9k_hw_nvram_read_nvmem (ah, off, data);else if (ah->eeprom_blob) ret =ath9k_hw_nvram_read_firmware (ah->eeprom_blob, off, data); -else if (pdata && !pdata->use_eeprom) - ret =ath9k_hw_nvram_read_pdata (pdata, off, data);else ret = common->bus_ops->eeprom_read (common, off, data);
Signature · 1 line
2.46.0
Re: [PATCHv2 1/3] wifi: ath9k: eeprom: remove platform data
Quoted 5 lines · Rosen Penev
There are no more board files defining platform data for this driver and eeprom support through NVMEM has already been implemented. No need to keep this old functionality around.
Signed-off-by Rosen Penev <[email protected]>
Re: [PATCHv2 1/3] wifi: ath9k: eeprom: remove platform data
In reply to Rosen PenevQuoted 7 lines · Rosen Penev
There are no more board files defining platform data for this driver and eeprom support through NVMEM has already been implemented. No need to keep this old functionality around.
Signed-off-by Rosen Penev <[email protected]>Signed-off-by Kalle Valo <[email protected]>
3 patches applied to ath-next branch of ath.git, thanks.
841e1ff5369f wifi: ath9k: eeprom: remove platform data e46333b41e43 wifi: ath9k: btcoex: remove platform_data 2b0996c76462 wifi: ath9k: remove ath9k_platform_data
Signature · 4 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches https://docs.kernel.org/process/submitting-patches.html
PATCH v2 2/3 wifi: ath9k: btcoex: remove platform_data
In reply to Rosen PenevThis is completely unused as platform files are no longer used anywhere.
--- drivers/net/wireless/ath/ath9k/btcoex.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-)
drivers/net/wireless/ath/ath9k/btcoex.c +3 -13
@@ -16,7 +16,6 @@#include <linux/export.h> #include <linux/types.h> -#include <linux/ath9k_platform.h> #include "hw.h" enum ath_bt_mode {
@@ -115,23 +114,14 @@ static void ath9k_hw_btcoex_pin_init(struct ath_hw *ah, u8 wlanactive_gpio, u8 btactive_gpio, u8 btpriority_gpio) {struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw; -struct ath9k_platform_data *pdata = ah->dev->platform_data;if (btcoex_hw->scheme !=ATH_BTCOEX_CFG_2WIRE && btcoex_hw->scheme !=ATH_BTCOEX_CFG_3WIRE )return ; -/* bt priority GPIO will be ignored by 2 wire scheme */ -if (pdata && (pdata->bt_active_pin || pdata->bt_priority_pin || - pdata->wlan_active_pin)) { - btcoex_hw->btactive_gpio = pdata->bt_active_pin; - btcoex_hw->wlanactive_gpio = pdata->wlan_active_pin; - btcoex_hw->btpriority_gpio = pdata->bt_priority_pin; - }else { - btcoex_hw->btactive_gpio = btactive_gpio; - btcoex_hw->wlanactive_gpio = wlanactive_gpio; - btcoex_hw->btpriority_gpio = btpriority_gpio; - } + btcoex_hw->btactive_gpio = btactive_gpio; + btcoex_hw->wlanactive_gpio = wlanactive_gpio; + btcoex_hw->btpriority_gpio = btpriority_gpio; }void ath9k_hw_btcoex_init_scheme (struct ath_hw *ah)
Signature · 1 line
2.46.0
Re: [PATCHv2 2/3] wifi: ath9k: btcoex: remove platform_data
Quoted 3 lines · Rosen Penev
This is completely unused as platform files are no longer used anywhere.
Signed-off-by Rosen Penev <[email protected]>
PATCH v2 3/3 wifi: ath9k: remove ath9k_platform_data
In reply to Rosen PenevCompletely unused here in favor of Device Tree based setup. The DT code in here should currently match what is available with platform files. Any such lapse can always be added.
--- .../wireless/ath/ath9k/ath9k_pci_owl_loader.c | 1 - drivers/net/wireless/ath/ath9k/hw.c | 2 +- drivers/net/wireless/ath/ath9k/init.c | 52 +------------------ include/linux/ath9k_platform.h | 51 ------------------ 4 files changed, 3 insertions(+), 103 deletions(-) delete mode 100644 include/linux/ath9k_platform.h
drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c +0 -1
@@ -18,7 +18,6 @@#include <linux/pci.h> #include <linux/delay.h> #include <linux/platform_device.h> -#include <linux/ath9k_platform.h> #include <linux/nvmem-consumer.h> #include <linux/workqueue.h>
drivers/net/wireless/ath/ath9k/hw.c +1 -1
@@ -490,7 +490,7 @@ static void ath9k_hw_init_macaddr(struct ath_hw *ah)u16 eeval;static const u32 EEP_MAC [] = {EEP_MAC_LSW ,EEP_MAC_MID ,EEP_MAC_MSW }; -/* MAC address may already be loaded via ath9k_platform_data */ +/* MAC address may already be loaded via NVMEM */ if (is_valid_ether_addr (common->macaddr))return ;
drivers/net/wireless/ath/ath9k/init.c +2 -50
76 lines not on this page · raw message
include/linux/ath9k_platform.h deleted +0 -51
51 lines not on this page · raw message
Signature · 1 line
2.46.0
Re: [PATCHv2 3/3] wifi: ath9k: remove ath9k_platform_data
Quoted 5 lines · Rosen Penev
Completely unused here in favor of Device Tree based setup. The DT code in here should currently match what is available with platform files. Any such lapse can always be added.
Signed-off-by Rosen Penev <[email protected]>