Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5630215rwd; Wed, 24 May 2023 04:50:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6JeraURg1ww/GRu8BHsnPxJaPgRwsmTmqxvLVm2zI6G/yFwYKAlkyaUxXUWcES2eYWwYEZ X-Received: by 2002:a17:90a:b791:b0:255:53b4:278c with SMTP id m17-20020a17090ab79100b0025553b4278cmr10727876pjr.36.1684929048673; Wed, 24 May 2023 04:50:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684929048; cv=none; d=google.com; s=arc-20160816; b=lfO7RvLnaGqJ0EV4T38wJg+BrKFfiNKT3icYIFPm3//+zCzIj4xrEcJsdYEZeqTyu+ pv9v5NNcFFP1DUvPAROIJY75uCClzZ6pAu7WyI2b4/Vzw1Dk13FtGvjzylqoq4DQMWo5 kKznKxzuHARGFYbXU0CSfpICfCS8zmwGyVVbCo7dwH81fnAw7xxoJh76KsLlPrPro+2H D1XwMQ9ATmqJehSNjbMDMuKlazfrbxSm8uK/lydP8y/AP0CJkO2IaY5Mjkwon2YPpMLy Vo/WwN0AxV2pCfUyp6uQmRjU8FyT6YrA4VnY7+NHHUC6sEqzQSbHs4Wm5Bus1pMhafOL X/4w== 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=+PZZIY+v8AYmfKcYPpnCZaF5r/NFRvSyKweK/z8K9qw=; b=XEy7aYb1+67UZx+xVyiMFEHsRVzTi2oeNjPKLwFRKZQlWH/MpOGwlosrvlQsZtb/h/ MVV47J0esKJ4/TKJ1SIUQB/BpebXQomgYFIwBsoEVnXyqQfJveTzk4XjiBBPKtFDyY4z ngr2REH3rW6JtedRsxkBy6fr06Mkz0UsIn5xRNU6QzkmXADRBx8a6nV0nrr5Ibw/ha7v wFZGISVl9mu2fI0sC3HN9p/xrstde3i47Zsu2eD9/HtSDqQjIsdPgboAjWu27RpZw1xG ulU2MDoHkehGDyJlAL0+C8LVFa43EuS2zP2tyOimNt32gKXFP1Oky+qmH1E8QXtxzclb 5sIA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g7-20020a17090a3c8700b002535fa552f2si1178006pjc.85.2023.05.24.04.50.36; Wed, 24 May 2023 04:50:48 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229764AbjEXLpn (ORCPT + 99 others); Wed, 24 May 2023 07:45:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229542AbjEXLpm (ORCPT ); Wed, 24 May 2023 07:45:42 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07E31139; Wed, 24 May 2023 04:45:40 -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 68b5a971a014d278; Wed, 24 May 2023 13:45:39 +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 v370.home.net.pl (Postfix) with ESMTPSA id BA88B69D7E2; Wed, 24 May 2023 13:45:38 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI , Sakari Ailus Cc: LKML , Hans de Goede , Andy Shevchenko Subject: [PATCH v1 4/6] device property: Add SOFTWARE_NODE() macro for defining software nodes Date: Wed, 24 May 2023 13:45:38 +0200 Message-ID: <3170440.5fSG56mABF@kreacher> In-Reply-To: <13276375.uLZWGnKmhe@kreacher> References: <13276375.uLZWGnKmhe@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: gggruggvucftvghtrhhoucdtuddrgedvhedrfeejhedggedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepfeduudeutdeugfelffduieegiedtueefledvjeegffdttefhhffhtefhleejgfetnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucfkphepudelhedrudefiedrudelrdelgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduleehrddufeeirdduledrleegpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeehpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepshgrkhgrrhhirdgrihhluhhssehlihhnuhigrdhinhhtvghlrdgtohhmpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohephhguvghgohgv uggvsehrvgguhhgrthdrtghomhdprhgtphhtthhopegrnhgurhhihidrshhhvghvtghhvghnkhhosehlihhnuhigrdhinhhtvghlrdgtohhm 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,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 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 --- Same as https://patchwork.kernel.org/project/linux-acpi/patch/20230329100951.1522322-5-sakari.ailus@linux.intel.com/ --- 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 @@ -476,6 +476,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);