On 16/11/2022 09:41, Mika Westerberg wrote:
+ * pinctrl_acpi_get_pin_groups() - Get ACPI PinGroup Descriptors for the device
+ * @adev: ACPI device node for retrieving PinGroup descriptors
+ * @group_desc_list: list head to add PinGroup descriptors
+ *
+ * This will parse ACPI PinGroup resources for the given ACPI device
+ * and will add descriptors to the provided @group_desc_list list
I would add here what happens to group_desc_list if the function returns
non-zero.
Also perhaps the API should use an array instead and when NULL is passed
it returns the size as we do with properties for example. The naged
list_head pointer looks kind of weird.
Array would be nice. However I might have to do an additional acpi walk
to find the number of PinGroups to allocate array and another iteration
to populate fields. May be two iterations are not as bad as I thought.
Open to suggestions.
--
Niyas