uniphier-gpio.h 497 B

12345678910111213141516171819
  1. /*
  2. * Copyright (C) 2017 Socionext Inc.
  3. * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  4. */
  5. #ifndef _DT_BINDINGS_GPIO_UNIPHIER_H
  6. #define _DT_BINDINGS_GPIO_UNIPHIER_H
  7. #define UNIPHIER_GPIO_LINES_PER_BANK 8
  8. #define UNIPHIER_GPIO_IRQ_OFFSET ((UNIPHIER_GPIO_LINES_PER_BANK) * 15)
  9. #define UNIPHIER_GPIO_PORT(bank, line) \
  10. ((UNIPHIER_GPIO_LINES_PER_BANK) * (bank) + (line))
  11. #define UNIPHIER_GPIO_IRQ(n) ((UNIPHIER_GPIO_IRQ_OFFSET) + (n))
  12. #endif /* _DT_BINDINGS_GPIO_UNIPHIER_H */