Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2244717rdf; Mon, 6 Nov 2023 08:31:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IE4u9dSqHWwf83pdYFEuz43T5gH7eyAM+XlvvMIWNSgU1C7TnJgihxRPyiRQHMhR5+uETZb X-Received: by 2002:a05:6358:7e55:b0:169:a8f8:8d20 with SMTP id p21-20020a0563587e5500b00169a8f88d20mr19648016rwm.0.1699288309114; Mon, 06 Nov 2023 08:31:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699288309; cv=none; d=google.com; s=arc-20160816; b=S/qd8/YivARJk96PPGL/EHJ2qSrFLuSOkCgtkCFV+sU6ZiOfeoefcY+idrSkl2xaR9 7aPgFuF2FyU3l2h0610E1FsOtHSANb1FSK8gpUgtRfpomk8WUYY6flKCr42l8rGiXpYW +hY1FSR2smVhNikbiUKQOO/Mvdsh4fyr4z7m4ycWxALD4cDttlYSlY8mlUJc6TuFyRwk m2Qul0+T4tkGKbNQOiuPPfZw4RYB+zTXqk4DUVfvlqrdqGliyMt+BogxRQhjiO6i4hXC onWWfEIiW7ShrwTZq2xTV5mfhZJH3BbnC+SsOtB7KDW/ezfxX0FJUzTu+gIHEA3GmOG/ Uj+g== 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; bh=tTRUPhgn50cPF1mkKLJ8EfTysyrltnyEUf71vv2jdHs=; fh=WaqwKbNI6ggyvaUQ85iAclRCevgklJhqArlb3px6pNU=; b=xLY1xdfeBxsfHoh/SwdqouCEasTSA04engx8cWFQH7WVP7JVpb07d2SYdXEYPEcLqE LpFBdaTlKoMextzpSMtABXj5AvEG1/qT8pb2HUOEqWlsAmZUOWvKBOjkKylEg7gsMDag tIkQ3lOwlQePBJKFCIkjO/0DiX8+SCKCexoVM0cOA8TM1fhwzu6cfTqxZ/ybAreC7fyC BupJEajeJM41wKaFmbZ5Yf3Sq1C8Xwwig579X08Dpa9I3Gaei7JYoum34IorNx94qhrz 50vVLwkaGudVwrSLyGg8v5HrseVh/YKuPKpY/WK4INpGx4yabLVXCSUjP7MLlYuvj6eB ya0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id m7-20020a634c47000000b005b90e67f441si36345pgl.34.2023.11.06.08.31.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 08:31:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D2505802582F; Mon, 6 Nov 2023 08:31:47 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232797AbjKFQbn (ORCPT + 99 others); Mon, 6 Nov 2023 11:31:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232094AbjKFQbj (ORCPT ); Mon, 6 Nov 2023 11:31:39 -0500 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FE92D47; Mon, 6 Nov 2023 08:31:36 -0800 (PST) Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.2.0) id 221b211dc1a76a6e; Mon, 6 Nov 2023 17:31:35 +0100 Received: from kreacher.localnet (unknown [195.136.19.94]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cloudserver094114.home.pl (Postfix) with ESMTPSA id B361B667790; Mon, 6 Nov 2023 17:31:34 +0100 (CET) From: "Rafael J. Wysocki" To: Linux ACPI , Sakari Ailus Cc: LKML Subject: [PATCH v3 4/7] device property: Add SOFTWARE_NODE() macro for defining software nodes Date: Mon, 06 Nov 2023 17:16:37 +0100 Message-ID: <3211372.5fSG56mABF@kreacher> In-Reply-To: <4542595.LvFx2qVVIh@kreacher> References: <4542595.LvFx2qVVIh@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 195.136.19.94 X-CLIENT-HOSTNAME: 195.136.19.94 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedruddugedgkeejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdffueeitdfgvddtudegueejtdffteetgeefkeffvdeftddttdeuhfegfedvjefhnecukfhppeduleehrddufeeirdduledrleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelhedrudefiedrudelrdelgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepfedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehsrghkrghrihdrrghilhhusheslhhinhhugidrihhnthgvlhdrtghomhdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 06 Nov 2023 08:31:48 -0800 (PST) From: Sakari Ailus Add SOFTWARE_NODE() macro in order to make defining software nodes look nicer. This is analogous to different PROPERTY_ENTRY_*() macros for defining properties. Signed-off-by: Sakari Ailus Reviewed-by: Andy Shevchenko Reviewed-by: Heikki Krogerus --- v2 -> v3: No changes --- include/linux/property.h | 7 +++++++ 1 file changed, 7 insertions(+) Index: linux-pm/include/linux/property.h =================================================================== --- linux-pm.orig/include/linux/property.h +++ linux-pm/include/linux/property.h @@ -488,6 +488,13 @@ struct software_node { const struct property_entry *properties; }; +#define SOFTWARE_NODE(_name_, _properties_, _parent_) \ + (struct software_node) { \ + .name = _name_, \ + .properties = _properties_, \ + .parent = _parent_, \ + } + bool is_software_node(const struct fwnode_handle *fwnode); const struct software_node * to_software_node(const struct fwnode_handle *fwnode);