From patchwork Tue Oct 21 17:47:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 5127261 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 89543C11AC for ; Tue, 21 Oct 2014 17:53:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B12B120225 for ; Tue, 21 Oct 2014 17:53:24 +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 B47B32021F for ; Tue, 21 Oct 2014 17:53:23 +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 1XgdcY-0002UA-Bb; Tue, 21 Oct 2014 17:53:22 +0000 Received: from mail-pd0-x231.google.com ([2607:f8b0:400e:c02::231]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XgdXR-0004TI-4X for linux-rockchip@lists.infradead.org; Tue, 21 Oct 2014 17:48:06 +0000 Received: by mail-pd0-f177.google.com with SMTP id v10so1773024pde.36 for ; Tue, 21 Oct 2014 10:47:44 -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=aGh8HPHE3o985wJg1+KcvwPR4xJzwbg668sLi5iwcmo=; b=VWN3Dd6h8cHlV+rkIHk9wEatzmN+BS0HS/Cj9iTpnNVLKR3HIkWqesJPTQEdcft/jY Z78FpBlsBwdkdEkstD6e0LUUlvcjMy/9dgLziWO65u40mik/C0+xxeWG5VMtbJPjJ1yP X8k5GxKVK1TSWyDbF7Fsi/BS+MxNmVeJ1g8+4= 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=aGh8HPHE3o985wJg1+KcvwPR4xJzwbg668sLi5iwcmo=; b=LXTnnpqqsccEPZ7CiEN3MGoXQQNuN/yDO7+O6oezxwgG9ZygartD8EY9619OZirQay plwdm/QRO6JJ1CIoN/q2m7O7DfFsZ/ZhXbG0k0qnBVs9HB5gc9m6S+I/LclQPuDLuri7 aPoL2byRaVnPXq6L2PNrKqooVvrI0LmhgfpwxU+XW7WpskxWHiuqJP5WtLYazkfdAgcG STsJzluWDoRqXuqW9/ajq6SKUUUG5dtFd7+OCr1WxQKog02qOJXAIPghtBmFPfS4Qm0F rUFLCy4njfPUneY4Y1vfD5g9ZsjtluKtvfzgF3cs+e9BqIG1to6P2HZwdACax/9kaWos io0A== X-Gm-Message-State: ALoCoQkDy02PPy0D9H11LigHPVgYzpSckMPAGHxI81Q/WNOgvCtfcPpFi0Z3eTEXGCSy/zwGtKhe X-Received: by 10.70.43.46 with SMTP id t14mr36674884pdl.57.1413913663917; Tue, 21 Oct 2014 10:47:43 -0700 (PDT) Received: from tictac.mtv.corp.google.com ([172.22.162.15]) by mx.google.com with ESMTPSA id ky4sm12336911pbc.55.2014.10.21.10.47.42 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Oct 2014 10:47:42 -0700 (PDT) From: Doug Anderson To: Linus Walleij , Heiko Stuebner Subject: [PATCH v2 1/4] pinctrl: rockchip: Set wake_enabled Date: Tue, 21 Oct 2014 10:47:32 -0700 Message-Id: <1413913655-22351-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-20141021_104805_209883_494313B2 X-CRM114-Status: UNSURE ( 7.96 ) 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 Reviewed-by: Heiko Stuebner --- Changes in v2: None 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);