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: 5108501 Return-Path: X-Original-To: patchwork-linux-rockchip@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 8CAB0C11AC for ; Mon, 20 Oct 2014 23:28:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A778620154 for ; Mon, 20 Oct 2014 23:28:36 +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 AA6A0201ED for ; Mon, 20 Oct 2014 23:28: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 1XgMNO-0002Hg-AS; Mon, 20 Oct 2014 23:28:34 +0000 Received: from mail-pd0-x22c.google.com ([2607:f8b0:400e:c02::22c]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XgMNM-0002EP-MX for linux-rockchip@lists.infradead.org; Mon, 20 Oct 2014 23:28:33 +0000 Received: by mail-pd0-f172.google.com with SMTP id ft15so76515pdb.17 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=IqQqw7Sr6FUVIq6iFC3/waEeMkebVjpZkrQmnRni9miniJSQKutmgPwXeWgYW3DhcR sV387ofK5bNotpwPexlTz8DQBI7HVexmgjlSDCxJjbTZM8Gn6iLizGxVCnRSfBXpOMAZ 6YnNj+Bf49UPmEYjyeh8P5PPi0Cm4aJSGSlJQMRPZqybkk/1oEPy/dnxzxPWZ8XVP3DN 1uUBXsi9Ap5z56kM5lXR1DfxykJPWCZk/Qrs3hBG00z6nzoenzIwqQnfVqqCWqSJl2cE MpreUeelDttuSQwYPlNCCzJ+8ln88caUCPEyoubH51l1h+04kAfu1kRcXkiX3PnGRAcs Lvgg== X-Gm-Message-State: ALoCoQn5pOQQqN20Y3sIpmA5adOk8yOn4JfZ04mHmCsTLfVgy6MLH0zagDROwPnKxaZEODxV63ay 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_789506_CB4566D5 X-CRM114-Status: UNSURE ( 8.43 ) X-CRM114-Notice: Please train this message. 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-rockchip@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=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);