Since the commit dbcedec ("gpiolib: legacy: Remove unused
gpio_request_array() and gpio_free_array()"), these functions had no
users in kernel and were subsequently removed to simplify the library.
These functions have been removed from GPIO examples for Linux
v6.10+ to ensure compatibility across all kernel versions.
Testing detail:
- Tested on Raspberry Pi 5B with Raspberry Pi OS (Debian 12, Linux
version 6.12.1-v8-16k+)
- Verified the GPIO examples compile and load successfully
- Verified GPIO17 interrupt turns on the LED (GPIO4)
- Verified GPIO18 interrupt turns off the LED (GPIO4)
Close#285
The last parameter of request_threaded_irq must be a globally unique
cookie[1]. Usually this would be the device struct received by probe().
Since we are not using driver model, pass the gpio structs instead.
[1] https://docs.kernel.org/core-api/genericirq.html