* [PATCH v2 1/1] ACPI: property: Consider data nodes as being available
@ 2024-12-19 15:21 Sakari Ailus
2024-12-19 20:06 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Sakari Ailus @ 2024-12-19 15:21 UTC (permalink / raw)
To: linux-acpi
Cc: Rafael J. Wysocki, Len Brown, Mika Westerberg, Rob Herring,
andriy.shevchenko
New functions making use of the data node availability information, like
fwnode_for_each_available_child_node(), have been added years after
fwnode_device_is_available() was introduced. To enumerate the data nodes
in various ways specific to those functions, the node availability test
needs to pass.
On ACPI, there is no explicit data node availbility information in the
first place and the original fwnode_device_is_available() implementation
simply returns false. This causes new functions that only enumerate
available nodes to never return any nodes on ACPI for leaf devices that
have child data nodes.
However, on the DT side, fwnode_device_is_available() returns true for all
nodes without the "status" property which are analogous to the ACPI data
nodes, so there is a difference in behavior between DT and ACPI in that
respect.
Thus from now on, return true from fwnode_device_is_available() on all
ACPI data nodes.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
drivers/acpi/property.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c
index 80a52a4e66dd..1ee81e771ae6 100644
--- a/drivers/acpi/property.c
+++ b/drivers/acpi/property.c
@@ -1492,7 +1492,7 @@ acpi_graph_get_remote_endpoint(const struct fwnode_handle *__fwnode)
static bool acpi_fwnode_device_is_available(const struct fwnode_handle *fwnode)
{
if (!is_acpi_device_node(fwnode))
- return false;
+ return true;
return acpi_device_is_present(to_acpi_device_node(fwnode));
}
base-commit: e14d5ae28eb28c5edef53bd648037d2bb4fce1b3
--
2.39.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 1/1] ACPI: property: Consider data nodes as being available
2024-12-19 15:21 [PATCH v2 1/1] ACPI: property: Consider data nodes as being available Sakari Ailus
@ 2024-12-19 20:06 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2024-12-19 20:06 UTC (permalink / raw)
To: Sakari Ailus
Cc: linux-acpi, Rafael J. Wysocki, Len Brown, Mika Westerberg,
Rob Herring, andriy.shevchenko
On Thu, Dec 19, 2024 at 4:21 PM Sakari Ailus
<sakari.ailus@linux.intel.com> wrote:
>
> New functions making use of the data node availability information, like
> fwnode_for_each_available_child_node(), have been added years after
> fwnode_device_is_available() was introduced. To enumerate the data nodes
> in various ways specific to those functions, the node availability test
> needs to pass.
>
> On ACPI, there is no explicit data node availbility information in the
> first place and the original fwnode_device_is_available() implementation
> simply returns false. This causes new functions that only enumerate
> available nodes to never return any nodes on ACPI for leaf devices that
> have child data nodes.
>
> However, on the DT side, fwnode_device_is_available() returns true for all
> nodes without the "status" property which are analogous to the ACPI data
> nodes, so there is a difference in behavior between DT and ACPI in that
> respect.
>
> Thus from now on, return true from fwnode_device_is_available() on all
> ACPI data nodes.
>
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
> drivers/acpi/property.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c
> index 80a52a4e66dd..1ee81e771ae6 100644
> --- a/drivers/acpi/property.c
> +++ b/drivers/acpi/property.c
> @@ -1492,7 +1492,7 @@ acpi_graph_get_remote_endpoint(const struct fwnode_handle *__fwnode)
> static bool acpi_fwnode_device_is_available(const struct fwnode_handle *fwnode)
> {
> if (!is_acpi_device_node(fwnode))
> - return false;
> + return true;
>
> return acpi_device_is_present(to_acpi_device_node(fwnode));
> }
>
> base-commit: e14d5ae28eb28c5edef53bd648037d2bb4fce1b3
> --
Applied as 6.14 material, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-19 20:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-19 15:21 [PATCH v2 1/1] ACPI: property: Consider data nodes as being available Sakari Ailus
2024-12-19 20:06 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox