* [PATCH] wireless: ath9k: eeprom: remove platform data
@ 2024-09-03 20:27 Rosen Penev
2024-09-04 8:05 ` Kalle Valo
0 siblings, 1 reply; 6+ messages in thread
From: Rosen Penev @ 2024-09-03 20:27 UTC (permalink / raw)
To: linux-wireless; +Cc: kvalo, toke, nbd
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 <rosenp@gmail.com>
---
As an aside, the last user of this functionality downstream in OpenWrt
has been removed: https://github.com/openwrt/openwrt/commit/7ac8279bd
drivers/net/wireless/ath/ath9k/eeprom.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c
index efb7889142d4..df58dc02e104 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom.c
@@ -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);
--
2.46.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] wireless: ath9k: eeprom: remove platform data
2024-09-03 20:27 [PATCH] wireless: ath9k: eeprom: remove platform data Rosen Penev
@ 2024-09-04 8:05 ` Kalle Valo
2024-09-04 14:53 ` Jeff Johnson
0 siblings, 1 reply; 6+ messages in thread
From: Kalle Valo @ 2024-09-04 8:05 UTC (permalink / raw)
To: Rosen Penev; +Cc: linux-wireless, toke, nbd
Rosen Penev <rosenp@gmail.com> writes:
> 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 <rosenp@gmail.com>
> ---
> As an aside, the last user of this functionality downstream in OpenWrt
> has been removed: https://github.com/openwrt/openwrt/commit/7ac8279bd
>
> drivers/net/wireless/ath/ath9k/eeprom.c | 12 ------------
> 1 file changed, 12 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c
> index efb7889142d4..df58dc02e104 100644
> --- a/drivers/net/wireless/ath/ath9k/eeprom.c
> +++ b/drivers/net/wireless/ath/ath9k/eeprom.c
> @@ -15,7 +15,6 @@
> */
>
> #include "hw.h"
> -#include <linux/ath9k_platform.h>
What about the file include/linux/ath9k_platform.h? That should be also
removed, right?
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
https://docs.kernel.org/process/submitting-patches.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] wireless: ath9k: eeprom: remove platform data
2024-09-04 8:05 ` Kalle Valo
@ 2024-09-04 14:53 ` Jeff Johnson
2024-09-04 17:56 ` Rosen Penev
0 siblings, 1 reply; 6+ messages in thread
From: Jeff Johnson @ 2024-09-04 14:53 UTC (permalink / raw)
To: Kalle Valo, Rosen Penev; +Cc: linux-wireless, toke, nbd
On 9/4/2024 1:05 AM, Kalle Valo wrote:
> Rosen Penev <rosenp@gmail.com> writes:
>
>> 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 <rosenp@gmail.com>
>> ---
>> As an aside, the last user of this functionality downstream in OpenWrt
>> has been removed: https://github.com/openwrt/openwrt/commit/7ac8279bd
>>
>> drivers/net/wireless/ath/ath9k/eeprom.c | 12 ------------
>> 1 file changed, 12 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c
>> index efb7889142d4..df58dc02e104 100644
>> --- a/drivers/net/wireless/ath/ath9k/eeprom.c
>> +++ b/drivers/net/wireless/ath/ath9k/eeprom.c
>> @@ -15,7 +15,6 @@
>> */
>>
>> #include "hw.h"
>> -#include <linux/ath9k_platform.h>
>
> What about the file include/linux/ath9k_platform.h? That should be also
> removed, right?
That file is still used by other functionality (see init.c, btcoex.c)
But seems that at a minimum unused eeprom-related stuff should be removed from
struct ath9k_platform_data.
Please review that all of the platform-related code in init.c is still needed,
especially code related to eeprom support.
/jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] wireless: ath9k: eeprom: remove platform data
2024-09-04 14:53 ` Jeff Johnson
@ 2024-09-04 17:56 ` Rosen Penev
2024-09-04 23:53 ` Rosen Penev
0 siblings, 1 reply; 6+ messages in thread
From: Rosen Penev @ 2024-09-04 17:56 UTC (permalink / raw)
To: Jeff Johnson; +Cc: Kalle Valo, linux-wireless, toke, nbd
On Wed, Sep 4, 2024 at 7:53 AM Jeff Johnson <quic_jjohnson@quicinc.com> wrote:
>
> On 9/4/2024 1:05 AM, Kalle Valo wrote:
> > Rosen Penev <rosenp@gmail.com> writes:
> >
> >> 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 <rosenp@gmail.com>
> >> ---
> >> As an aside, the last user of this functionality downstream in OpenWrt
> >> has been removed: https://github.com/openwrt/openwrt/commit/7ac8279bd
> >>
> >> drivers/net/wireless/ath/ath9k/eeprom.c | 12 ------------
> >> 1 file changed, 12 deletions(-)
> >>
> >> diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c
> >> index efb7889142d4..df58dc02e104 100644
> >> --- a/drivers/net/wireless/ath/ath9k/eeprom.c
> >> +++ b/drivers/net/wireless/ath/ath9k/eeprom.c
> >> @@ -15,7 +15,6 @@
> >> */
> >>
> >> #include "hw.h"
> >> -#include <linux/ath9k_platform.h>
> >
> > What about the file include/linux/ath9k_platform.h? That should be also
> > removed, right?
>
> That file is still used by other functionality (see init.c, btcoex.c)
> But seems that at a minimum unused eeprom-related stuff should be removed from
> struct ath9k_platform_data.
That's why I kept my changes to a minimum. I don't yet want to axe the
other stuff. OpenWrt has a ton of non upstreamed patches for ath9k,
some probably relying on ath9k_platform_data. I need to do real
careful analysis to remove the rest.
>
> Please review that all of the platform-related code in init.c is still needed,
> especially code related to eeprom support.
>
> /jeff
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] wireless: ath9k: eeprom: remove platform data
2024-09-04 17:56 ` Rosen Penev
@ 2024-09-04 23:53 ` Rosen Penev
2024-09-05 5:46 ` Kalle Valo
0 siblings, 1 reply; 6+ messages in thread
From: Rosen Penev @ 2024-09-04 23:53 UTC (permalink / raw)
To: Jeff Johnson; +Cc: Kalle Valo, linux-wireless, toke, nbd
On Wed, Sep 4, 2024 at 10:56 AM Rosen Penev <rosenp@gmail.com> wrote:
>
> On Wed, Sep 4, 2024 at 7:53 AM Jeff Johnson <quic_jjohnson@quicinc.com> wrote:
> >
> > On 9/4/2024 1:05 AM, Kalle Valo wrote:
> > > Rosen Penev <rosenp@gmail.com> writes:
> > >
> > >> 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 <rosenp@gmail.com>
> > >> ---
> > >> As an aside, the last user of this functionality downstream in OpenWrt
> > >> has been removed: https://github.com/openwrt/openwrt/commit/7ac8279bd
> > >>
> > >> drivers/net/wireless/ath/ath9k/eeprom.c | 12 ------------
> > >> 1 file changed, 12 deletions(-)
> > >>
> > >> diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c
> > >> index efb7889142d4..df58dc02e104 100644
> > >> --- a/drivers/net/wireless/ath/ath9k/eeprom.c
> > >> +++ b/drivers/net/wireless/ath/ath9k/eeprom.c
> > >> @@ -15,7 +15,6 @@
> > >> */
> > >>
> > >> #include "hw.h"
> > >> -#include <linux/ath9k_platform.h>
> > >
> > > What about the file include/linux/ath9k_platform.h? That should be also
> > > removed, right?
> >
> > That file is still used by other functionality (see init.c, btcoex.c)
> > But seems that at a minimum unused eeprom-related stuff should be removed from
> > struct ath9k_platform_data.
> That's why I kept my changes to a minimum. I don't yet want to axe the
> other stuff. OpenWrt has a ton of non upstreamed patches for ath9k,
> some probably relying on ath9k_platform_data. I need to do real
> careful analysis to remove the rest.
> >
> > Please review that all of the platform-related code in init.c is still needed,
> > especially code related to eeprom support.
That's handled with nvmem and OF (if applicable).
Anyway, I split up the removal in 4 patches. of_init needs some extra
functionality to match platform_device.
Does Documentation need to go in its own commit?
> >
> > /jeff
> >
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] wireless: ath9k: eeprom: remove platform data
2024-09-04 23:53 ` Rosen Penev
@ 2024-09-05 5:46 ` Kalle Valo
0 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2024-09-05 5:46 UTC (permalink / raw)
To: Rosen Penev; +Cc: Jeff Johnson, linux-wireless, toke, nbd
Rosen Penev <rosenp@gmail.com> writes:
> On Wed, Sep 4, 2024 at 10:56 AM Rosen Penev <rosenp@gmail.com> wrote:
>
>>
>> On Wed, Sep 4, 2024 at 7:53 AM Jeff Johnson <quic_jjohnson@quicinc.com> wrote:
>> >
>> > On 9/4/2024 1:05 AM, Kalle Valo wrote:
>> > > Rosen Penev <rosenp@gmail.com> writes:
>> > >
>> > >> 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 <rosenp@gmail.com>
>> > >> ---
>> > >> As an aside, the last user of this functionality downstream in OpenWrt
>> > >> has been removed: https://github.com/openwrt/openwrt/commit/7ac8279bd
>> > >>
>> > >> drivers/net/wireless/ath/ath9k/eeprom.c | 12 ------------
>> > >> 1 file changed, 12 deletions(-)
>> > >>
>> > >> diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c
>> > >> index efb7889142d4..df58dc02e104 100644
>> > >> --- a/drivers/net/wireless/ath/ath9k/eeprom.c
>> > >> +++ b/drivers/net/wireless/ath/ath9k/eeprom.c
>> > >> @@ -15,7 +15,6 @@
>> > >> */
>> > >>
>> > >> #include "hw.h"
>> > >> -#include <linux/ath9k_platform.h>
>> > >
>> > > What about the file include/linux/ath9k_platform.h? That should be also
>> > > removed, right?
>> >
>> > That file is still used by other functionality (see init.c, btcoex.c)
>> > But seems that at a minimum unused eeprom-related stuff should be removed from
>> > struct ath9k_platform_data.
>> That's why I kept my changes to a minimum. I don't yet want to axe the
>> other stuff. OpenWrt has a ton of non upstreamed patches for ath9k,
>> some probably relying on ath9k_platform_data. I need to do real
>> careful analysis to remove the rest.
>> >
>> > Please review that all of the platform-related code in init.c is still needed,
>> > especially code related to eeprom support.
>
> That's handled with nvmem and OF (if applicable).
>
> Anyway, I split up the removal in 4 patches. of_init needs some extra
> functionality to match platform_device.
>
> Does Documentation need to go in its own commit?
I don't know what Documentation changes you are doing but usually it's
good to make changes to Documentation in separate patches.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-09-05 5:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-03 20:27 [PATCH] wireless: ath9k: eeprom: remove platform data Rosen Penev
2024-09-04 8:05 ` Kalle Valo
2024-09-04 14:53 ` Jeff Johnson
2024-09-04 17:56 ` Rosen Penev
2024-09-04 23:53 ` Rosen Penev
2024-09-05 5:46 ` Kalle Valo
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).