5 Commits

Author SHA1 Message Date
Jeremy90307
bde77a155e Allow GPIO example built with Linux v6.10+
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
2024-12-11 17:16:15 +08:00
Jim Huang
9952f38afb Fix style 2024-04-21 01:12:33 +08:00
Yo-Jung Lin
0c3aaac3c1 Pass proper cookies to the request_threaded_irq
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
2024-04-21 01:09:32 +08:00
Yo-Jung Lin
65397e2d53 Correct the IRQ numbers passed to the request_threaded_irq 2024-04-21 01:09:32 +08:00
Jim Huang
56f566abe6 Provide a tasklet-free example
Co-authored-by: Bob Mottram <bob@freedombone.net>
2024-04-21 01:09:28 +08:00