From patchwork Mon Apr 27 18:24:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Grygorii.Strashko@linaro.org" X-Patchwork-Id: 47642 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AB7272121F for ; Mon, 27 Apr 2015 18:26:16 +0000 (UTC) Received: by wizk4 with SMTP id k4sf240823wiz.2 for ; Mon, 27 Apr 2015 11:26:16 -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=1dHbzX3IvubM2XLVTwp9RhmKiSA/mBp1iTVWivlrTwk=; b=aNmrLmcRkTA6usfcXm+ckr6zQjMc5UHPPOKDvf+CRKKQSh+KZ2MDRzgpKCnqPIjAw4 cR220MxsO5ypiWFGfE3m05qoVDVPcVZtQ1PUupxBcTtaYxO1YM/gS7Oal+UgFEMRuG8n IHlwt7tIFdH+RHmhsupUFz4W3AFqYgERhRnT7Bdwqn+EspTewY4oePr3bkcKyTwFAjhW IlASKr/f7MGHJACqqCfl3xBC7zMj+pzJdBQr7sgPVQ/pU35FRWZVX2H9/G2E+qzm8IrC pMkFe8TsI7vPc9xfc0tGMCW+O15Scr55Uf2cpLdBwfdHZz2hI0lmodAyWk0/gc4dRfSE 4HCg== X-Gm-Message-State: ALoCoQkG4obysHhSZ0xJSArGIrgs8kR1emwCXu2+aAjFvXheRTTE6opY+zlvdL6Qydio9ksKUQwR X-Received: by 10.180.10.136 with SMTP id i8mr7891823wib.7.1430159175995; Mon, 27 Apr 2015 11:26:15 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.178.164 with SMTP id cz4ls675715lac.3.gmail; Mon, 27 Apr 2015 11:26:15 -0700 (PDT) X-Received: by 10.153.7.104 with SMTP id db8mr7025667lad.124.1430159175807; Mon, 27 Apr 2015 11:26:15 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id j5si15303045laf.127.2015.04.27.11.26.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Apr 2015 11:26:15 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by lbbuc2 with SMTP id uc2so88954913lbb.2 for ; Mon, 27 Apr 2015 11:26:15 -0700 (PDT) X-Received: by 10.112.125.138 with SMTP id mq10mr11440881lbb.35.1430159175720; Mon, 27 Apr 2015 11:26:15 -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.67.65 with SMTP id l1csp1439467lbt; Mon, 27 Apr 2015 11:26:14 -0700 (PDT) X-Received: by 10.66.139.70 with SMTP id qw6mr24653915pab.112.1430159174021; Mon, 27 Apr 2015 11:26:14 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id da1si31026229pad.9.2015.04.27.11.26.12; Mon, 27 Apr 2015 11:26:14 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965130AbbD0S0I (ORCPT + 27 others); Mon, 27 Apr 2015 14:26:08 -0400 Received: from mail-lb0-f180.google.com ([209.85.217.180]:34892 "EHLO mail-lb0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964985AbbD0SYi (ORCPT ); Mon, 27 Apr 2015 14:24:38 -0400 Received: by lbbuc2 with SMTP id uc2so88920839lbb.2 for ; Mon, 27 Apr 2015 11:24:37 -0700 (PDT) X-Received: by 10.112.148.101 with SMTP id tr5mr11519013lbb.0.1430159077013; Mon, 27 Apr 2015 11:24:37 -0700 (PDT) Received: from localhost ([195.238.92.128]) by mx.google.com with ESMTPSA id at2sm4953366lbc.12.2015.04.27.11.24.36 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 27 Apr 2015 11:24:36 -0700 (PDT) From: To: "Rafael J. Wysocki" , Pavel Machek , Len Brown , linux-pm@vger.kernel.org Cc: ulf.hansson@linaro.org, , , , Grygorii Strashko , Tony Lindgren , Nishanth Menon , Kevin Hilman , Santosh Shilimkar Subject: [PATCH 1/3] PM / Sleep: Add macro to define common noirq system PM callbacks Date: Mon, 27 Apr 2015 21:24:30 +0300 Message-Id: <1430159072-31440-2-git-send-email-grygorii.strashko@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430159072-31440-1-git-send-email-grygorii.strashko@linaro.org> References: <1430159072-31440-1-git-send-email-grygorii.strashko@linaro.org> 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: grygorii.strashko@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) smtp.mail=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: , From: Grygorii Strashko The same approach is used as for the existing SET_SYSTEM_SLEEP_PM_OPS, but for noirq callbacks. New SET_NOIRQ_SYSTEM_SLEEP_PM_OPS, defined for CONFIG_PM_SLEEP, will point ->suspend_noirq, ->freeze_noirq and ->poweroff_noirq to the same function. Vice versa happens for ->resume_noirq, ->thaw_noirq and ->restore_noirq. Cc: Tony Lindgren Cc: Nishanth Menon Cc: Kevin Hilman Cc: Santosh Shilimkar Signed-off-by: Grygorii Strashko --- include/linux/pm.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/linux/pm.h b/include/linux/pm.h index 2d29c64..4890743 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h @@ -342,6 +342,18 @@ struct dev_pm_ops { #define SET_LATE_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) #endif +#ifdef CONFIG_PM_SLEEP +#define SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \ + .suspend_noirq = suspend_fn, \ + .resume_noirq = resume_fn, \ + .freeze_noirq = suspend_fn, \ + .thaw_noirq = resume_fn, \ + .poweroff_noirq = suspend_fn, \ + .restore_noirq = resume_fn, +#else +#define SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) +#endif + #ifdef CONFIG_PM #define SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \ .runtime_suspend = suspend_fn, \