Skip to contentSkip to conversation

Revert "gpio: swnode: don't use the swnode's name as the key for GPIO lookup"

PATCH RESEND Superseded Charles Keepax 2 participants 3 messages Jan 6

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 Revert "gpio: swnode: don't use the swnode's name as the key for GPIO lookup"

This reverts commit 25decf0469d4c91d90aa2e28d996aed276bfc622.

This software node change doesn't actually fix any current issues with the kernel, it is an improvement to the lookup process rather than fixing a live bug. It also causes a couple of regressions with shipping laptops, which relied on the label based lookup.

There is a fix for the regressions in mainline, the first 5 patches of [1]. However, those patches are fairly substantial changes and given the patch causing the regression doesn't actually fix a bug it seems better to just revert it in stable.

---

This fix for the software node lookups is also required on 6.18 stable, see the discussion for 6.12/6.17 in [2] for why we are doing a revert rather than backporting the other fixes. The "full" fixes are merged in 6.19 so this should be the last kernel we need to push this revert onto.

Thanks,
Charles

 drivers/gpio/gpiolib-swnode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpiolib-swnode.c +1 -1
index e3806db1c0e07..f21dbc28cf2c8 100644
@@ -41,7 +41,7 @@ static struct gpio_device *swnode_get_gpio_device(struct fwnode_handle *fwnode)
 	    !strcmp(gdev_node->name, GPIOLIB_SWNODE_UNDEFINED_NAME))
 		return ERR_PTR(-ENOENT);
 
-	gdev = gpio_device_find_by_fwnode(fwnode);
+	gdev = gpio_device_find_by_label(gdev_node->name);
 	return gdev ?: ERR_PTR(-EPROBE_DEFER);
 }
 
Signature · 1 line
2.47.3
maintainer
#1 lore raw
Quoted 1 line · Charles Keepax

This reverts commit 25decf0469d4c91d90aa2e28d996aed276bfc622.

For 6.18? There is no such commit in that branch :(

Shouldn't it be e5d527be7e6984882306b49c067f1fec18920735?

Quoted 17 lines

This software node change doesn't actually fix any current issues with the kernel, it is an improvement to the lookup process rather than fixing a live bug. It also causes a couple of regressions with shipping laptops, which relied on the label based lookup.

There is a fix for the regressions in mainline, the first 5 patches of [1]. However, those patches are fairly substantial changes and given the patch causing the regression doesn't actually fix a bug it seems better to just revert it in stable.

Quoted 6 lines

---

This fix for the software node lookups is also required on 6.18 stable, see the discussion for 6.12/6.17 in [2] for why we are doing a revert rather than backporting the other fixes. The "full" fixes are merged in 6.19 so this should be the last kernel we need to push this revert onto.

Can you resend with the proper commit id in it?

thanks,

greg k-h

#2 lore raw
Quoted 26 lines · Greg KH
Quoted 1 line · Charles Keepax

This reverts commit 25decf0469d4c91d90aa2e28d996aed276bfc622.

For 6.18? There is no such commit in that branch :(

Shouldn't it be e5d527be7e6984882306b49c067f1fec18920735?

Quoted 19 lines

This software node change doesn't actually fix any current issues with the kernel, it is an improvement to the lookup process rather than fixing a live bug. It also causes a couple of regressions with shipping laptops, which relied on the label based lookup.

There is a fix for the regressions in mainline, the first 5 patches of [1]. However, those patches are fairly substantial changes and given the patch causing the regression doesn't actually fix a bug it seems better to just revert it in stable.

---

Quoted 7 lines
Quoted 4 lines

This fix for the software node lookups is also required on 6.18 stable, see the discussion for 6.12/6.17 in [2] for why we are doing a revert rather than backporting the other fixes. The "full" fixes are merged in 6.19 so this should be the last kernel we need to push this revert onto.

Can you resend with the proper commit id in it?

Apologies I will fix that up and do a v2.

Thanks,
Charles