Adding a GPIO IRQ support for Linux lib#3197
Open
villyjayt wants to merge 1 commit into
Open
Conversation
villyjayt
requested review from
CiprianRegus,
RaduSabau1,
amiclaus,
buha,
cristina-suteu,
danmois,
dbogdan,
raezt,
ralucabozdog,
ranechita,
rbolboac,
rbudai98 and
stefpopa
as code owners
July 8, 2026 07:48
Contributor
|
Please sign this CLA, add a proper body/description to the commit and ammend the commit with the -s flag. |
This commit adds a GPIO IRQ option for Linux ecosystems. With this new update, we can allow non-STM32 chips that doesn't support other Linux distros (for instance, RPI CM5), to allow an IRQ trigger for a GPIO device. Signed-off-by: Vtolent3 <villyjay.tolentino@analog.com>
Contributor
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
rbolboac
reviewed
Jul 10, 2026
rbolboac
left a comment
Contributor
There was a problem hiding this comment.
see also the styling errors
| /** Linux platform specific GPIO IRQ platform ops structure. */ | ||
| extern const struct no_os_irq_platform_ops linux_gpio_irq_ops; | ||
|
|
||
| #endif /* LINUX_GPIO_IRQ_H_ */ No newline at end of file |
| .enable = linux_gpio_irq_enable, | ||
| .disable = linux_gpio_irq_disable, | ||
| .remove = linux_gpio_irq_ctrl_remove, | ||
| }; No newline at end of file |
Comment on lines
+576
to
+578
| /** | ||
| * @brief Get the last latched level for a line (1 = HIGH, 0 = LOW). | ||
| */ |
Contributor
There was a problem hiding this comment.
document prams and return for each api
| strncpy(req.consumer, "no_os_gpio_irq", sizeof(req.consumer) - 1); | ||
|
|
||
| ret = ioctl(chip_fd, GPIO_V2_GET_LINE_IOCTL, &req); | ||
| close(chip_fd); |
Contributor
There was a problem hiding this comment.
check for ret before closing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit adds a GPIO IRQ option for Linux ecosystems.
With this new update, we can allow non-STM32 chips that doesn't support other Linux distros (we are using CM5 for this), to allow an IRQ trigger for a GPIO device.
Our exact setup would be: