From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-acpi@vger.kernel.org
Cc: andriy.shevchenko@linux.intel.com,
heikki.krogerus@linux.intel.com, rafael@kernel.org
Subject: [PATCH v2 2/7] device property: Fix documentation for FWNODE_GRAPH_DEVICE_DISABLED
Date: Wed, 1 Dec 2021 14:59:30 +0200 [thread overview]
Message-ID: <20211201125934.936953-3-sakari.ailus@linux.intel.com> (raw)
In-Reply-To: <20211201125934.936953-1-sakari.ailus@linux.intel.com>
FWNODE_GRAPH_DEVICE_DISABLED flag was meant for also returning endpoints
connected to disabled devices, but it also may return endpoints that are
not connected. Fix this in documentation. Also
fwnode_graph_get_endpoint_by_id() was affeced by this.
Also improve the language a little bit.
Fixes: 0fcc2bdc8aff ("device property: Add fwnode_graph_get_endpoint_by_id()")
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/base/property.c | 4 ++--
include/linux/property.h | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/base/property.c b/drivers/base/property.c
index 6df99e526ab0f..ecc4e2eb10678 100644
--- a/drivers/base/property.c
+++ b/drivers/base/property.c
@@ -1111,8 +1111,8 @@ EXPORT_SYMBOL_GPL(fwnode_graph_get_remote_node);
* has not been found, look for the closest endpoint ID greater than the
* specified one and return the endpoint that corresponds to it, if present.
*
- * Do not return endpoints that belong to disabled devices, unless
- * FWNODE_GRAPH_DEVICE_DISABLED is passed in @flags.
+ * Does not return endpoints that belong to disabled devices or endpoints that
+ * are unconnected, unless FWNODE_GRAPH_DEVICE_DISABLED is passed in @flags.
*
* The returned endpoint needs to be released by calling fwnode_handle_put() on
* it when it is not needed any more.
diff --git a/include/linux/property.h b/include/linux/property.h
index 88fa726a76df7..af5a7e512c86f 100644
--- a/include/linux/property.h
+++ b/include/linux/property.h
@@ -418,7 +418,8 @@ static inline bool fwnode_graph_is_endpoint(struct fwnode_handle *fwnode)
* one.
* @FWNODE_GRAPH_DEVICE_DISABLED: That the device to which the remote
* endpoint of the given endpoint belongs to,
- * may be disabled.
+ * may be disabled, or that the endpoint is not
+ * connected.
*/
#define FWNODE_GRAPH_ENDPOINT_NEXT BIT(0)
#define FWNODE_GRAPH_DEVICE_DISABLED BIT(1)
--
2.30.2
next prev parent reply other threads:[~2021-12-01 12:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-01 12:59 [PATCH v2 0/7] Small device property fixes and improvements Sakari Ailus
2021-12-01 12:59 ` [PATCH v2 1/7] device property: Fix fwnode_graph_devcon_match() fwnode leak Sakari Ailus
2021-12-01 12:59 ` Sakari Ailus [this message]
2021-12-01 12:59 ` [PATCH v2 3/7] Documentation: ACPI: Fix data node reference documentation Sakari Ailus
2021-12-01 12:59 ` [PATCH v2 4/7] Documentation: ACPI: Update references Sakari Ailus
2021-12-01 12:59 ` [PATCH v2 5/7] device property: Implement fwnode_graph_get_endpoint_count() Sakari Ailus
2021-12-01 12:59 ` [PATCH v2 6/7] device property: Use fwnode_graph_for_each_endpoint() macro Sakari Ailus
2021-12-01 13:01 ` [PATCH v2 7/7] device property: Drop fwnode_graph_get_remote_node() Sakari Ailus
2021-12-17 17:43 ` [PATCH v2 0/7] Small device property fixes and improvements 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=20211201125934.936953-3-sakari.ailus@linux.intel.com \
--to=sakari.ailus@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=rafael@kernel.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).