summaryrefslogtreecommitdiff
path: root/include/dt-bindings/gpio/uniphier-gpio.h
blob: 9f0ad174f61c1c3b562435ee0a8dc8a3e29a8f74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
 * 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 */