mirror of
https://github.com/apache/nuttx.git
synced 2026-08-22 14:08:30 +00:00
status() reads one reset line at a time, and only for a caller that already knows the id. Nothing else in the interface says how many lines a controller has or what any of them resets, so the lines a board is holding cannot be surveyed. Adds an optional get_line method describing one line as a structure: its name, and a text member for controller specific fields the structure does not cover. The asserted state stays with status(), which already reports it, so a controller does not supply the same fact twice. Returning -ENODEV reports an id that names no line, which is how controllers with gaps in their numbering are handled. reset_controller_dev gains the line count that bounds the ids. CONFIG_RESET_PROCFS adds /proc/reset, one key:value line per reset line, every line the same tokens in the same order so the file is machine parseable. A controller without get_line is listed by name and a note. The controller list already existed for reset_control_get() to search, so the renderer only walks what was there. /proc/reset is claimed when the first controller registers; procfs_register() requires that procfs is not yet mounted, which holds because controllers register during board or architecture start up, and it appends without checking for duplicates, so the entry is claimed once for the lifetime of the system. Documents the framework, which had a page with nothing on it: the consumer interface and what shared and exclusive handles mean, the controller interface, the new method, and /proc/reset. Off by default and costs nothing when off. No in-tree configuration enables RESET, so this builds only when a board turns it on. Assisted-by: Claude:claude-opus-5 Signed-off-by: Justin Hammond <justin@dynam.ac> |
||
|---|---|---|
| .. | ||
| android | ||
| arpa | ||
| crypto | ||
| cxx | ||
| net | ||
| netinet | ||
| netpacket | ||
| nuttx | ||
| ssp | ||
| sys | ||
| .gitignore | ||
| aio.h | ||
| alloca.h | ||
| assert.h | ||
| byteswap.h | ||
| ctype.h | ||
| debug.h | ||
| dirent.h | ||
| dlfcn.h | ||
| dsp.h | ||
| dspb16.h | ||
| elf.h | ||
| elf32.h | ||
| elf64.h | ||
| endian.h | ||
| err.h | ||
| errno.h | ||
| execinfo.h | ||
| fcntl.h | ||
| fixedmath.h | ||
| fnmatch.h | ||
| ftw.h | ||
| gcov.h | ||
| getopt.h | ||
| glob.h | ||
| grp.h | ||
| hex2bin.h | ||
| iconv.h | ||
| ifaddrs.h | ||
| imx_container.h | ||
| inttypes.h | ||
| iso646.h | ||
| langinfo.h | ||
| libgen.h | ||
| libintl.h | ||
| limits.h | ||
| locale.h | ||
| lzf.h | ||
| malloc.h | ||
| mqueue.h | ||
| netdb.h | ||
| nl_types.h | ||
| nxflat.h | ||
| obstack.h | ||
| poll.h | ||
| pthread.h | ||
| pty.h | ||
| pwd.h | ||
| regex.h | ||
| resolv.h | ||
| sched.h | ||
| search.h | ||
| semaphore.h | ||
| shadow.h | ||
| signal.h | ||
| spawn.h | ||
| stdbool.h | ||
| stddef.h | ||
| stdint.h | ||
| stdio.h | ||
| stdlib.h | ||
| stdnoreturn.h | ||
| string.h | ||
| strings.h | ||
| syscall.h | ||
| syslog.h | ||
| termios.h | ||
| threads.h | ||
| time.h | ||
| ulimit.h | ||
| unistd.h | ||
| utime.h | ||
| uuid.h | ||
| wait.h | ||
| wchar.h | ||
| wctype.h | ||