blob: 24cfde3c2972e2caaea5eb29dc61aa06ab5e3acf [file] [log] [blame]
Peng Fanb2242e12018-10-18 14:28:27 +02001/* 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 */
11struct 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 */