forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f9004dbfff8a3fbbd7e2a88c8a4327c7f2f8e5b2
kernel/arch/arm/mach-omap1/ams-delta-fiq.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Amstrad E3 FIQ handling
34 *
....@@ -8,12 +9,9 @@
89 *
910 * Parts of this code are taken from linux/arch/arm/mach-omap/irq.c
1011 * in the MontaVista 2.4 kernel (and the Amstrad changes therein)
11
- *
12
- * This program is free software; you can redistribute it and/or modify it
13
- * under the terms of the GNU General Public License version 2 as published by
14
- * the Free Software Foundation.
1512 */
1613 #include <linux/gpio/consumer.h>
14
+#include <linux/gpio/machine.h>
1715 #include <linux/gpio/driver.h>
1816 #include <linux/interrupt.h>
1917 #include <linux/irq.h>
....@@ -22,11 +20,10 @@
2220 #include <linux/platform_data/ams-delta-fiq.h>
2321 #include <linux/platform_device.h>
2422
25
-#include <mach/board-ams-delta.h>
26
-
2723 #include <asm/fiq.h>
2824
2925 #include "ams-delta-fiq.h"
26
+#include "board-ams-delta.h"
3027
3128 static struct fiq_handler fh = {
3229 .name = "ams-delta-fiq"
....@@ -101,7 +98,8 @@
10198 }
10299
103100 for (i = 0; i < ARRAY_SIZE(irq_data); i++) {
104
- gpiod = gpiochip_request_own_desc(chip, i, pin_name[i]);
101
+ gpiod = gpiochip_request_own_desc(chip, i, pin_name[i],
102
+ GPIO_ACTIVE_HIGH, GPIOD_IN);
105103 if (IS_ERR(gpiod)) {
106104 pr_err("%s: failed to get GPIO pin %d (%ld)\n",
107105 __func__, i, PTR_ERR(gpiod));
....@@ -112,7 +110,7 @@
112110
113111 /*
114112 * FIQ handler takes full control over serio data and clk GPIO
115
- * pins. Initiaize them and keep requested so nobody can
113
+ * pins. Initialize them and keep requested so nobody can
116114 * interfere. Fail if any of those two couldn't be requested.
117115 */
118116 switch (i) {