| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Amstrad E3 FIQ handling |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 8 | 9 | * |
|---|
| 9 | 10 | * Parts of this code are taken from linux/arch/arm/mach-omap/irq.c |
|---|
| 10 | 11 | * 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. |
|---|
| 15 | 12 | */ |
|---|
| 16 | 13 | #include <linux/gpio/consumer.h> |
|---|
| 14 | +#include <linux/gpio/machine.h> |
|---|
| 17 | 15 | #include <linux/gpio/driver.h> |
|---|
| 18 | 16 | #include <linux/interrupt.h> |
|---|
| 19 | 17 | #include <linux/irq.h> |
|---|
| .. | .. |
|---|
| 22 | 20 | #include <linux/platform_data/ams-delta-fiq.h> |
|---|
| 23 | 21 | #include <linux/platform_device.h> |
|---|
| 24 | 22 | |
|---|
| 25 | | -#include <mach/board-ams-delta.h> |
|---|
| 26 | | - |
|---|
| 27 | 23 | #include <asm/fiq.h> |
|---|
| 28 | 24 | |
|---|
| 29 | 25 | #include "ams-delta-fiq.h" |
|---|
| 26 | +#include "board-ams-delta.h" |
|---|
| 30 | 27 | |
|---|
| 31 | 28 | static struct fiq_handler fh = { |
|---|
| 32 | 29 | .name = "ams-delta-fiq" |
|---|
| .. | .. |
|---|
| 101 | 98 | } |
|---|
| 102 | 99 | |
|---|
| 103 | 100 | 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); |
|---|
| 105 | 103 | if (IS_ERR(gpiod)) { |
|---|
| 106 | 104 | pr_err("%s: failed to get GPIO pin %d (%ld)\n", |
|---|
| 107 | 105 | __func__, i, PTR_ERR(gpiod)); |
|---|
| .. | .. |
|---|
| 112 | 110 | |
|---|
| 113 | 111 | /* |
|---|
| 114 | 112 | * 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 |
|---|
| 116 | 114 | * interfere. Fail if any of those two couldn't be requested. |
|---|
| 117 | 115 | */ |
|---|
| 118 | 116 | switch (i) { |
|---|