]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-5.0/arm-omap1-ams-delta-fix-broken-gpio-id-allocation.patch
6da31ec90339eb5ddc1a78831f2235c44545d67f
[thirdparty/kernel/stable-queue.git] / queue-5.0 / arm-omap1-ams-delta-fix-broken-gpio-id-allocation.patch
1 From 3e2cf62efec52fb49daed437cc486c3cb9a0afa2 Mon Sep 17 00:00:00 2001
2 From: Janusz Krzysztofik <jmkrzyszt@gmail.com>
3 Date: Tue, 19 Mar 2019 21:19:52 +0100
4 Subject: ARM: OMAP1: ams-delta: Fix broken GPIO ID allocation
5
6 From: Janusz Krzysztofik <jmkrzyszt@gmail.com>
7
8 commit 3e2cf62efec52fb49daed437cc486c3cb9a0afa2 upstream.
9
10 In order to request dynamic allocationn of GPIO IDs, a negative number
11 should be passed as a base GPIO ID via platform data. Unfortuntely,
12 commit 771e53c4d1a1 ("ARM: OMAP1: ams-delta: Drop board specific global
13 GPIO numbers") didn't follow that rule while switching to dynamically
14 allocated GPIO IDs for Amstrad Delta latches, making their IDs
15 overlapping with those already assigned to OMAP GPIO devices. Fix it.
16
17 Fixes: 771e53c4d1a1 ("ARM: OMAP1: ams-delta: Drop board specific global GPIO numbers")
18 Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
19 Cc: stable@vger.kernel.org
20 Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>
21 Signed-off-by: Tony Lindgren <tony@atomide.com>
22 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23
24 ---
25 arch/arm/mach-omap1/board-ams-delta.c | 2 ++
26 1 file changed, 2 insertions(+)
27
28 --- a/arch/arm/mach-omap1/board-ams-delta.c
29 +++ b/arch/arm/mach-omap1/board-ams-delta.c
30 @@ -182,6 +182,7 @@ static struct resource latch1_resources[
31
32 static struct bgpio_pdata latch1_pdata = {
33 .label = LATCH1_LABEL,
34 + .base = -1,
35 .ngpio = LATCH1_NGPIO,
36 };
37
38 @@ -219,6 +220,7 @@ static struct resource latch2_resources[
39
40 static struct bgpio_pdata latch2_pdata = {
41 .label = LATCH2_LABEL,
42 + .base = -1,
43 .ngpio = LATCH2_NGPIO,
44 };
45