b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | #ifndef _ARCH_ARM_GPIO_H |
| 3 | #define _ARCH_ARM_GPIO_H |
| 4 | |
| 5 | #if CONFIG_ARCH_NR_GPIO > 0 |
| 6 | #define ARCH_NR_GPIOS CONFIG_ARCH_NR_GPIO |
| 7 | #endif |
| 8 | |
| 9 | /* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */ |
| 10 | #include <asm-generic/gpio.h> |
| 11 | |
| 12 | /* The trivial gpiolib dispatchers */ |
| 13 | #define gpio_get_value __gpio_get_value |
| 14 | #define gpio_set_value __gpio_set_value |
| 15 | #define gpio_cansleep __gpio_cansleep |
| 16 | |
| 17 | /* |
| 18 | * Provide a default gpio_to_irq() which should satisfy every case. |
| 19 | * However, some platforms want to do this differently, so allow them |
| 20 | * to override it. |
| 21 | */ |
| 22 | #ifndef gpio_to_irq |
| 23 | #define gpio_to_irq __gpio_to_irq |
| 24 | #endif |
| 25 | |
| 26 | #endif /* _ARCH_ARM_GPIO_H */ |