Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5923758rwl; Thu, 29 Dec 2022 05:10:02 -0800 (PST) X-Google-Smtp-Source: AMrXdXtGeELO52p9XOTVODOgz97mapB+4jjqQrcfU2S0pZ0PhfYctFQR71mdOoOlBsXxH0gmZLGL X-Received: by 2002:a05:6402:88d:b0:46f:fb60:8bd0 with SMTP id e13-20020a056402088d00b0046ffb608bd0mr24311156edy.5.1672319402519; Thu, 29 Dec 2022 05:10:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672319402; cv=none; d=google.com; s=arc-20160816; b=imbPxL7Nqygbi99qANy+M0oKTXC4PqQHhKWsw1/7mTTiWRzbWNkOPMfSg4bPf6H7iS nwY/ySJ568v8smW9Ndg0razxQ/JFyxeUjrzvgED34jExMT5Wraao1nrowl5+7bOYfVKp Ozr4f0czaHEODloV/DNtLHHmdvPwPTyvxK4iguYP2hoefT1CzuPFI0h4HWpvf+8oN3Ep nt7dmyDwY+NpsWnLWz9GNwi+qAhHM+HOSohZJPV+due3Ne/gt9gHGugRORCILM5ZSHD2 /F/UCSMuok9nMtHMZTxlDQ/+LU3opb47aTX+tjhbKwu5dC65LLnmB4r6BswfwtTnykOj GcHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4k1yORUEaLht6h5eK85MKc5WKJKPetwxkbB/iPkTpXY=; b=ZjdL/TcT11gIIIf68ELqoWEx+3lmwvs7tYjFUykDZ4yAevUTjuxQwrjfuWykYHJOe8 xrwRzzM1kGWAgXCpvUv23iPjW4VMUm/WpP89lhw5tEzDi5+04v1OXDPh63usAYIHrp53 Q7A5r4Ywrw7Y5vsvYArJtLCTdtJS0gBN0KxkcQOeKpix74l6AOY/rDDtkdVgPFuOdmO2 kejUxhq/sGx+wcGFXD4v2ZwAB80jebjtz0Rp8p8z6eF+lQX8ZSPzIVTV2sLMdmwBUlgs gkENkfqkfMrwHEVZ7Lord96czrcyf4etdtocDQV+zvgwDjmEQosYC4W61vMDaj+MWfhn HXGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Cu4eGI03; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w19-20020a056402269300b0046277d2cb0csi17145105edd.470.2022.12.29.05.09.48; Thu, 29 Dec 2022 05:10:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Cu4eGI03; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233332AbiL2M7i (ORCPT + 61 others); Thu, 29 Dec 2022 07:59:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233355AbiL2M7e (ORCPT ); Thu, 29 Dec 2022 07:59:34 -0500 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1008513DE9; Thu, 29 Dec 2022 04:59:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672318774; x=1703854774; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=34P7+7ieU5tbrjpB2CMgoEmWUxpnYkYbmhyOoY0g5QI=; b=Cu4eGI03S8f2zxWZle3muOnBDAQ4QlcQ24u51MyUvNY8yXoiu3jdK3nG 9DWsmUM/dfHSmPysFa2I8EpJWDd4LJF4SkKVfkiDUfu2E4IjVClO0Cr8x A7MER7j5tklenQybwvNBQisHw/sAweCmuWhVlR0I9HQNIJfcJDPpI7VbO Y8bsJpNBazmWhDEEGig+TGqh95hBJUFdvmHmuJOruFvg9YPPxQJPFmejA pXzdqZd+Qwveaj9d8M8V+klLiF2cuIg8kmccgCv5O0KEo2mTLFV4NEpYf GCwIHqGa7USVl2486BAo2YAwjk5vOQKGocYHKDRMCOZtCXBwcanzLeLEf A==; X-IronPort-AV: E=McAfee;i="6500,9779,10574"; a="348247462" X-IronPort-AV: E=Sophos;i="5.96,284,1665471600"; d="scan'208";a="348247462" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Dec 2022 04:59:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10574"; a="777691260" X-IronPort-AV: E=Sophos;i="5.96,284,1665471600"; d="scan'208";a="777691260" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga004.jf.intel.com with ESMTP; 29 Dec 2022 04:59:30 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 52DE0F8; Thu, 29 Dec 2022 15:00:01 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , Mika Westerberg , "Rafael J. Wysocki" , Paul Cercueil , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Cc: Andy Shevchenko , Linus Walleij , "Rafael J. Wysocki" , Len Brown , Pavel Machek Subject: [PATCH v1 1/3] pm: Introduce DEFINE_NOIRQ_DEV_PM_OPS() helper Date: Thu, 29 Dec 2022 14:59:55 +0200 Message-Id: <20221229125957.45923-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221229125957.45923-1-andriy.shevchenko@linux.intel.com> References: <20221229125957.45923-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There are a few drivers and might be more in the future that open code the functionality of proposed DEFINE_NOIRQ_DEV_PM_OPS() helper. From now on they may switch to the new helper and save a few lines of code. Signed-off-by: Andy Shevchenko --- include/linux/pm.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/pm.h b/include/linux/pm.h index 93cd34f00822..eba96822b1d9 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h @@ -444,6 +444,11 @@ const struct dev_pm_ops __maybe_unused name = { \ SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \ } +#define DEFINE_NOIRQ_DEV_PM_OPS(name, suspend_fn, resume_fn) \ +const struct dev_pm_ops name = { \ + NOIRQ_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \ +} + #define pm_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_PM), (_ptr)) #define pm_sleep_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_PM_SLEEP), (_ptr)) -- 2.35.1