* [PATCH] gpiolib: acpi: Fix gpio count with string references
@ 2026-01-29 14:59 Alban Bedel
2026-01-30 7:46 ` Mika Westerberg
2026-02-04 10:13 ` Bartosz Golaszewski
0 siblings, 2 replies; 3+ messages in thread
From: Alban Bedel @ 2026-01-29 14:59 UTC (permalink / raw)
To: linux-gpio
Cc: Mika Westerberg, Andy Shevchenko, Linus Walleij,
Bartosz Golaszewski, linux-acpi, linux-kernel, Alban Bedel
Since commit 9880702d123f2 ("ACPI: property: Support using strings in
reference properties") it is possible to use strings instead of local
references. This work fine with single GPIO but not with arrays as
acpi_gpio_package_count() didn't handle this case. Update it to handle
strings like local references to cover this case as well.
Signed-off-by: Alban Bedel <alban.bedel@lht.dlh.de>
---
drivers/gpio/gpiolib-acpi-core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpio/gpiolib-acpi-core.c b/drivers/gpio/gpiolib-acpi-core.c
index 83dd227dbbecc..effc5ab6864b8 100644
--- a/drivers/gpio/gpiolib-acpi-core.c
+++ b/drivers/gpio/gpiolib-acpi-core.c
@@ -1346,6 +1346,7 @@ static int acpi_gpio_package_count(const union acpi_object *obj)
while (element < end) {
switch (element->type) {
case ACPI_TYPE_LOCAL_REFERENCE:
+ case ACPI_TYPE_STRING:
element += 3;
fallthrough;
case ACPI_TYPE_INTEGER:
--
2.39.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gpiolib: acpi: Fix gpio count with string references
2026-01-29 14:59 [PATCH] gpiolib: acpi: Fix gpio count with string references Alban Bedel
@ 2026-01-30 7:46 ` Mika Westerberg
2026-02-04 10:13 ` Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Mika Westerberg @ 2026-01-30 7:46 UTC (permalink / raw)
To: Alban Bedel
Cc: linux-gpio, Mika Westerberg, Andy Shevchenko, Linus Walleij,
Bartosz Golaszewski, linux-acpi, linux-kernel
On Thu, Jan 29, 2026 at 03:59:44PM +0100, Alban Bedel wrote:
> Since commit 9880702d123f2 ("ACPI: property: Support using strings in
> reference properties") it is possible to use strings instead of local
> references. This work fine with single GPIO but not with arrays as
> acpi_gpio_package_count() didn't handle this case. Update it to handle
> strings like local references to cover this case as well.
>
> Signed-off-by: Alban Bedel <alban.bedel@lht.dlh.de>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gpiolib: acpi: Fix gpio count with string references
2026-01-29 14:59 [PATCH] gpiolib: acpi: Fix gpio count with string references Alban Bedel
2026-01-30 7:46 ` Mika Westerberg
@ 2026-02-04 10:13 ` Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2026-02-04 10:13 UTC (permalink / raw)
To: linux-gpio, Alban Bedel
Cc: Bartosz Golaszewski, Mika Westerberg, Andy Shevchenko,
Linus Walleij, Bartosz Golaszewski, linux-acpi, linux-kernel
On Thu, 29 Jan 2026 15:59:44 +0100, Alban Bedel wrote:
> Since commit 9880702d123f2 ("ACPI: property: Support using strings in
> reference properties") it is possible to use strings instead of local
> references. This work fine with single GPIO but not with arrays as
> acpi_gpio_package_count() didn't handle this case. Update it to handle
> strings like local references to cover this case as well.
>
>
> [...]
Applied, thanks!
[1/1] gpiolib: acpi: Fix gpio count with string references
https://git.kernel.org/brgl/c/c62e0658d458d8f100445445c3ddb106f3824a45
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-02-04 10:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-29 14:59 [PATCH] gpiolib: acpi: Fix gpio count with string references Alban Bedel
2026-01-30 7:46 ` Mika Westerberg
2026-02-04 10:13 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®