]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.8.4/arm-w1-gpio-fix-erroneous-gpio-requests.patch
Linux 4.14.95
[thirdparty/kernel/stable-queue.git] / releases / 3.8.4 / arm-w1-gpio-fix-erroneous-gpio-requests.patch
CommitLineData
6da27da5
GKH
1From 2d798a3f20ae992b0b69a2b68c04ada397c32ed4 Mon Sep 17 00:00:00 2001
2From: Johan Hovold <jhovold@gmail.com>
3Date: Tue, 12 Mar 2013 20:21:34 +0100
4Subject: ARM: w1-gpio: fix erroneous gpio requests
5
6From: Johan Hovold <jhovold@gmail.com>
7
8commit 2d798a3f20ae992b0b69a2b68c04ada397c32ed4 upstream.
9
10Fix regression introduced by commit d2323cf773 ("onewire: w1-gpio: add
11ext_pullup_enable pin in platform data") which added a gpio entry to the
12platform data, but did not add the required initialisers to the board
13files using it. Consequently, the driver would request gpio 0 at probe,
14which could break other uses of the corresponding pin.
15
16On AT91 requesting gpio 0 changes the pin muxing for PIOA0, which, for
17instance, breaks SPI0 on at91sam9g20.
18
19Signed-off-by: Johan Hovold <jhovold@gmail.com>
20Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
21Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22
23---
24 arch/arm/mach-at91/board-foxg20.c | 1 +
25 arch/arm/mach-at91/board-stamp9g20.c | 1 +
26 arch/arm/mach-ixp4xx/vulcan-setup.c | 1 +
27 arch/arm/mach-pxa/raumfeld.c | 1 +
28 4 files changed, 4 insertions(+)
29
30--- a/arch/arm/mach-at91/board-foxg20.c
31+++ b/arch/arm/mach-at91/board-foxg20.c
32@@ -176,6 +176,7 @@ static struct w1_gpio_platform_data w1_g
33 /* If you choose to use a pin other than PB16 it needs to be 3.3V */
34 .pin = AT91_PIN_PB16,
35 .is_open_drain = 1,
36+ .ext_pullup_enable_pin = -EINVAL,
37 };
38
39 static struct platform_device w1_device = {
40--- a/arch/arm/mach-at91/board-stamp9g20.c
41+++ b/arch/arm/mach-at91/board-stamp9g20.c
42@@ -188,6 +188,7 @@ static struct spi_board_info portuxg20_s
43 static struct w1_gpio_platform_data w1_gpio_pdata = {
44 .pin = AT91_PIN_PA29,
45 .is_open_drain = 1,
46+ .ext_pullup_enable_pin = -EINVAL,
47 };
48
49 static struct platform_device w1_device = {
50--- a/arch/arm/mach-ixp4xx/vulcan-setup.c
51+++ b/arch/arm/mach-ixp4xx/vulcan-setup.c
52@@ -163,6 +163,7 @@ static struct platform_device vulcan_max
53
54 static struct w1_gpio_platform_data vulcan_w1_gpio_pdata = {
55 .pin = 14,
56+ .ext_pullup_enable_pin = -EINVAL,
57 };
58
59 static struct platform_device vulcan_w1_gpio = {
60--- a/arch/arm/mach-pxa/raumfeld.c
61+++ b/arch/arm/mach-pxa/raumfeld.c
62@@ -505,6 +505,7 @@ static struct w1_gpio_platform_data w1_g
63 .pin = GPIO_ONE_WIRE,
64 .is_open_drain = 0,
65 .enable_external_pullup = w1_enable_external_pullup,
66+ .ext_pullup_enable_pin = -EINVAL,
67 };
68
69 struct platform_device raumfeld_w1_gpio_device = {