public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Linux ACPI <linux-acpi@vger.kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>
Subject: [PATCH v2 4/6] device property: Add SOFTWARE_NODE() macro for defining software nodes
Date: Fri, 20 Oct 2023 16:38:25 +0200	[thread overview]
Message-ID: <1972742.PYKUYFuaPT@kreacher> (raw)
In-Reply-To: <2187487.irdbgypaU6@kreacher>

From: Sakari Ailus <sakari.ailus@linux.intel.com>

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 <sakari.ailus@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@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
@@ -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);




  parent reply	other threads:[~2023-10-20 14:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-20 14:33 [PATCH v2 0/6] ACPI: scan: MIPI DiSco for Imaging support Rafael J. Wysocki
2023-10-20 14:35 ` [PATCH v2 1/6] ACPI: property: Support using strings in reference properties Rafael J. Wysocki
2023-10-20 14:36 ` [PATCH v2 2/6] ACPI: scan: Extract CSI-2 connection graph from _CRS Rafael J. Wysocki
2023-10-31  8:47   ` Sakari Ailus
2023-10-31 13:36     ` Rafael J. Wysocki
2023-10-20 14:37 ` [PATCH v2 3/6] ACPI: scan: Extract _CRS CSI-2 connection information into swnodes Rafael J. Wysocki
2023-10-20 14:38 ` Rafael J. Wysocki [this message]
2023-10-20 14:39 ` [PATCH v2 5/6] ACPI: scan: Extract MIPI DiSco for Imaging data " Rafael J. Wysocki
2023-10-31  8:58   ` Sakari Ailus
2023-10-31 13:46     ` Rafael J. Wysocki
2023-10-31 14:00       ` Sakari Ailus
2023-10-31 15:19         ` Rafael J. Wysocki
2023-10-20 14:40 ` [PATCH v2 6/6] ACPI: property: Dig "rotation" property for devices with CSI2 _CRS Rafael J. Wysocki
2023-10-31  8:45 ` [PATCH v2 0/6] ACPI: scan: MIPI DiSco for Imaging support Sakari Ailus
2023-10-31 13:21   ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1972742.PYKUYFuaPT@kreacher \
    --to=rjw@rjwysocki.net \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox