aboutsummaryrefslogtreecommitdiff
path: root/include/dt-bindings/gpio/uniphier-gpio.h
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@FreeBSD.org>2018-02-09 22:33:22 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2018-02-09 22:33:22 +0000
commit16ae49e2bea5badc71c2265966ec2a9b0ba541dc (patch)
tree5ff3ed27eadaf4f2d05b771bc108bd500b3d8f48 /include/dt-bindings/gpio/uniphier-gpio.h
parent550370858c61e6f7fe3832de73daa9cc25ba716a (diff)
Update our copies of the Device Tree Source to Linux 4.15vendor/device-tree/4.15
Notes
Notes: svn path=/vendor/device-tree/dist/; revision=329088 svn path=/vendor/device-tree/4.15/; revision=329090; tag=vendor/device-tree/4.15
Diffstat (limited to 'include/dt-bindings/gpio/uniphier-gpio.h')
-rw-r--r--include/dt-bindings/gpio/uniphier-gpio.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/dt-bindings/gpio/uniphier-gpio.h b/include/dt-bindings/gpio/uniphier-gpio.h
new file mode 100644
index 000000000000..9f0ad174f61c
--- /dev/null
+++ b/include/dt-bindings/gpio/uniphier-gpio.h
@@ -0,0 +1,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 */