From patchwork Mon Oct 20 23:27:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 5108561 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 4D3049F30B for ; Mon, 20 Oct 2014 23:31:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8B28320107 for ; Mon, 20 Oct 2014 23:31:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EC7DA20108 for ; Mon, 20 Oct 2014 23:31:35 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XgMNR-0002I1-W6; Mon, 20 Oct 2014 23:28:37 +0000 Received: from mail-pd0-x22d.google.com ([2607:f8b0:400e:c02::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XgMNM-0002EO-MM for linux-arm-kernel@lists.infradead.org; Mon, 20 Oct 2014 23:28:33 +0000 Received: by mail-pd0-f173.google.com with SMTP id g10so84905pdj.4 for ; Mon, 20 Oct 2014 16:28:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=fwg9odEtKz9GRYeP07nR+u91JGMFEw46VxKxwi6u2iQ=; b=BqdpmPe9LvMuSeI/zpwREN89SGLIeWKIESbCWa/CKcBub4XzhuOu0V5mf5jF22+sZP EufBcK7jkaw3O5XqKj5zy4k6UgGuhiQLBl2kYlEQFFvA0wVsugMCRohpDimlD4TvA1bI /MtTgPSO6AafbVB9d1WYtq/cYAWKGDRsTDTjM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=fwg9odEtKz9GRYeP07nR+u91JGMFEw46VxKxwi6u2iQ=; b=Fk5PKcQ9eBxv2HtZgG73wqiiC2keKSFrxXzwKwtXNlwsVkYoFo6GoDvjlsjKCtFEv9 gLWHSPZeXYQKx2L1iq0Ay6gDYC7C9M3o+z8HkSWoqq+7lG8mDuAOP4QVsyJjoxKPbD6P yw18Xrra3UI/Gs5B8ObZtWb3Zne4+mhI3XEsXBfRobcIoeEYXxvEKgYarK/tbXxOrNDE gpAaUjQax+A0yJXza2EthUXS6Ca1IVQFN6FO0itxdAAhZv/z4wlSObi1EyrKh6MT2fMC 3CgvpQ/Ntc669wDqcKTkLunupDvWHEPd/303jlyKXZNT6O3f0kNDeis7yy7Kj+wbZIbB iClA== X-Gm-Message-State: ALoCoQnzNI8QhRd5aAU/YtUgvV9tCRKVfP9rb+1VUjnLRbjUbtfnM3Idm+0+jE6yOnkeatwa2ZQS X-Received: by 10.70.131.199 with SMTP id oo7mr98880pdb.163.1413847688934; Mon, 20 Oct 2014 16:28:08 -0700 (PDT) Received: from tictac.mtv.corp.google.com ([172.22.162.15]) by mx.google.com with ESMTPSA id tc5sm10080198pbc.51.2014.10.20.16.28.07 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 20 Oct 2014 16:28:08 -0700 (PDT) From: Doug Anderson To: Linus Walleij , Heiko Stuebner Subject: [PATCH 1/4] pinctrl: rockchip: Set wake_enabled Date: Mon, 20 Oct 2014 16:27:47 -0700 Message-Id: <1413847670-12245-1-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.1.0.rc2.206.gedb03e5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141020_162832_781308_042E5228 X-CRM114-Status: GOOD ( 10.17 ) X-Spam-Score: -0.8 (/) Cc: Doug Anderson , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Chris Zhong , Sonny Rao , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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 X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 The rockchip pinctrl driver uses irq_gc_set_wake() but doesn't setup the .wake_enabled member. That means that we can never actually use a pin for wakeup. When "irq_set_irq_wake()" tries to call through it will always get a failure from set_irq_wake_real() and will then set wake_depth to 0. Assuming you can resume you'll later get an error message about "Unbalanced IRQ x wake disable". Signed-off-by: Doug Anderson Tested-by: Chris Zhong --- drivers/pinctrl/pinctrl-rockchip.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c index 016f457..230d8f3 100644 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c @@ -1563,6 +1563,7 @@ static int rockchip_interrupts_register(struct platform_device *pdev, gc->chip_types[0].chip.irq_unmask = irq_gc_mask_set_bit; gc->chip_types[0].chip.irq_set_wake = irq_gc_set_wake; gc->chip_types[0].chip.irq_set_type = rockchip_irq_set_type; + gc->wake_enabled = IRQ_MSK(bank->nr_pins); irq_set_handler_data(bank->irq, bank); irq_set_chained_handler(bank->irq, rockchip_irq_demux);