Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp1075014rdb; Fri, 20 Oct 2023 07:50:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEB8BGxTIcQmQVQ9wftF0YFwBnobN0qn7G6CvKLgjxr3RLg8ew04cT9paMAQhed76c1i8za X-Received: by 2002:a05:6a21:788e:b0:138:68b9:138e with SMTP id bf14-20020a056a21788e00b0013868b9138emr8146068pzc.8.1697813402073; Fri, 20 Oct 2023 07:50:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697813402; cv=none; d=google.com; s=arc-20160816; b=ljiX0rIR2QtKZBvWLAL3tkJjAoKnju+Dj5ekvmSyhZx+R4ei6S1OJGcc3Amj6HfKis PLLRLhKSa2OC7TDyxkf/SjChGAYAzKgU3mZw2C6D+ZPJiEe9TI8bBssRkdfA/1oH2+Ha Zsz9VWurqBPQdE4m3tzt+4WO/IT0WP50Ql1+MfTQVkBZCMrenDgNDiFQFqDy/1/6VtcX Vn/KR3zYhXdBfVQ732N7a4uFbba6PvNbJxsvFF8FDkqaxExF62hzGECj7wGqNjFlys8E XGVs+Cs4eLCGHQxQpcBZ7pmjxI0CuMgzUxFjX5x45GvlP8oeiq7DQRPYUAFIFT4pJ7gw iCCQ== 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=7TYGfpzvT/5oNJK2q8mHJXHvfhaI4S8DpmaQQY7oAIU=; fh=D3A4un+p2RkuxOIXbMlXe+tvRvITrJSs54dEcll36XY=; b=wj4njEFuz6BqKHud6VDiBhsG4c3Bo5Ga6gTGH9YsUNappwvB9QsD1/3HNKNYhuhfhe zXETfUza4yIOanqxQTj6cxYBqg0ExSQSLejak9QhFT0MvahhyNwsAEVBFrIZVpIz+5ff uBaw/O7EBWeJfRUz8HUPbfufXwTakutHqRtyUEfbKjykBoYnEI5guVh5IQXicNu3Zqem 5qVywRjs7C3RmfKuwecSR2hAAWlbrZA9MbVdrF/mw/oIj6W4RYrSp4DPWBKHKt/XD1Vb 3wE1VqTLYIUmZG3WOdF8bnc/4h4xiNIES+6KFQCczEEohiIUpJsVN5P7WcyQYIlrYyNu c+rw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id t2-20020a639542000000b005897813624fsi1892295pgn.476.2023.10.20.07.50.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 07:50:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 2CB4E82CC42C; Fri, 20 Oct 2023 07:50:01 -0700 (PDT) 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 S1377601AbjJTOt4 (ORCPT + 99 others); Fri, 20 Oct 2023 10:49:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377589AbjJTOtx (ORCPT ); Fri, 20 Oct 2023 10:49:53 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CAE7D5A; Fri, 20 Oct 2023 07:49:51 -0700 (PDT) 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 cee7a7d880d2d8a4; Fri, 20 Oct 2023 16:49:50 +0200 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 82856667008; Fri, 20 Oct 2023 16:49:49 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI , Sakari Ailus Cc: LKML , Andy Shevchenko , Heikki Krogerus Subject: [PATCH v2 4/6] device property: Add SOFTWARE_NODE() macro for defining software nodes Date: Fri, 20 Oct 2023 16:38:25 +0200 Message-ID: <1972742.PYKUYFuaPT@kreacher> In-Reply-To: <2187487.irdbgypaU6@kreacher> References: <2187487.irdbgypaU6@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: gggruggvucftvghtrhhoucdtuddrgedvkedrjeekgdejlecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkjghfggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpedvffeuiedtgfdvtddugeeujedtffetteegfeekffdvfedttddtuefhgeefvdejhfenucfkphepudelhedrudefiedrudelrdelgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduleehrddufeeirdduledrleegpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeehpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepshgrkhgrrhhirdgrihhluhhssehlihhnuhigrdhinhhtvghlrdgtohhmpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprghnughrihihrdhshhgvvhgthhgvnhhkoheslhhinhhugidrihhn thgvlhdrtghomhdprhgtphhtthhopehhvghikhhkihdrkhhrohhgvghruhhssehlihhnuhigrdhinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=5 Fuz1=5 Fuz2=5 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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]); Fri, 20 Oct 2023 07:50:01 -0700 (PDT) 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 --- 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);