Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp310601lqt; Thu, 6 Jun 2024 04:33:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVJ20Mb2h8zK0ZQS7GMw1wyjZZ3rb4YfPoA9QQEG8uKFX3dC1bjgix7VgB7loUE3JOm9up77V1FvFhi5tiARlhnc9BGU1u9BLFrIXmtDA== X-Google-Smtp-Source: AGHT+IFLVL5ZqOdvlxjEXHTR9z3LrTgpzSN3UgsUWuKHPywXiul/DuPtepEPkqu5qBPHoozjpzoQ X-Received: by 2002:a05:6a21:3395:b0:1af:cb65:1407 with SMTP id adf61e73a8af0-1b2b6e59598mr5715123637.6.1717673629364; Thu, 06 Jun 2024 04:33:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717673629; cv=pass; d=google.com; s=arc-20160816; b=rrD9mS+RVkTS8xVRLJSTpaJroKDOCVgpffWq6b9aQv4sxEYNehhSWv6rNOp0UV183R ftSKqhWHozvicsCM2bRJ+S+Yetlfa/AVzMKHEwB74gim3zi7ScxdA99cS3w0n4vkxkMg OZcPAQbV7prKbXoqNS7/8StjakoBJ1SeCk9WFmWvbqxxqo45+CdbHL0NdxDsIObi67q8 bsIec/gYDB8lqcoHQJGzJ8zcn2Z4b0De5NQwLsZrOh84tu61tZnq6NEfIa0OgLMCwWAm Fc1E0q8/VnRf34pbTmgquIik+Ku3arxfn2fLHxwTqFPFlewNgKb4BMb0yl4kV4m0nvK5 ZLMA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=OH86+RYooL/TwkaVFeh6+rlcLoll+q8Cw6gljIVddnM=; fh=QpH6g6IyqBqPgUmnCdVM1468JM0sPOX69MwPrlNQxYM=; b=wZDW6SahxaPE144hCzfJubvocp6qafUnICoVlmfRoqW0wgA2EsxI5uwS7KcN0Wswb1 aS6RUMKuESZUvMhx9tqm6TOrWHE50LZ8tmr5nf3qbHSW55jzUmwYrzXDzyeMRece/1jE K9/I0pclJKW8MRF2fTv0f91PWEXBYtvffApy5wOPfety/ja8O667CBL9pmSayoFLfT2w 43tBBBbaFK+hj4foEnMPsQ3y37q7pRST7MjcINQoq3Mnz9KUjrkqdDf7MWCBSw30LJbl 3S4QdCO83mZGcZxIWnvFLYm/rx1FO/dPDW8SqSOghPSZXVqPRcEvIyLJRcLisA0gSoen 0NOg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@norik.com header.s=default header.b=HNyvsU5o; arc=pass (i=1 spf=pass spfdomain=norik.com dkim=pass dkdomain=norik.com); spf=pass (google.com: domain of linux-kernel+bounces-204176-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204176-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de261ca46dsi237654a12.358.2024.06.06.04.33.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 04:33:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204176-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=fail header.i=@norik.com header.s=default header.b=HNyvsU5o; arc=pass (i=1 spf=pass spfdomain=norik.com dkim=pass dkdomain=norik.com); spf=pass (google.com: domain of linux-kernel+bounces-204176-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204176-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 739AD2814DC for ; Thu, 6 Jun 2024 11:33:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D6DC5195811; Thu, 6 Jun 2024 11:33:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=norik.com header.i=@norik.com header.b="HNyvsU5o" Received: from cpanel.siel.si (cpanel.siel.si [46.19.9.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 720C33CF73; Thu, 6 Jun 2024 11:33:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.19.9.99 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717673619; cv=none; b=MukByMzLeKY5Ff0Mlcp4x6H0HMUW/ZDxIG7JcWPQudLyWWARZ2Itk6WATP/j2APKtnbYAdyTvU8XQHXOHY6rltMYPYqhX8G7T/6s2prm8FQnZMKJ2vszZECTkBpCFh+acNcOnk191PolpZZbRezSX+PTqmiMTWlubcXG6G9vIKs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717673619; c=relaxed/simple; bh=15XVAauSQDzKB2ZTPCdoFtU+mdQmJ+2xIpBb5ozGdsw=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=aOe5YKblnTFyxxORSUX8nkXiw1cCSIkmGL8DvtsfQanFVrH1JyRLsfKGRJv2J/dQ+tvl2242OrjNCHEPgp9se+pD/L+8SHDa3TFT69D6LP5sCcrqqax71yCBw2Oaz663l9lhH+xItAHa74hEIdTqrs+7mEsFTY1yQujpmrQ3pVo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=norik.com; spf=pass smtp.mailfrom=norik.com; dkim=pass (2048-bit key) header.d=norik.com header.i=@norik.com header.b=HNyvsU5o; arc=none smtp.client-ip=46.19.9.99 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=norik.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=norik.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=norik.com; s=default; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject: Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=OH86+RYooL/TwkaVFeh6+rlcLoll+q8Cw6gljIVddnM=; b=HNyvsU5oxnqEPYee8wJqKUD+5/ v9OUHjvkaB9VE2kpJgpYcIOGuYXeC97EfzWiF+Xm4FeFaZwxG2I7FC3TeJgYkJqw9nkXOXjiZwnpw L3NDNA9l501pVSDjioE1NlRax3UB3E+8Qtw0b4mh1Q9Ex2BoLqrijQUvmtxTTHDmPthM2XZcarFBI yoSIpYS6x6RUQhDlngIM6nRH0BxUzndOymsHEv1qOaa5a8MrPLJyDOggDZlmDc313R4qOjTX1O7CV 7qJ7TiuN471TwxF5v3hvuK5zKzdM2Swrmgd13WYZOgFvjXvt4faEl+4DdirSqV7WiCiVsP08FabhO tP+MJmEA==; Received: from [89.212.21.243] (port=42304 helo=localhost.localdomain) by cpanel.siel.si with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96.2) (envelope-from ) id 1sFBN9-00CBT8-1N; Thu, 06 Jun 2024 13:33:35 +0200 From: Primoz Fiser To: Viresh Kumar , Nishanth Menon , Stephen Boyd , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: upstream@lists.phytec.de Subject: [PATCH 1/2] OPP: Introduce devm_pm_opp_set_config_regulators Date: Thu, 6 Jun 2024 13:33:33 +0200 Message-Id: <20240606113334.396693-1-primoz.fiser@norik.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel.siel.si X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - norik.com X-Get-Message-Sender-Via: cpanel.siel.si: authenticated_id: primoz.fiser@norik.com X-Authenticated-Sender: cpanel.siel.si: primoz.fiser@norik.com X-Source: X-Source-Args: X-Source-Dir: Introduce devm_pm_opp_set_config_regulators() function. This is device managed version of dev_pm_opp_set_config_regulators so caller don't need to worry about managing returned tokens. Signed-off-by: Primoz Fiser --- include/linux/pm_opp.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h index dd7c8441af42..fa515aab47c9 100644 --- a/include/linux/pm_opp.h +++ b/include/linux/pm_opp.h @@ -664,6 +664,16 @@ static inline int dev_pm_opp_set_config_regulators(struct device *dev, return dev_pm_opp_set_config(dev, &config); } +static inline int devm_pm_opp_set_config_regulators(struct device *dev, + config_regulators_t helper) +{ + struct dev_pm_opp_config config = { + .config_regulators = helper, + }; + + return devm_pm_opp_set_config(dev, &config); +} + static inline void dev_pm_opp_put_config_regulators(int token) { dev_pm_opp_clear_config(token); -- 2.25.1