Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2d798a3f authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

ARM: w1-gpio: fix erroneous gpio requests



Fix regression introduced by commit d2323cf7 ("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 <stable@vger.kernel.org>
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Acked-by: default avatarJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f6161aa1
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -176,6 +176,7 @@ static struct w1_gpio_platform_data w1_gpio_pdata = {
	/* If you choose to use a pin other than PB16 it needs to be 3.3V */
	/* If you choose to use a pin other than PB16 it needs to be 3.3V */
	.pin		= AT91_PIN_PB16,
	.pin		= AT91_PIN_PB16,
	.is_open_drain  = 1,
	.is_open_drain  = 1,
	.ext_pullup_enable_pin	= -EINVAL,
};
};


static struct platform_device w1_device = {
static struct platform_device w1_device = {
+1 −0
Original line number Original line Diff line number Diff line
@@ -188,6 +188,7 @@ static struct spi_board_info portuxg20_spi_devices[] = {
static struct w1_gpio_platform_data w1_gpio_pdata = {
static struct w1_gpio_platform_data w1_gpio_pdata = {
	.pin		= AT91_PIN_PA29,
	.pin		= AT91_PIN_PA29,
	.is_open_drain	= 1,
	.is_open_drain	= 1,
	.ext_pullup_enable_pin	= -EINVAL,
};
};


static struct platform_device w1_device = {
static struct platform_device w1_device = {
+1 −0
Original line number Original line Diff line number Diff line
@@ -163,6 +163,7 @@ static struct platform_device vulcan_max6369 = {


static struct w1_gpio_platform_data vulcan_w1_gpio_pdata = {
static struct w1_gpio_platform_data vulcan_w1_gpio_pdata = {
	.pin			= 14,
	.pin			= 14,
	.ext_pullup_enable_pin	= -EINVAL,
};
};


static struct platform_device vulcan_w1_gpio = {
static struct platform_device vulcan_w1_gpio = {
+1 −0
Original line number Original line Diff line number Diff line
@@ -505,6 +505,7 @@ static struct w1_gpio_platform_data w1_gpio_platform_data = {
	.pin			= GPIO_ONE_WIRE,
	.pin			= GPIO_ONE_WIRE,
	.is_open_drain		= 0,
	.is_open_drain		= 0,
	.enable_external_pullup	= w1_enable_external_pullup,
	.enable_external_pullup	= w1_enable_external_pullup,
	.ext_pullup_enable_pin	= -EINVAL,
};
};


struct platform_device raumfeld_w1_gpio_device = {
struct platform_device raumfeld_w1_gpio_device = {