summaryrefslogtreecommitdiffstats
path: root/firmware/target/mips/ingenic_x1000/gpio-x1000.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/mips/ingenic_x1000/gpio-x1000.h')
-rw-r--r--firmware/target/mips/ingenic_x1000/gpio-x1000.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/target/mips/ingenic_x1000/gpio-x1000.h b/firmware/target/mips/ingenic_x1000/gpio-x1000.h
index 5d147fc18f..eac5f8651f 100644
--- a/firmware/target/mips/ingenic_x1000/gpio-x1000.h
+++ b/firmware/target/mips/ingenic_x1000/gpio-x1000.h
@@ -57,6 +57,9 @@
#define GPIO_PC(x) GPION_CREATE(GPIO_C, x)
#define GPIO_PD(x) GPION_CREATE(GPIO_D, x)
+/* GPIO number to IRQ number (need to include "irq-x1000.h") */
+#define GPIO_TO_IRQ(gpio) IRQ_GPIO(GPION_PORT(gpio), GPION_PIN(gpio))
+
/* Pingroup settings are used for system devices */
struct pingroup_setting {
int port;