From patchwork Tue Apr 21 15:01:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 6249571 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9E9AF9F313 for ; Tue, 21 Apr 2015 15:00:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B7F052012B for ; Tue, 21 Apr 2015 15:00:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EE79820125 for ; Tue, 21 Apr 2015 15:00:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755348AbbDUPAR (ORCPT ); Tue, 21 Apr 2015 11:00:17 -0400 Received: from mail-pd0-f181.google.com ([209.85.192.181]:36625 "EHLO mail-pd0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752431AbbDUPAN (ORCPT ); Tue, 21 Apr 2015 11:00:13 -0400 Received: by pdea3 with SMTP id a3so244356893pde.3; Tue, 21 Apr 2015 08:00:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=78iK3aS0B4nVK+0ve5OH3yTHuK0OXKM1/bA4XiyAt5U=; b=V8MLzn6VFe+zbCO9EMenb8lR2PJXQlzzJIzGu7PqscRlMEBY+YahCZWXa3W9alzCMs G3N4Mlhfy+0HCRYcxLxeMuGqP3ZNyJp5i3DBde72axxYVQfmU9I+MOSh7fROC4IdtLek N6beYEysyv3tqNu0Dtv/wKZtwPLUcCfdl61X/iNtNHxtmztKR8fEwtWWRDBLoK6oq6Tb 1njqWAy4UTox9eI+AQNyOis9gY4ZLda1ghmsWhOKWW3PnxB54Yo18PYS1prMvqgPXYET VEEq4SUG8dCmb43y4Vx325u0TluyF032v0K83bB4n/hei1Gl5USA7WGMWbjOpxlsDHt1 16Fg== X-Received: by 10.70.136.67 with SMTP id py3mr38337844pdb.112.1429628412804; Tue, 21 Apr 2015 08:00:12 -0700 (PDT) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by mx.google.com with ESMTPSA id vl9sm2281638pbc.73.2015.04.21.08.00.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Apr 2015 08:00:11 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: jason@lakedaemon.net, geert+renesas@glider.be, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, horms@verge.net.au, Magnus Damm , tglx@linutronix.de Date: Wed, 22 Apr 2015 00:01:48 +0900 Message-Id: <20150421150148.14288.86804.sendpatchset@little-apple> In-Reply-To: <20150421150115.14288.88519.sendpatchset@little-apple> References: <20150421150115.14288.88519.sendpatchset@little-apple> Subject: [PATCH/RFC 03/03] irqchip: renesas-irqc: Rely on Runtime PM for wakeup Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 From: Magnus Damm Get rid of the clock control code and rely on Runtime PM for wakeup handling. This more or less reverts the earlier commit "irqchip: renesas-irqc: Add wake-up support" however to work ->irq_enable() and ->irq_disable() need to manage Runtime PM state. Signed-off-by: Magnus Damm --- Needs testing before applying. drivers/irqchip/irq-renesas-irqc.c | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0003/drivers/irqchip/irq-renesas-irqc.c +++ work/drivers/irqchip/irq-renesas-irqc.c 2015-04-21 23:25:06.106368239 +0900 @@ -17,7 +17,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include #include #include #include @@ -67,7 +66,6 @@ struct irqc_priv { struct platform_device *pdev; struct irq_chip irq_chip; struct irq_domain *irq_domain; - struct clk *clk; }; static void irqc_dbg(struct irqc_irq *i, char *str) @@ -139,21 +137,6 @@ static int irqc_irq_set_type(struct irq_ return 0; } -static int irqc_irq_set_wake(struct irq_data *d, unsigned int on) -{ - struct irqc_priv *p = irq_data_get_irq_chip_data(d); - - if (!p->clk) - return 0; - - if (on) - clk_enable(p->clk); - else - clk_disable(p->clk); - - return 0; -} - static irqreturn_t irqc_irq_handler(int irq, void *dev_id) { struct irqc_irq *i = dev_id; @@ -216,12 +199,6 @@ static int irqc_probe(struct platform_de p->pdev = pdev; platform_set_drvdata(pdev, p); - p->clk = devm_clk_get(&pdev->dev, NULL); - if (IS_ERR(p->clk)) { - dev_warn(&pdev->dev, "unable to get clock\n"); - p->clk = NULL; - } - pm_runtime_enable(&pdev->dev); /* get hold of manadatory IOMEM */ @@ -266,8 +243,7 @@ static int irqc_probe(struct platform_de irq_chip->irq_mask = irqc_irq_mask; irq_chip->irq_unmask = irqc_irq_unmask; irq_chip->irq_set_type = irqc_irq_set_type; - irq_chip->irq_set_wake = irqc_irq_set_wake; - irq_chip->flags = IRQCHIP_MASK_ON_SUSPEND; + irq_chip->flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MASK_ON_SUSPEND; p->irq_domain = irq_domain_add_simple(pdev->dev.of_node, p->number_of_irqs,