Commit e121be7
ACPI: property: Refactor acpi_fwnode_get_reference_args() to support nargs_prop
Currently, acpi_fwnode_get_reference_args() delegates to the internal
function __acpi_node_get_property_reference() to retrieve property
references. However, this function does not handle the nargs_prop (cells
property) parameter, and instead expects the number of arguments (nargs)
to be known or hardcoded.
As a result, when fwnode_property_get_reference_args() is used with a
valid nargs_prop, the ACPI backend ignores it, whereas the Device Tree
(DT) backend uses the #*-cells property from the reference node to
determine the number of arguments dynamically.
To support the nargs_prop in ACPI, refactor the code as follows:
- Move the implementation from __acpi_node_get_property_reference()
into acpi_fwnode_get_reference_args().
- Update __acpi_node_get_property_reference() to call the (now updated)
acpi_fwnode_get_reference_args() passing NULL as nargs_prop to keep
the behavior of __acpi_node_get_property_reference() intact.
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Link: https://lore.kernel.org/r/20250818040920.272664-15-apatel@ventanamicro.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>1 parent aa43953 commit e121be7
1 file changed
Lines changed: 50 additions & 51 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
882 | 882 | | |
883 | 883 | | |
884 | 884 | | |
885 | | - | |
886 | | - | |
887 | | - | |
888 | | - | |
889 | | - | |
890 | | - | |
891 | | - | |
892 | | - | |
893 | | - | |
894 | | - | |
895 | | - | |
896 | | - | |
897 | | - | |
898 | | - | |
899 | | - | |
900 | | - | |
901 | | - | |
902 | | - | |
903 | | - | |
904 | | - | |
905 | | - | |
906 | | - | |
907 | | - | |
908 | | - | |
909 | | - | |
910 | | - | |
911 | | - | |
912 | | - | |
913 | | - | |
914 | | - | |
915 | | - | |
916 | | - | |
917 | | - | |
918 | | - | |
919 | | - | |
920 | | - | |
921 | | - | |
922 | | - | |
923 | | - | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
924 | 889 | | |
925 | 890 | | |
926 | 891 | | |
| |||
999 | 964 | | |
1000 | 965 | | |
1001 | 966 | | |
1002 | | - | |
| 967 | + | |
1003 | 968 | | |
1004 | 969 | | |
1005 | 970 | | |
| |||
1017 | 982 | | |
1018 | 983 | | |
1019 | 984 | | |
1020 | | - | |
| 985 | + | |
1021 | 986 | | |
1022 | 987 | | |
1023 | 988 | | |
| |||
1039 | 1004 | | |
1040 | 1005 | | |
1041 | 1006 | | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
1042 | 1051 | | |
1043 | 1052 | | |
1044 | 1053 | | |
| |||
1558 | 1567 | | |
1559 | 1568 | | |
1560 | 1569 | | |
1561 | | - | |
1562 | | - | |
1563 | | - | |
1564 | | - | |
1565 | | - | |
1566 | | - | |
1567 | | - | |
1568 | | - | |
1569 | | - | |
1570 | | - | |
1571 | 1570 | | |
1572 | 1571 | | |
1573 | 1572 | | |
| |||
0 commit comments