git: 969484b53217 - main - bytgpio: expose PNP info
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 29 Jul 2024 20:18:04 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=969484b53217cee65d6802f1954f0431cbfc6b45
commit 969484b53217cee65d6802f1954f0431cbfc6b45
Author: Ahmad Khalifa <ahmadkhalifa570@gmail.com>
AuthorDate: 2024-07-26 08:21:44 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-07-29 20:09:08 +0000
bytgpio: expose PNP info
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1349
---
sys/dev/gpio/bytgpio.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sys/dev/gpio/bytgpio.c b/sys/dev/gpio/bytgpio.c
index b3f5f02081c5..f7b2a73ec6cb 100644
--- a/sys/dev/gpio/bytgpio.c
+++ b/sys/dev/gpio/bytgpio.c
@@ -278,6 +278,8 @@ const struct pinmap_info bytgpio_sus_pins[] = {
GPIO_PIN_MAP(40, 0)
};
+static char *bytgpio_gpio_ids[] = { "INT33FC", NULL };
+
#define SUS_PINS nitems(bytgpio_sus_pins)
#define BYGPIO_PIN_REGISTER(sc, pin, r) ((sc)->sc_pinpad_map[(pin)].reg * 16 + (r))
@@ -538,12 +540,11 @@ bytgpio_pin_toggle(device_t dev, uint32_t pin)
static int
bytgpio_probe(device_t dev)
{
- static char *gpio_ids[] = { "INT33FC", 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, bytgpio_gpio_ids, NULL);
if (rv <= 0)
device_set_desc(dev, "Intel Baytrail GPIO Controller");
return (rv);
@@ -675,3 +676,4 @@ static driver_t bytgpio_driver = {
DRIVER_MODULE(bytgpio, acpi, bytgpio_driver, 0, 0);
MODULE_DEPEND(bytgpio, acpi, 1, 1, 1);
MODULE_DEPEND(bytgpio, gpiobus, 1, 1, 1);
+ACPI_PNP_INFO(bytgpio_gpio_ids);