From patchwork Sun Sep 29 18:36:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Ebalard X-Patchwork-Id: 2960451 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 28FF6BFF0B for ; Sun, 29 Sep 2013 18:37:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 36146201ED for ; Sun, 29 Sep 2013 18:37:39 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B2D1D201E9 for ; Sun, 29 Sep 2013 18:37:37 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VQLs2-0007Qy-1v; Sun, 29 Sep 2013 18:37:30 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VQLry-00008Z-Kx; Sun, 29 Sep 2013 18:37:26 +0000 Received: from mic92-1-81-57-185-249.fbx.proxad.net ([81.57.185.249] helo=smtp.natisbad.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VQLrv-00007G-ND for linux-arm-kernel@lists.infradead.org; Sun, 29 Sep 2013 18:37:24 +0000 Received: by smtp.natisbad.org (Postfix, from userid 5001) id 9B6862C0766; Sun, 29 Sep 2013 20:36:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1380479807; bh=UX7hfAv1LAZkha5anN5gfH0I7vUBba58IcsUL821iD0=; h=From:To:Cc:Subject:Date; b=vV1bic6EUvUK9Zxl0EUyEjuC84C7t6Wyou760AFJxmTUGRxTFHjT1Ou+jsMvzKurX 8HMN2ML7U96zxoIiOm5f38lUnaua2ttsKnOdZmKm3nYlRk8KYMtqYC+dudw01UgUtM TNmxftsvJd76STSV5veZRuFUYCJFK7/AY3241amU= X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from small (localhost [127.0.0.1]) by smtp.natisbad.org (Postfix) with ESMTP id 95C8E2C0167; Sun, 29 Sep 2013 20:36:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1380479802; bh=UX7hfAv1LAZkha5anN5gfH0I7vUBba58IcsUL821iD0=; h=From:To:Cc:Subject:Date; b=ESLpWtKQGoX6HxJuK9DjFKc/ZXbtKwA89aDqIMLWpd7chfrobme1lEy9L40L1ssbC Bz92Q33IO85TpigVl+CGjO88WwJB0BRV/YdWnKY7a11k45yo2LmuSuZuhWXXrW4+tQ +62kA543riT6EaKsYQqaSVLhmIGNuEwyidQ3J/XQ= X-Hashcash: 1:20:130929:jason@lakedaemon.net::q+imFlmbITmqGDH5:000000000000000000000000000000000000000007I/Y X-Hashcash: 1:20:130929:andrew@lunn.ch::mia+JUVgaGcsJDOy:0007B21 X-Hashcash: 1:20:130929:linux-arm-kernel@lists.infradead.org::foq5cj7OQIK8cFiQ:00000000000000000000000001qWX X-Hashcash: 1:20:130929:linux@arm.linux.org.uk::2lpwFvV/l8DwdoUs:0000000000000000000000000000000000000006jJb From: arno@natisbad.org (Arnaud Ebalard) To: Jason Cooper , Andrew Lunn Subject: [PATCH, FIX] ARM: mvebu: fix ReadyNAS 102 Power button GPIO to make it active high X-PGP-Key-URL: http://natisbad.org/arno@natisbad.org.asc X-Fingerprint: D3A5 B68A 839B 38A5 815A 781B B77C 0748 A7AE 341B Date: Sun, 29 Sep 2013 20:36:41 +0200 Message-ID: <87ob7bh3uu.fsf@natisbad.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130929_143723_926526_C670FB2F X-CRM114-Status: GOOD ( 13.52 ) X-Spam-Score: -1.0 (-) Cc: Russell King - ARM Linux , Linux ARM Kernel Mailing List 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP NETGEAR ReadyNAS 102 Power button definition in .dts file flags associated GPIO active low instead of active high. This results in reversed events reported by input subsystem (0 returned when the button is pressed, 1 when released). This patch makes associated GPIO active high to recover correct behaviour. Signed-off-by: Arnaud Ebalard --- RN102 .dts file sits in Linus tree only since 3.12-rc1 so I guess no one has currently relied on current reversed behaviour, i.e. this can be fixed w/o impact on any userspace program. As a side note, the initial error is mine. arch/arm/boot/dts/armada-370-netgear-rn102.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/armada-370-netgear-rn102.dts b/arch/arm/boot/dts/armada-370-netgear-rn102.dts index 05e4485..396949d 100644 --- a/arch/arm/boot/dts/armada-370-netgear-rn102.dts +++ b/arch/arm/boot/dts/armada-370-netgear-rn102.dts @@ -160,7 +160,7 @@ button@1 { label = "Power Button"; linux,code = <116>; /* KEY_POWER */ - gpios = <&gpio1 30 1>; + gpios = <&gpio1 30 0>; }; button@2 {