From patchwork Tue Mar 12 19:21:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 2258231 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id CD41E3FCF6 for ; Tue, 12 Mar 2013 19:26:22 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UFUnK-0005xa-CH; Tue, 12 Mar 2013 19:23:31 +0000 Received: from mail-la0-x22d.google.com ([2a00:1450:4010:c03::22d]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UFUnE-0005ue-0U for linux-arm-kernel@lists.infradead.org; Tue, 12 Mar 2013 19:23:24 +0000 Received: by mail-la0-f45.google.com with SMTP id er20so244236lab.18 for ; Tue, 12 Mar 2013 12:23:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=pDkTgyGcb7beqAk+P37EPLMWH02yPa1REulrygCFoLM=; b=Sm/s1A0hqMC+nTNjE2PsVQpqzDlqzmkrCqBEUMCKUjrV1Gddab7So/m+hGxD8anSAi khuy3XWhiD5skFpSEfdP26+wlzQJblQO1MWd10HC4r7y/l8apeOlYv63zpND3sxm4iY5 gSK//QcAkDcksz4L/11Knmz2N2f4p1PIV+t2/Ar480U79VVIAAjMjWMhCT8O/rnP74/s XvcUMHvk4ow2+kaXrRDHVJv3lPUD6wbpSpIVyoZpzJcr1YQ+ZBcXr374LlN5S9ZvlFKc Eu1e9SsCJFoqCBt5lcDfQeONuWXlbwwIbjcdcmTyH6aGsSl7pI1C4feum6tXU7oX7RNR BCwQ== X-Received: by 10.152.110.6 with SMTP id hw6mr15104447lab.43.1363116200235; Tue, 12 Mar 2013 12:23:20 -0700 (PDT) Received: from omicron.terra (c83-179-13-247.cust.tele2.se. [83.179.13.247]) by mx.google.com with ESMTPS id oy10sm9846795lab.8.2013.03.12.12.23.17 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 12 Mar 2013 12:23:18 -0700 (PDT) Received: from johan by omicron.terra with local (Exim 4.80.1) (envelope-from ) id 1UFUmK-0002GK-OY; Tue, 12 Mar 2013 20:22:28 +0100 From: Johan Hovold To: Evgeniy Polyakov Subject: [PATCH] ARM: w1-gpio: fix erroneous gpio requests Date: Tue, 12 Mar 2013 20:21:34 +0100 Message-Id: <1363116094-8630-1-git-send-email-jhovold@gmail.com> X-Mailer: git-send-email 1.8.1.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130312_152324_266942_249AACD5 X-CRM114-Status: GOOD ( 13.51 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (jhovold[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Eric Miao , Greg Kroah-Hartman , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Nicolas Ferre , linux-kernel@vger.kernel.org, Haojian Zhuang , Daniel Mack , stable , Andrew Morton , Imre Kaloz , Jean-Christophe Plagniol-Villard , Johan Hovold , linux-arm-kernel@lists.infradead.org, Krzysztof Halasa X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Fix regression introduced by commit d2323cf773 ("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 Signed-off-by: Johan Hovold Acked-by: Jean-Christophe PLAGNIOL-VILLARD --- Not sure whose tree this should go in through, so adding relevant maintainers and authors as CC. /Johan arch/arm/mach-at91/board-foxg20.c | 1 + arch/arm/mach-at91/board-stamp9g20.c | 1 + arch/arm/mach-ixp4xx/vulcan-setup.c | 1 + arch/arm/mach-pxa/raumfeld.c | 1 + 4 files changed, 4 insertions(+) diff --git a/arch/arm/mach-at91/board-foxg20.c b/arch/arm/mach-at91/board-foxg20.c index 191d37c..1478294 100644 --- a/arch/arm/mach-at91/board-foxg20.c +++ b/arch/arm/mach-at91/board-foxg20.c @@ -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 */ .pin = AT91_PIN_PB16, .is_open_drain = 1, + .ext_pullup_enable_pin = -EINVAL, }; static struct platform_device w1_device = { diff --git a/arch/arm/mach-at91/board-stamp9g20.c b/arch/arm/mach-at91/board-stamp9g20.c index 48a962b..58a6758 100644 --- a/arch/arm/mach-at91/board-stamp9g20.c +++ b/arch/arm/mach-at91/board-stamp9g20.c @@ -188,6 +188,7 @@ static struct spi_board_info portuxg20_spi_devices[] = { static struct w1_gpio_platform_data w1_gpio_pdata = { .pin = AT91_PIN_PA29, .is_open_drain = 1, + .ext_pullup_enable_pin = -EINVAL, }; static struct platform_device w1_device = { diff --git a/arch/arm/mach-ixp4xx/vulcan-setup.c b/arch/arm/mach-ixp4xx/vulcan-setup.c index 2798f43..1dddc1b 100644 --- a/arch/arm/mach-ixp4xx/vulcan-setup.c +++ b/arch/arm/mach-ixp4xx/vulcan-setup.c @@ -163,6 +163,7 @@ static struct platform_device vulcan_max6369 = { static struct w1_gpio_platform_data vulcan_w1_gpio_pdata = { .pin = 14, + .ext_pullup_enable_pin = -EINVAL, }; static struct platform_device vulcan_w1_gpio = { diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c index 25b08bfa..6283fcb 100644 --- a/arch/arm/mach-pxa/raumfeld.c +++ b/arch/arm/mach-pxa/raumfeld.c @@ -505,6 +505,7 @@ static struct w1_gpio_platform_data w1_gpio_platform_data = { .pin = GPIO_ONE_WIRE, .is_open_drain = 0, .enable_external_pullup = w1_enable_external_pullup, + .ext_pullup_enable_pin = -EINVAL, }; struct platform_device raumfeld_w1_gpio_device = {