mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 17:18:59 +00:00
8c405cdccc
The patches were generated from the RPi repo with the following command: git format-patch v6.6.34..rpi-6.1.y Some patches needed rebasing and, as usual, the applied and reverted, wireless drivers, Github workflows, READMEs and defconfigs patches were removed. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
48 lines
1.4 KiB
Diff
48 lines
1.4 KiB
Diff
From bf6e52b5a3e670ee683bed778be657b98e0c83af Mon Sep 17 00:00:00 2001
|
|
From: Phil Elwell <phil@raspberrypi.com>
|
|
Date: Thu, 21 Dec 2023 15:13:37 +0000
|
|
Subject: [PATCH 0802/1085] bcm2835-virtgpio: Update for Linux 6.6
|
|
|
|
The gpio subsystem is happier if the gpiochip is given a parent, and
|
|
if it doesn't have a fixed base gpio number. While we're in here,
|
|
use the fact that the firmware node is the parent to locate it,
|
|
and use the devm_ version of rpi_firmware_get.
|
|
|
|
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
|
---
|
|
drivers/gpio/gpio-bcm-virt.c | 9 +++++----
|
|
1 file changed, 5 insertions(+), 4 deletions(-)
|
|
|
|
--- a/drivers/gpio/gpio-bcm-virt.c
|
|
+++ b/drivers/gpio/gpio-bcm-virt.c
|
|
@@ -85,13 +85,14 @@ static int brcmvirt_gpio_probe(struct pl
|
|
struct brcmvirt_gpio *ucb;
|
|
u32 gpiovirtbuf;
|
|
|
|
- fw_node = of_parse_phandle(np, "firmware", 0);
|
|
+ fw_node = of_get_parent(np);
|
|
if (!fw_node) {
|
|
dev_err(dev, "Missing firmware node\n");
|
|
return -ENOENT;
|
|
}
|
|
|
|
- fw = rpi_firmware_get(fw_node);
|
|
+ fw = devm_rpi_firmware_get(&pdev->dev, fw_node);
|
|
+ of_node_put(fw_node);
|
|
if (!fw)
|
|
return -EPROBE_DEFER;
|
|
|
|
@@ -145,10 +146,10 @@ static int brcmvirt_gpio_probe(struct pl
|
|
}
|
|
ucb->bus_addr = 0;
|
|
}
|
|
+ ucb->gc.parent = dev;
|
|
ucb->gc.label = MODULE_NAME;
|
|
ucb->gc.owner = THIS_MODULE;
|
|
- //ucb->gc.dev = dev;
|
|
- ucb->gc.base = 100;
|
|
+ ucb->gc.base = -1;
|
|
ucb->gc.ngpio = NUM_GPIO;
|
|
|
|
ucb->gc.direction_input = brcmvirt_gpio_dir_in;
|