acpi_gpiobus.c (2d4219919a48aa6d67ae62e2b8859ffe3b035bd2) acpi_gpiobus.c (0ffd7d4d15d468c60ef274f8368a5722e3f7f6a1)
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause
3 *
4 * Copyright (c) 2024 Ahmad Khalifa <ahmadkhalifa570@gmail.com>
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 59 unchanged lines hidden (view full) ---

68 }
69
70#ifdef NOT_YET
71 /* This is not currently implemented. */
72 if (gpio_res->Shareable == ACPI_SHARED)
73 flags |= GPIO_INTR_SHAREABLE;
74#endif
75 }
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause
3 *
4 * Copyright (c) 2024 Ahmad Khalifa <ahmadkhalifa570@gmail.com>
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 59 unchanged lines hidden (view full) ---

68 }
69
70#ifdef NOT_YET
71 /* This is not currently implemented. */
72 if (gpio_res->Shareable == ACPI_SHARED)
73 flags |= GPIO_INTR_SHAREABLE;
74#endif
75 }
76 switch (gpio_res->IoRestriction) {
77 case ACPI_IO_RESTRICT_INPUT:
78 flags |= GPIO_PIN_INPUT;
79 break;
80 case ACPI_IO_RESTRICT_OUTPUT:
81 flags |= GPIO_PIN_OUTPUT;
82 break;
76 if (gpio_res->ConnectionType == ACPI_RESOURCE_GPIO_TYPE_IO) {
77 switch (gpio_res->IoRestriction) {
78 case ACPI_IO_RESTRICT_INPUT:
79 flags |= GPIO_PIN_INPUT;
80 break;
81 case ACPI_IO_RESTRICT_OUTPUT:
82 flags |= GPIO_PIN_OUTPUT;
83 break;
84 }
83 }
84
85 switch (gpio_res->PinConfig) {
86 case ACPI_PIN_CONFIG_PULLUP:
87 flags |= GPIO_PIN_PULLUP;
88 break;
89 case ACPI_PIN_CONFIG_PULLDOWN:
90 flags |= GPIO_PIN_PULLDOWN;

--- 221 unchanged lines hidden ---
85 }
86
87 switch (gpio_res->PinConfig) {
88 case ACPI_PIN_CONFIG_PULLUP:
89 flags |= GPIO_PIN_PULLUP;
90 break;
91 case ACPI_PIN_CONFIG_PULLDOWN:
92 flags |= GPIO_PIN_PULLDOWN;

--- 221 unchanged lines hidden ---