From patchwork Mon Sep 21 15:46:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 520353 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-pa0-x23e.google.com (mail-pa0-x23e.google.com [IPv6:2607:f8b0:400e:c03::23e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 00AB91401AF for ; Tue, 22 Sep 2015 01:48:09 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b=iqyU45zc; dkim-atps=neutral Received: by pabve7 with SMTP id ve7sf18635323pab.1 for ; Mon, 21 Sep 2015 08:48:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :reply-to:content-type:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe; bh=v1gVLG+uOSg2aogfLPzAzXip9mJuCxUpJ6kjcnaeXCI=; b=iqyU45zc68mLSxZvqPSCcJ9/bl0orm5oNx3NxQtztTuovGO7AyeJmuz3iEBnwL4KL3 blmFrJjWpNA467IBoU6hXyL0FBBUMffBRIhe3/PEwcLV1c+UdoSchhs/hf1qNxMS2DjE 8xwaUlPiS2mQM9wkKpVAgmfKkOyGC4TSDreJIju4glI0/yl6RM5/4PN3wIlfAw/irib4 0ojj2nVlrPmzhzz8xcJPoX3DmrY1iua0jz5xEz/uLov7wmJWHQUIBBemI20sr2ybUkfo rWxh4G21PbgUtSiJ17mBDeqJ8V7i1iQB/Q263LZZF+LYftFvOWbvtQU9qgnD4B+BIhja fLow== X-Received: by 10.182.120.106 with SMTP id lb10mr84276obb.19.1442850486458; Mon, 21 Sep 2015 08:48:06 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.182.209.40 with SMTP id mj8ls903337obc.20.gmail; Mon, 21 Sep 2015 08:48:06 -0700 (PDT) X-Received: by 10.182.24.71 with SMTP id s7mr17563330obf.42.1442850486231; Mon, 21 Sep 2015 08:48:06 -0700 (PDT) Received: from foss.arm.com (foss.arm.com. [217.140.101.70]) by gmr-mx.google.com with ESMTP id el2si2078074pbb.0.2015.09.21.08.48.06 for ; Mon, 21 Sep 2015 08:48:06 -0700 (PDT) Received-SPF: pass (google.com: domain of sudeep.holla@arm.com designates 217.140.101.70 as permitted sender) client-ip=217.140.101.70; Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5B960524; Mon, 21 Sep 2015 08:48:10 -0700 (PDT) Received: from e103737-lin.cambridge.arm.com (e103737-lin.cambridge.arm.com [10.1.207.150]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 70E1B3F2E5; Mon, 21 Sep 2015 08:48:04 -0700 (PDT) From: Sudeep Holla To: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Sudeep Holla , Thomas Gleixner , "Rafael J. Wysocki" , Linus Walleij , Alessandro Zummo , Alexandre Belloni , rtc-linux@googlegroups.com Subject: [rtc-linux] [PATCH 02/17] rtc: ab8500: remove misuse of IRQF_NO_SUSPEND flag Date: Mon, 21 Sep 2015 16:46:58 +0100 Message-Id: <1442850433-5903-3-git-send-email-sudeep.holla@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442850433-5903-1-git-send-email-sudeep.holla@arm.com> References: <1442850433-5903-1-git-send-email-sudeep.holla@arm.com> X-Original-Sender: sudeep.holla@arm.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of sudeep.holla@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=sudeep.holla@arm.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: rtc-linux@googlegroups.com X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , The IRQF_NO_SUSPEND flag is used to identify the interrupts that should be left enabled so as to allow them to work as expected during the suspend-resume cycle, but doesn't guarantee that it will wake the system from a suspended state, enable_irq_wake is recommended to be used for the wakeup. This patch removes the use of IRQF_NO_SUSPEND flags and uses newly introduce PM wakeup APIs dev_pm_{set,clear}_wake_irq. Cc: Linus Walleij Cc: Alessandro Zummo Cc: Alexandre Belloni Cc: rtc-linux@googlegroups.com Signed-off-by: Sudeep Holla Acked-by: Linus Walleij --- drivers/rtc/rtc-ab8500.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-ab8500.c b/drivers/rtc/rtc-ab8500.c index 51407c4c7bd2..24a0af650a1b 100644 --- a/drivers/rtc/rtc-ab8500.c +++ b/drivers/rtc/rtc-ab8500.c @@ -18,6 +18,7 @@ #include #include #include +#include #define AB8500_RTC_SOFF_STAT_REG 0x00 #define AB8500_RTC_CC_CONF_REG 0x01 @@ -493,11 +494,12 @@ static int ab8500_rtc_probe(struct platform_device *pdev) } err = devm_request_threaded_irq(&pdev->dev, irq, NULL, - rtc_alarm_handler, IRQF_NO_SUSPEND | IRQF_ONESHOT, + rtc_alarm_handler, IRQF_ONESHOT, "ab8500-rtc", rtc); if (err < 0) return err; + dev_pm_set_wake_irq(&pdev->dev, irq); platform_set_drvdata(pdev, rtc); err = ab8500_sysfs_rtc_register(&pdev->dev); @@ -513,6 +515,8 @@ static int ab8500_rtc_probe(struct platform_device *pdev) static int ab8500_rtc_remove(struct platform_device *pdev) { + dev_pm_clear_wake_irq(&pdev->dev); + device_init_wakeup(&pdev->dev, false); ab8500_sysfs_rtc_unregister(&pdev->dev); return 0;