gpio.h 468 B

1234567891011121314151617181920212223
  1. /*
  2. * Copyright (C) 2011
  3. * Stefano Babic, DENX Software Engineering, <sbabic@denx.de>
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #ifndef __ASM_ARCH_IMX_GPIO_H
  8. #define __ASM_ARCH_IMX_GPIO_H
  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. #define IMX_GPIO_NR(port, index) ((((port)-1)*32)+((index)&31))
  18. #endif