WDOG: Output status on read#19518
Open
Javinator9889 wants to merge 1 commit into
Open
Conversation
Javinator9889
force-pushed
the
feat/wdog-read_return_current_status
branch
2 times, most recently
from
July 24, 2026 10:37
aa7c60e to
ecc59cb
Compare
Contributor
|
@Javinator9889 please squash your change into one patch. |
Currently, the `read` function of the watchdog device is dummy and does nothing. Although this is fine, it's not useful at all from a userspace perspective, where you may want to check the current WDOG status. A wrapper around the `ioctl` `WDIOC_GETSTATUS` has been added as the `read` function for the WDOG. Signed-off-by: Javier Alonso <javieralonso@geotab.com>
Javinator9889
force-pushed
the
feat/wdog-read_return_current_status
branch
from
July 24, 2026 13:38
bfb9a3d to
265caef
Compare
Contributor
Author
|
@xiaoxiang781216 squashed and force-pushed |
xiaoxiang781216
approved these changes
Jul 24, 2026
acassis
requested changes
Jul 24, 2026
Contributor
There was a problem hiding this comment.
@Javinator9889 please Document this new feature here: https://nuttx.apache.org/docs/latest/components/drivers/character/timers/watchdog.html
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.
Summary
Currently, the
readfunction of the watchdog device is dummy and does nothing. Although this is fine, it's not useful at all from a userspace perspective, where you may want to check the current WDOG status.A wrapper around the
ioctlWDIOC_GETSTATUShas been added as thereadfunction for the WDOG.Impact
This should help debugging and developers with watchdog-enabled systems
Testing
The testing in this case is quite straightforward:
cat /dev/watchdog0, whose output was: