From patchwork Fri Mar 29 04:13:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Press X-Patchwork-Id: 2364061 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id BA6AADFB79 for ; Fri, 29 Mar 2013 04:17:00 +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 1ULQhR-0005yk-C1; Fri, 29 Mar 2013 04:13:57 +0000 Received: from mail-ee0-f42.google.com ([74.125.83.42]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ULQhO-0005yR-5w for linux-arm-kernel@lists.infradead.org; Fri, 29 Mar 2013 04:13:55 +0000 Received: by mail-ee0-f42.google.com with SMTP id b47so65975eek.29 for ; Thu, 28 Mar 2013 21:13:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:x-originating-ip:in-reply-to:references :date:message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=GczHCRiEL2p03WUEUDS99iuLaqJf0YgvC25vXx77B1A=; b=BDnH38ZQR4mJSul0GHLTRMqqF7D+/ceRJOofa6IUIJOS41YVXq6yLJASzvHZR2+aKC NOcD03gSy1qAdVTeLfvWz3zzhqqKprMwZsB7xIb07LieoISTwdyptPYL3x+lBM7QzAk9 tkZ6Vhtb9ID/sp/DH5wsVB9R32dNFxfNtQKWLjxYSLqZp/OomSxLLCYuSdh/1Viy0VaO D4F3thzetshC5jHl5jw78HPEv2lD7AmYYchaSvdF8wkA9zhhr5SMbsaSSvkVsONBx7cW NWnBTj/g8LkdPClUIgEIfcjXtFFzIEygWQo8nYoTS0QQgrRGgK8PqxhLb43zlw755uoq FTuQ== MIME-Version: 1.0 X-Received: by 10.15.23.193 with SMTP id h41mr3424977eeu.17.1364530429030; Thu, 28 Mar 2013 21:13:49 -0700 (PDT) Received: by 10.223.161.9 with HTTP; Thu, 28 Mar 2013 21:13:48 -0700 (PDT) X-Originating-IP: [108.230.157.199] In-Reply-To: <20130328033807.GA12212@localhost> References: <20130328033807.GA12212@localhost> Date: Thu, 28 Mar 2013 21:13:48 -0700 Message-ID: Subject: Re: [PATCH] ARM: mvebu: Add gpio button to Mirabox board From: Ryan Press To: Ezequiel Garcia X-Gm-Message-State: ALoCoQmxPOrIGiVMPgzuj92MUWIWYjcwMOEdmwSF72dG0cnEWkPWL9qVVmYhBXsrb8lyJyYe8Hdv X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130329_001354_453739_3CF87B0D X-CRM114-Status: GOOD ( 16.63 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.83.42 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-arm-kernel@lists.infradead.org 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 Hi Ezequiel, On Wed, Mar 27, 2013 at 8:38 PM, Ezequiel Garcia wrote: > On Wed, Mar 27, 2013 at 05:42:36PM -0700, Ryan Press wrote: >> Ezequiel Garcia wrote: >> > >> >The Globalscale Mirabox board has a little gpio button >> >placed just above the SD card slot; the board user guide labels >> >this button as "System reset button". >> > >> >This patch adds support for this button in the device tree file. >> I was not able to get this to work, I think there is >> some IRQ problem. I was able to get it to work with >> "gpio-keys-polled" however. >> > > Could you explain what you did and what was your problem? Just to be on the same page, I pulled the latest 3-9-rc4, with no other changes, and then added your patch. Does this rely on a patch? No interrupt events are shown in /proc/interrupts. I have a lot more things running than your box, maybe there is a conflict. #cat /proc/interrupts CPU0 16: 12222 armada_370_xp_irq armada_370_xp_per_cpu_tick 17: 552 armada_370_xp_irq serial 25: 0 armada_370_xp_irq d0010300.rtc 27: 6438 armada_370_xp_irq ehci_hcd:usb1 28: 0 armada_370_xp_irq ehci_hcd:usb2 95: 0 d0018140.gpio Reset Button 104: 2 armada_370_xp_irq d0060800.xor 105: 2 armada_370_xp_irq d0060800.xor 106: 2 armada_370_xp_irq d0060900.xor 107: 2 armada_370_xp_irq d0060900.xor IPI0: 0 CPU wakeup interrupts IPI1: 0 Timer broadcast interrupts IPI2: 0 Rescheduling interrupts IPI3: 0 Function call interrupts IPI4: 0 Single function call interrupts IPI5: 0 CPU stop interrupts Err: 0 Here is my kernel config: http://pastebin.com/rFQSUAPs Maybe you can send me your config and I will try it. Oh and although I guess the bootloader sets it up, i wouldn't trust it. There should probably be the pinctrl in the device tree, yes? Thanks, Ryan diff --git a/arch/arm/boot/dts/armada-370-mirabox.dts b/arch/arm/boot/dts/armada-370-mirabox.dts index dd0c57d..f083f56 100644 --- a/arch/arm/boot/dts/armada-370-mirabox.dts +++ b/arch/arm/boot/dts/armada-370-mirabox.dts @@ -33,6 +33,14 @@ clock-frequency = <600000000>; status = "okay"; }; + + pinctrl { + reset_button_pin: reset-button-pin { + marvell,pins = "mpp58"; + marvell,function = "gpio"; + }; + } + gpio-keys { compatible = "gpio-keys"; #address-cells = <1>;