Skip to content

Commit 2d798a3

Browse files
jhovoldgregkh
authored andcommitted
ARM: w1-gpio: fix erroneous gpio requests
Fix regression introduced by commit d2323cf ("onewire: w1-gpio: add ext_pullup_enable pin in platform data") which added a gpio entry to the platform data, but did not add the required initialisers to the board files using it. Consequently, the driver would request gpio 0 at probe, which could break other uses of the corresponding pin. On AT91 requesting gpio 0 changes the pin muxing for PIOA0, which, for instance, breaks SPI0 on at91sam9g20. Cc: stable <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent f6161aa commit 2d798a3

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

arch/arm/mach-at91/board-foxg20.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ static struct w1_gpio_platform_data w1_gpio_pdata = {
176176
/* If you choose to use a pin other than PB16 it needs to be 3.3V */
177177
.pin = AT91_PIN_PB16,
178178
.is_open_drain = 1,
179+
.ext_pullup_enable_pin = -EINVAL,
179180
};
180181

181182
static struct platform_device w1_device = {

arch/arm/mach-at91/board-stamp9g20.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ static struct spi_board_info portuxg20_spi_devices[] = {
188188
static struct w1_gpio_platform_data w1_gpio_pdata = {
189189
.pin = AT91_PIN_PA29,
190190
.is_open_drain = 1,
191+
.ext_pullup_enable_pin = -EINVAL,
191192
};
192193

193194
static struct platform_device w1_device = {

arch/arm/mach-ixp4xx/vulcan-setup.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ static struct platform_device vulcan_max6369 = {
163163

164164
static struct w1_gpio_platform_data vulcan_w1_gpio_pdata = {
165165
.pin = 14,
166+
.ext_pullup_enable_pin = -EINVAL,
166167
};
167168

168169
static struct platform_device vulcan_w1_gpio = {

arch/arm/mach-pxa/raumfeld.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,7 @@ static struct w1_gpio_platform_data w1_gpio_platform_data = {
505505
.pin = GPIO_ONE_WIRE,
506506
.is_open_drain = 0,
507507
.enable_external_pullup = w1_enable_external_pullup,
508+
.ext_pullup_enable_pin = -EINVAL,
508509
};
509510

510511
struct platform_device raumfeld_w1_gpio_device = {

0 commit comments

Comments
 (0)