Commit e4a77f9
gpiolib: acpi: Make set debounce errors non fatal
Commit 16c0734 ("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.
Fixes: 16c0734 ("gpiolib: acpi: Program debounce when finding GPIO")
Cc: stable@vger.kernel.org
Cc: Mario Limonciello <superm1@kernel.org>
Signed-off-by: Hans de Goede <hansg@kernel.org>
Acked-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/stable/20250920201200.20611-1-hansg%40kernel.org
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>1 parent 3a86608 commit e4a77f9
1 file changed
Lines changed: 15 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
294 | 307 | | |
295 | 308 | | |
296 | 309 | | |
| |||
300 | 313 | | |
301 | 314 | | |
302 | 315 | | |
303 | | - | |
304 | 316 | | |
305 | 317 | | |
306 | 318 | | |
307 | 319 | | |
308 | 320 | | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
| 321 | + | |
315 | 322 | | |
316 | 323 | | |
317 | 324 | | |
| |||
944 | 951 | | |
945 | 952 | | |
946 | 953 | | |
947 | | - | |
948 | 954 | | |
949 | 955 | | |
950 | 956 | | |
| |||
959 | 965 | | |
960 | 966 | | |
961 | 967 | | |
962 | | - | |
963 | | - | |
964 | | - | |
965 | | - | |
| 968 | + | |
966 | 969 | | |
967 | 970 | | |
968 | 971 | | |
| |||
0 commit comments