Peng Fan | b2242e1 | 2018-10-18 14:28:27 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Copyright 2018 NXP |
| 4 | */ |
| 5 | |
| 6 | #ifndef __ASM_ARCH_IMX8_GPIO_H |
| 7 | #define __ASM_ARCH_IMX8_GPIO_H |
| 8 | |
| 9 | #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__)) |
| 10 | /* GPIO registers */ |
| 11 | struct gpio_regs { |
| 12 | u32 gpio_dr; /* data */ |
| 13 | u32 gpio_dir; /* direction */ |
| 14 | u32 gpio_psr; /* pad satus */ |
| 15 | }; |
| 16 | #endif |
| 17 | |
| 18 | /* IMX8 the GPIO index is from 0 not 1 */ |
| 19 | #define IMX_GPIO_NR(port, index) (((port) * 32) + ((index) & 31)) |
| 20 | |
| 21 | #endif /* __ASM_ARCH_IMX8_GPIO_H */ |