aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/alchemy/board-mtx1.c
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2019-01-04 22:07:47 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2019-01-04 22:07:47 +1100
commitd538d94f0ca86cfedc892cc427169219acb3c2f7 (patch)
tree8363c4ff35907edb5245da737d7f6982bf22b945 /arch/mips/alchemy/board-mtx1.c
parentf460772291f8171988b2b60141a45706123d0c69 (diff)
parent96d4f267e40f9509e8a66e2b39e8b95655617693 (diff)
Merge branch 'master' into fixes
We have a fix to apply on top of commit 96d4f267e40f ("Remove 'type' argument from access_ok() function"), so merge master to get it.
Diffstat (limited to 'arch/mips/alchemy/board-mtx1.c')
-rw-r--r--arch/mips/alchemy/board-mtx1.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/mips/alchemy/board-mtx1.c b/arch/mips/alchemy/board-mtx1.c
index d625e6f99ae7..9d9d4ee31605 100644
--- a/arch/mips/alchemy/board-mtx1.c
+++ b/arch/mips/alchemy/board-mtx1.c
@@ -24,6 +24,7 @@
#include <linux/platform_device.h>
#include <linux/leds.h>
#include <linux/gpio.h>
+#include <linux/gpio/machine.h>
#include <linux/gpio_keys.h>
#include <linux/input.h>
#include <linux/mtd/partitions.h>
@@ -130,20 +131,18 @@ static struct platform_device mtx1_button = {
}
};
-static struct resource mtx1_wdt_res[] = {
- [0] = {
- .start = 215,
- .end = 215,
- .name = "mtx1-wdt-gpio",
- .flags = IORESOURCE_IRQ,
- }
+static struct gpiod_lookup_table mtx1_wdt_gpio_table = {
+ .dev_id = "mtx1-wdt.0",
+ .table = {
+ /* Global number 215 is offset 15 on Alchemy GPIO 2 */
+ GPIO_LOOKUP("alchemy-gpio2", 15, NULL, GPIO_ACTIVE_HIGH),
+ { },
+ },
};
static struct platform_device mtx1_wdt = {
.name = "mtx1-wdt",
.id = 0,
- .num_resources = ARRAY_SIZE(mtx1_wdt_res),
- .resource = mtx1_wdt_res,
};
static const struct gpio_led default_leds[] = {
@@ -310,6 +309,7 @@ static int __init mtx1_register_devices(void)
}
gpio_direction_input(mtx1_gpio_button[0].gpio);
out:
+ gpiod_add_lookup_table(&mtx1_wdt_gpio_table);
return platform_add_devices(mtx1_devs, ARRAY_SIZE(mtx1_devs));
}
arch_initcall(mtx1_register_devices);