On Wed, Oct 22, 2025 at 04:47:34PM +0300, Andy Shevchenko wrote:
On Wed, Oct 22, 2025 at 4:37 PM Hans de Goede hansg@kernel.org wrote:
Commit 16c07342b542 ("gpiolib: acpi: Program debounce when finding GPIO") adds a gpio_set_debounce_timeout() call to acpi_find_gpio() and makes acpi_find_gpio() fail if this fails.
But gpio_set_debounce_timeout() failing is a somewhat normal occurrence, since not all debounce values are supported on all GPIO/pinctrl chips.
Making this an error for example break getting the card-detect GPIO for the micro-sd slot found on many Bay Trail tablets, breaking support for the micro-sd slot on these tablets.
acpi_request_own_gpiod() already treats gpio_set_debounce_timeout() failures as non-fatal, just warning about them.
Add a acpi_gpio_set_debounce_timeout() helper which wraps gpio_set_debounce_timeout() and warns on failures and replace both existing gpio_set_debounce_timeout() calls with the helper.
Since the helper only warns on failures this fixes the card-detect issue.
Acked-by: Andy Shevchenko andy@kernel.org if Bart wants to take this directly.
Never mind, it seems we gotta fix an LKP thingy, I'm about to send a PR out of two patches.