From: Kees Bakker <kees@ijzerbout.nl>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org,
Mika Westerberg <westeri@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>
Subject: Re: [PATCH v1 2/2] gpiolib: acpi: Make sure we fill struct acpi_gpio_info
Date: Fri, 11 Apr 2025 20:22:41 +0200 [thread overview]
Message-ID: <4793eafb-bd9c-4857-a020-944fdb97fb9e@ijzerbout.nl> (raw)
In-Reply-To: <Z_gQyg_JXTBRjisf@surfacebook.localdomain>
Op 10-04-2025 om 20:41 schreef Andy Shevchenko:
> Wed, Apr 09, 2025 at 08:16:59PM +0200, Kees Bakker kirjoitti:
>> Op 09-04-2025 om 15:27 schreef Andy Shevchenko:
> ...
>
>> Can you check and confirm that at least info.gpioint is filled in (or
>> initialized)?
> Yes, I can confirm this. And that's how I have tested it, on Intel
> Edison/Arduino the first GPIO expander (PCAL9555, serviced by
> drivers/gpio/gpio-pca953x.c) is able to deliver an interrupt to the SoC.
>
> Before this series that doesn't show up, now it works as expected.
>
>> The callers of `__acpi_find_gpio` pass in an uninitialized `struct
>> acpi_gpio_info`
> True.
>
>> and after the call they read `info.gpioint`.
> ...when GPIO descriptor is valid.
>
> ...
>
> Yes, I agree that NULLifying info maybe good to have, but I don't see currently
> if we have bugs with it. Can you be more specific in case you have observed
> anything wrong?
Thanks for confirming.
I have nothing specific, just manually reviewing the (new) patch.
So, I guess this code in `acpi_populate_gpio_lookup` takes care of it.
lookup->desc = desc;
info->pin_config = agpio->pin_config;
info->debounce = agpio->debounce_timeout;
info->gpioint = gpioint;
info->wake_capable = acpi_gpio_irq_is_wake(&info->adev->dev,
agpio);
That would sound plausible.
--
Kees
next prev parent reply other threads:[~2025-04-11 18:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-09 13:27 [PATCH v1 0/2] gpiolib: acpi: Fix missing info filling Andy Shevchenko
2025-04-09 13:27 ` [PATCH v1 1/2] gpiolib: acpi: Use temporary variable for struct acpi_gpio_info Andy Shevchenko
2025-04-09 13:27 ` [PATCH v1 2/2] gpiolib: acpi: Make sure we fill " Andy Shevchenko
2025-04-09 18:16 ` Kees Bakker
2025-04-10 18:41 ` Andy Shevchenko
2025-04-11 18:22 ` Kees Bakker [this message]
2025-04-09 13:44 ` [PATCH v1 0/2] gpiolib: acpi: Fix missing info filling Mika Westerberg
2025-04-09 14:50 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4793eafb-bd9c-4857-a020-944fdb97fb9e@ijzerbout.nl \
--to=kees@ijzerbout.nl \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=westeri@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®