Commit 159c86f
ACPI: Add support for nargs_prop in acpi_fwnode_get_reference_args()
Currently, ACPI does not support the use of a nargs_prop (e.g.,
associated with a reference in fwnode_property_get_reference_args().
Instead, ACPI expects the number of arguments (nargs) to be explicitly
passed or known.
This behavior diverges from Open Firmware (OF), which allows the use of
a #*-cells property in the referenced node to determine the number of
arguments. Since fwnode_property_get_reference_args() is a common
interface used across both OF and ACPI firmware paradigms, it is
desirable to have a unified calling convention that works seamlessly for
both.
Add the support for ACPI to parse a nargs_prop from the referenced
fwnode, aligning its behavior with the OF backend. This allows drivers
and subsystems using fwnode_property_get_reference_args() to work in a
firmware-agnostic way without having to hardcode or special-case
argument counts for ACPI.
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@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-16-apatel@ventanamicro.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>1 parent e121be7 commit 159c86f
2 files changed
Lines changed: 26 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
804 | 804 | | |
805 | 805 | | |
806 | 806 | | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
807 | 825 | | |
808 | 826 | | |
| 827 | + | |
809 | 828 | | |
810 | 829 | | |
811 | 830 | | |
812 | 831 | | |
813 | 832 | | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
814 | 836 | | |
815 | 837 | | |
816 | 838 | | |
| |||
961 | 983 | | |
962 | 984 | | |
963 | 985 | | |
964 | | - | |
965 | 986 | | |
966 | 987 | | |
967 | | - | |
| 988 | + | |
| 989 | + | |
968 | 990 | | |
969 | 991 | | |
970 | 992 | | |
| |||
979 | 1001 | | |
980 | 1002 | | |
981 | 1003 | | |
982 | | - | |
983 | 1004 | | |
984 | | - | |
| 1005 | + | |
985 | 1006 | | |
986 | 1007 | | |
987 | 1008 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
578 | 578 | | |
579 | 579 | | |
580 | 580 | | |
581 | | - | |
| 581 | + | |
582 | 582 | | |
583 | 583 | | |
584 | 584 | | |
| |||
0 commit comments