git: 44c85f6bbc06 - main - amdgpio: Add PNP info for devmatch
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 23 Nov 2026 23:39:42 UTC
The branch main has been updated by olivier:
URL: https://cgit.FreeBSD.org/src/commit/?id=44c85f6bbc06a59ba30107e2610ed1af603b9884
commit 44c85f6bbc06a59ba30107e2610ed1af603b9884
Author: Olivier Cochard <olivier@FreeBSD.org>
AuthorDate: 2026-11-11 18:05:29 +0000
Commit: Olivier Cochard <olivier@FreeBSD.org>
CommitDate: 2026-11-23 23:33:47 +0000
amdgpio: Add PNP info for devmatch
amdgpio is not in GENERIC and exports no PNP info, so devmatch(8)
never loads it, and GPIO consumers on AMD systems find no controller
unless amdgpio is in kld_list.
Export the ACPI ids so devmatch(8) loads the module at boot.
Reviewed by: imp
Approved by: imp
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/116
---
sys/dev/amdgpio/amdgpio.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sys/dev/amdgpio/amdgpio.c b/sys/dev/amdgpio/amdgpio.c
index 5cfddfaa338e..9e435256fde6 100644
--- a/sys/dev/amdgpio/amdgpio.c
+++ b/sys/dev/amdgpio/amdgpio.c
@@ -354,15 +354,16 @@ amdgpio_pin_toggle(device_t dev, uint32_t pin)
return (0);
}
+static char *amdgpio_ids[] = { "AMD0030", "AMDI0030", NULL };
+
static int
amdgpio_probe(device_t dev)
{
- static char *gpio_ids[] = { "AMD0030", "AMDI0030", NULL };
int rv;
if (acpi_disabled("gpio"))
return (ENXIO);
- rv = ACPI_ID_PROBE(device_get_parent(dev), dev, gpio_ids, NULL);
+ rv = ACPI_ID_PROBE(device_get_parent(dev), dev, amdgpio_ids, NULL);
if (rv <= 0)
device_set_desc(dev, "AMD GPIO Controller");
@@ -614,3 +615,4 @@ DRIVER_MODULE(amdgpio, acpi, amdgpio_driver, 0, 0);
MODULE_DEPEND(amdgpio, acpi, 1, 1, 1);
MODULE_DEPEND(amdgpio, gpiobus, 1, 1, 1);
MODULE_VERSION(amdgpio, 1);
+ACPI_PNP_INFO(amdgpio_ids);