diff options
author | Janusz Krzysztofik <jmkrzyszt@gmail.com> | 2018-06-22 01:41:27 +0300 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2018-07-03 09:05:14 +0300 |
commit | a617b36bbc0a1d175bbe98e009e903c1ea0e2be5 (patch) | |
tree | a3867b0bdecdc28de0c9971ec35ea4a6d95733b5 /arch/arm/mach-omap1/board-ams-delta.c | |
parent | dc8fbeb0ffde1f2395449006019e2c89c177df50 (diff) | |
download | linux-a617b36bbc0a1d175bbe98e009e903c1ea0e2be5.tar.xz |
Input: ams_delta_serio: use IRQ resource
The driver still obtains IRQ number from a hardcoded GPIO. Use IRQ
resource instead.
For this to work on Amstrad Delta, add the IRQ resource to
ams-delta-serio platform device structure. Obtain the IRQ number
assigned to "keybrd_clk" GPIO pin from FIQ initialization routine.
As a benefit, the driver no longer needs to include
<mach/board-ams-delta.h>.
Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1/board-ams-delta.c')
-rw-r--r-- | arch/arm/mach-omap1/board-ams-delta.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 902c24cc8508..f453b08ed7ef 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c @@ -521,9 +521,24 @@ static struct platform_device cx20442_codec_device = { .id = -1, }; +static struct resource ams_delta_serio_resources[] = { + { + .flags = IORESOURCE_IRQ, + /* + * Initialize IRQ resource with invalid IRQ number. + * It will be replaced with dynamically allocated GPIO IRQ + * obtained from GPIO chip as soon as the chip is available. + */ + .start = -EINVAL, + .end = -EINVAL, + }, +}; + static struct platform_device ams_delta_serio_device = { .name = "ams-delta-serio", .id = PLATFORM_DEVID_NONE, + .num_resources = ARRAY_SIZE(ams_delta_serio_resources), + .resource = ams_delta_serio_resources, }; static struct regulator_consumer_supply keybrd_pwr_consumers[] = { @@ -632,7 +647,7 @@ static void __init omap_gpio_deps_init(void) return; } - ams_delta_init_fiq(chip); + ams_delta_init_fiq(chip, &ams_delta_serio_device); } static void __init ams_delta_init(void) |