blob: c50e383358c4cf19f890f14ba2dd0bf0b5f53e50 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
David Brownell4c203862007-02-12 00:53:11 -08002#ifndef _ARCH_ARM_GPIO_H
3#define _ARCH_ARM_GPIO_H
4
Peter De Schrijver (NVIDIA)44986ab2011-12-21 10:48:45 +01005#if CONFIG_ARCH_NR_GPIO > 0
Stephen Warrenca950232012-01-05 21:36:27 +01006#define ARCH_NR_GPIOS CONFIG_ARCH_NR_GPIO
Peter De Schrijver (NVIDIA)44986ab2011-12-21 10:48:45 +01007#endif
8
Russell King22fe6782011-07-26 11:04:51 +01009/* 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
Russell King22fe6782011-07-26 11:04:51 +010016
Russell King01e7dc82011-07-26 11:29:42 +010017/*
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
David Brownell4c203862007-02-12 00:53:11 -080026#endif /* _ARCH_ARM_GPIO_H */