From patchwork Thu Nov 14 08:45:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 3181211 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 329C99F3A0 for ; Thu, 14 Nov 2013 08:46:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 99EBA2096E for ; Thu, 14 Nov 2013 08:45:55 +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 674C72096D for ; Thu, 14 Nov 2013 08:45:54 +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 1VgsYg-0003Tg-IZ; Thu, 14 Nov 2013 08:45:50 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VgsYe-0001YI-67; Thu, 14 Nov 2013 08:45:48 +0000 Received: from mail-la0-x22b.google.com ([2a00:1450:4010:c03::22b]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VgsYb-0001XS-1L for linux-arm-kernel@lists.infradead.org; Thu, 14 Nov 2013 08:45:45 +0000 Received: by mail-la0-f43.google.com with SMTP id n7so1291135lam.16 for ; Thu, 14 Nov 2013 00:45:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=A+h6hNLRK8rWMfObFwt0WR66qhK+dpql/OigpTVwvpI=; b=g2oqTzZWMRuPknPO9LQ3ZBivK1rkYBm6No+sdTtKtUIJ3+AdRss8h8/ubIXUmsZQH5 JlcCithFOR787LEfSv/7gx3jHM8osSM16X6Jld+V/VxR4u6M+8ANYWRX0uiL8n9b8ody 0s+ASQ4I/Iu0KQ9fCLt3mBZ/0tsftIhVgA0n6xiUqSUu4AQMjIwhduMnFjLJBkYsrekI rtk3TiTcaTZ3H+zEy8pUfTC//jQ1rG774xuSSSGz8LbzmWeNFy8Tq3byPs72KezgMiky /+oj9RpsLz+4X3bW8/9ud9cTmMjUG8f8zClIHEm2pEgQsbnRAg1r5YEf/zYzMhvARxsv lzQg== MIME-Version: 1.0 X-Received: by 10.152.170.199 with SMTP id ao7mr175105lac.40.1384418722718; Thu, 14 Nov 2013 00:45:22 -0800 (PST) Received: by 10.114.4.115 with HTTP; Thu, 14 Nov 2013 00:45:22 -0800 (PST) In-Reply-To: <20131114062735.GF22870@verge.net.au> References: <20131113230345.21482.36997.sendpatchset@w520> <20131114052204.GD22870@verge.net.au> <20131114062735.GF22870@verge.net.au> Date: Thu, 14 Nov 2013 17:45:22 +0900 Message-ID: Subject: Re: [PATCH] ARM: shmobile: Enable DSW2 with gpio-keys on KZM9D From: Magnus Damm To: Simon Horman X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131114_034545_277419_8E347E00 X-CRM114-Status: GOOD ( 19.16 ) X-Spam-Score: -2.0 (--) Cc: "linux-arm-kernel@lists.infradead.org" , SH-Linux 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-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Simon, On Thu, Nov 14, 2013 at 3:27 PM, Simon Horman wrote: > On Thu, Nov 14, 2013 at 02:22:06PM +0900, Simon Horman wrote: >> On Thu, Nov 14, 2013 at 08:03:45AM +0900, Magnus Damm wrote: >> > From: Magnus Damm >> > >> > Use the gpio-keys driver to support the 4 pins on the >> > dip switch DSW2 which is mounted on the KZM9D board. >> > >> > Signed-off-by: Magnus Damm >> >> Hi Magnus, >> >> I have tried enabling the following on a config produced >> using the kzm9d_defconfig: >> >> CONFIG_INPUT_KEYBOARD >> CONFIG_INPUT_EVDEV >> CONFIG_KEYBOARD_GPIO >> >> But all I see so far in dmsg is: >> >> # dmesg | grep gpio >> platform gpio_keys.3: Driver gpio-keys requests probe deferral >> >> I was expecting something more along the lines of: >> input: gpio-keys as /devices/platform/gpio-keys/input/input0 >> >> Could you give me some guidance on how to test this? > > I now notice that I also need > "[PATCH 00/03] gpio: R-Car and EM GPIO update" > > But with that applied I now see: > > # dmesg | grep gpio > gpio-keys gpio_keys.3: Failed to request GPIO 14, error -517 > platform gpio_keys.3: Driver gpio-keys requests probe deferral Thanks for testing. In case of EMEV2 we don't have any PFC support, so because of that you probably need to deselect PINCTRL. The patch below does the trick, but for proper operation you probably have to split this up per-SoC. And these days KZM9D is MULTIPLATFORM only where PINCTRL probably wants to be set as a global default, so I suppose the proper way to support this is to add PFC support for EMEV2. Another option would be to make these two cases behave the same: - PINCTRL=y but no pinctrl support for the SoC - PINCTRL=n Cheers, / magnus --- 0001/arch/arm/Kconfig +++ work/arch/arm/Kconfig 2013-11-14 17:42:36.000000000 +0900 @@ -655,7 +655,7 @@ config ARCH_SHMOBILE select MIGHT_HAVE_CACHE_L2X0 select MULTI_IRQ_HANDLER select NO_IOPORT - select PINCTRL +# select PINCTRL select PM_GENERIC_DOMAINS if PM select SPARSE_IRQ help