Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Stefano Babic | fc05b90 | 2012-08-19 21:33:50 +0000 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2011 |
| 4 | * Stefano Babic, DENX Software Engineering, <sbabic@denx.de> |
Stefano Babic | fc05b90 | 2012-08-19 21:33:50 +0000 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | |
| 8 | #ifndef __ASM_ARCH_IMX_GPIO_H |
| 9 | #define __ASM_ARCH_IMX_GPIO_H |
| 10 | |
| 11 | #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__)) |
Tom Rini | af02676 | 2024-04-30 20:41:48 -0600 | [diff] [blame] | 12 | #include <linux/types.h> |
| 13 | |
Stefano Babic | fc05b90 | 2012-08-19 21:33:50 +0000 | [diff] [blame] | 14 | /* GPIO registers */ |
| 15 | struct gpio_regs { |
| 16 | u32 gpio_dr; /* data */ |
| 17 | u32 gpio_dir; /* direction */ |
| 18 | u32 gpio_psr; /* pad satus */ |
| 19 | }; |
| 20 | #endif |
| 21 | |
| 22 | #define IMX_GPIO_NR(port, index) ((((port)-1)*32)+((index)&31)) |
| 23 | |
| 24 | #endif |