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: 53969 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by patches.linaro.org (Postfix) with ESMTPS id 2866B22B04 for ; Mon, 21 Sep 2015 15:48:27 +0000 (UTC) Received: by wicgb1 with SMTP id gb1sf32778317wic.3 for ; Mon, 21 Sep 2015 08:48:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=SQ5seU4PuVqiSTa+NVa0N4m2asi1Cg5/S/9egfGk2jw=; b=V0DKHFGyNhtkRRq43zJyDp9ZO0q3E2Wm6gW4x73WXk7XSI19T8zvBxsT/cm7bb5gx7 +Dd/JK9lnk5Fdu642Hvj73xkfkkfT+bCBCbBmQ2FKTTbz8+5F9bcU07BP6ore0LPd8fU muxCvEkKBdQqusO1kAPE9B6kYJZxwBJ4CTViW9unmOm7etXTM3x5+ekPX8LiJ/RM950B wQY9MIHwoCfaEvDWgI8TfYtbHuyVzyB8aI6K5Y0rOq2OZYwQctH3LGn1uDl622YDYpwN flBHyqSccm/ne9c6oaA6tYurVnfMQTa5haUA/Hs8c0rXPQhQppv0PHciR6eQkZEZ8D6R 4S1w== X-Gm-Message-State: ALoCoQlZJTjlbYoJQDQJ+ZcCt/2UothzSkKVpWv8QTKIZ7ajEZxFOatrTpjDSSnG5ckBshRlmjVf X-Received: by 10.112.140.195 with SMTP id ri3mr3453041lbb.22.1442850506407; Mon, 21 Sep 2015 08:48:26 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.130 with SMTP id m2ls207237laf.1.gmail; Mon, 21 Sep 2015 08:48:26 -0700 (PDT) X-Received: by 10.152.181.36 with SMTP id dt4mr7890269lac.52.1442850506240; Mon, 21 Sep 2015 08:48:26 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id ez3si16422289lbc.92.2015.09.21.08.48.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Sep 2015 08:48:26 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by lanb10 with SMTP id b10so70258622lan.3 for ; Mon, 21 Sep 2015 08:48:26 -0700 (PDT) X-Received: by 10.25.207.82 with SMTP id f79mr1554552lfg.73.1442850506087; Mon, 21 Sep 2015 08:48:26 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1784180lbq; Mon, 21 Sep 2015 08:48:24 -0700 (PDT) X-Received: by 10.68.242.130 with SMTP id wq2mr25020348pbc.117.1442850504220; Mon, 21 Sep 2015 08:48:24 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dd6si38668670pad.84.2015.09.21.08.48.23; Mon, 21 Sep 2015 08:48:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932618AbbIUPsJ (ORCPT + 30 others); Mon, 21 Sep 2015 11:48:09 -0400 Received: from foss.arm.com ([217.140.101.70]:53986 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932476AbbIUPsG (ORCPT ); Mon, 21 Sep 2015 11:48:06 -0400 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: [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> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sudeep.holla@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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;