gpio.h 480 B

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