mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
1c59d04505
This GPIO controller is used on UniPhier SoC family. The vendor specific property "socionext,interrupt-ranges" is for specifying interrupt mapping to the parent interrupt controller because the mapping is not contiguous. It works like "ranges", but transforms "interrupts" instead of "reg". Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
19 lines
497 B
C
19 lines
497 B
C
/*
|
|
* Copyright (C) 2017 Socionext Inc.
|
|
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
|
|
*/
|
|
|
|
#ifndef _DT_BINDINGS_GPIO_UNIPHIER_H
|
|
#define _DT_BINDINGS_GPIO_UNIPHIER_H
|
|
|
|
#define UNIPHIER_GPIO_LINES_PER_BANK 8
|
|
|
|
#define UNIPHIER_GPIO_IRQ_OFFSET ((UNIPHIER_GPIO_LINES_PER_BANK) * 15)
|
|
|
|
#define UNIPHIER_GPIO_PORT(bank, line) \
|
|
((UNIPHIER_GPIO_LINES_PER_BANK) * (bank) + (line))
|
|
|
|
#define UNIPHIER_GPIO_IRQ(n) ((UNIPHIER_GPIO_IRQ_OFFSET) + (n))
|
|
|
|
#endif /* _DT_BINDINGS_GPIO_UNIPHIER_H */
|