gpio.h 468 B

12345678910111213141516171819202122
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2011
  4. * Stefano Babic, DENX Software Engineering, <sbabic@denx.de>
  5. */
  6. #ifndef __ASM_ARCH_IMX_GPIO_H
  7. #define __ASM_ARCH_IMX_GPIO_H
  8. #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
  9. /* GPIO registers */
  10. struct gpio_regs {
  11. u32 gpio_dr; /* data */
  12. u32 gpio_dir; /* direction */
  13. u32 gpio_psr; /* pad satus */
  14. };
  15. #endif
  16. #define IMX_GPIO_NR(port, index) ((((port)-1)*32)+((index)&31))
  17. #endif