diff mbox series

[54/75] patch: bcma: Fill of_node instead of fwnode on older kernel

Message ID 20240627234808.1253337-55-hauke@hauke-m.de (mailing list archive)
State New, archived
Headers show
Series backports: Update to kernel 6.1.95 | expand

Commit Message

Hauke Mehrtens June 27, 2024, 11:47 p.m. UTC
Older kernel versions do not have the fwnode attribute in the struct
gpio_chip, fill the of_node attribuet instead.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 patches/0112-gpio-fwnode.patch | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 patches/0112-gpio-fwnode.patch

Comments

Johannes Berg June 28, 2024, 10:48 a.m. UTC | #1
On Fri, 2024-06-28 at 01:47 +0200, Hauke Mehrtens wrote:
> Older kernel versions do not have the fwnode attribute in the struct
> gpio_chip, fill the of_node attribuet instead.

type 'attribute'

seems this should've been fairlyh simple with spatch?

johannes
Hauke Mehrtens June 30, 2024, 8:57 p.m. UTC | #2
On 6/28/24 12:48, Johannes Berg wrote:
> On Fri, 2024-06-28 at 01:47 +0200, Hauke Mehrtens wrote:
>> Older kernel versions do not have the fwnode attribute in the struct
>> gpio_chip, fill the of_node attribuet instead.
> 
> type 'attribute'

Fixed

> seems this should've been fairlyh simple with spatch?

I have only seen this problem once and will go with the normal patch.

Maybe we can remove bcma and ssb completely from backports and just use 
the in kernel version in the future. There is not much activity on bcma 
and ssb any more and the interface to the wifi drivers is pretty stable.

Hauke
Johannes Berg July 1, 2024, 9:02 a.m. UTC | #3
On Sun, 2024-06-30 at 22:57 +0200, Hauke Mehrtens wrote:
> 
> > seems this should've been fairlyh simple with spatch?
> 
> I have only seen this problem once and will go with the normal patch.

Sure.

> Maybe we can remove bcma and ssb completely from backports and just use 
> the in kernel version in the future. There is not much activity on bcma 
> and ssb any more and the interface to the wifi drivers is pretty stable.

Yeah that's a good point, pretty much nothing going on there, I found
pretty much only this:

commit 985324a16efb ("bcma: add HP Stream Notebook")
commit 80bc5ae9733c ("bcma: support SPROM rev 11")

johannes
diff mbox series

Patch

diff --git a/patches/0112-gpio-fwnode.patch b/patches/0112-gpio-fwnode.patch
new file mode 100644
index 00000000..5518884d
--- /dev/null
+++ b/patches/0112-gpio-fwnode.patch
@@ -0,0 +1,14 @@ 
+--- a/drivers/bcma/driver_gpio.c
++++ b/drivers/bcma/driver_gpio.c
+@@ -184,7 +184,11 @@ int bcma_gpio_init(struct bcma_drv_cc *c
+ 	chip->direction_input	= bcma_gpio_direction_input;
+ 	chip->direction_output	= bcma_gpio_direction_output;
+ 	chip->parent		= bus->dev;
++#if LINUX_VERSION_IS_GEQ(5,17,0)
+ 	chip->fwnode		= dev_fwnode(&cc->core->dev);
++#elif IS_BUILTIN(CONFIG_OF)
++	chip->of_node		= cc->core->dev.of_node;
++#endif
+ 
+ 	switch (bus->chipinfo.id) {
+ 	case BCMA_CHIP_ID_BCM4707: