Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46056 )
Change subject: acpi/device: Add GPIO binding property for an array of GPIOs ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46056/1/src/include/acpi/acpi_devic... File src/include/acpi/acpi_device.h:
https://review.coreboot.org/c/coreboot/+/46056/1/src/include/acpi/acpi_devic... PS1, Line 550: pin
I guess that would complicate the easy re-use of this array method in the single use method...
I was thinking if we should allow the caller to provide details about each GPIO separately since we can potentially have cases in the future where the polarity for all GPIOs is not the same or need to reference a different device. That should help with the pin # as well as allow the caller to have non-contiguous GPIO indices from _CRS.
Basically something like: struct acpi_gpio_property { const char *ref; int index; int pin; int active_low; }
And have this function defined as: struct acpi_dp *acpi_dp_add_gpio_array(struct acpi_dp *dp, const struct acpi_gpio_property *gpio_table, size_t gpio_count) { }
That should also allow the case of single use method to call `acpi_dp_add_gpio_array` by setting the same value as the caller.