Nicholas Chin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/87468?usp=email )
Change subject: [POC] Docs/lib/timestamp.md: Use kernel-doc for API documentation ......................................................................
[POC] Docs/lib/timestamp.md: Use kernel-doc for API documentation
API documentation written on doc.coreboot.org is likely to go out of date when the code is changed, whereas docstrings directly in the code are more likely to be updated. As a proof of concept, use kernel-doc to generate function documentation for `include/timestamp.h`.
The existing instructions on https://doc.coreboot.org/getting_started/writing_documentation.html should work to build and view the kernel-doc enabled documentation.
Change-Id: I9c36efaf663142535309eb74fb58b4c698eccc27 Signed-off-by: Nicholas Chin nic.c3.14@gmail.com --- M Documentation/lib/timestamp.md 1 file changed, 12 insertions(+), 16 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/68/87468/1
diff --git a/Documentation/lib/timestamp.md b/Documentation/lib/timestamp.md index a769f99..98e65f0 100644 --- a/Documentation/lib/timestamp.md +++ b/Documentation/lib/timestamp.md @@ -122,24 +122,20 @@
## Function APIs
-### timestamp_init +```{eval-rst} +.. kernel-doc:: src/include/timestamp.h + :identifiers: timestamp_init +```
-This function initializes the timestamp cache and should be run as early -as possible. On platforms with SRAM, this might mean in bootblock, on -x86 with its CAR backed memory in romstage, this means romstage before -memory init. +```{eval-rst} +.. kernel-doc:: src/include/timestamp.h + :identifiers: timestamp_add +```
-### timestamp_add - -This function accepts from user a timestamp id and time to record in the -timestamp table. It stores the entry in the appropriate table in cbmem -or `_timestamp` region or local stash. - - -### timestamp_add_now - -This function calls `timestamp_add` with user-provided id and current time. - +```{eval-rst} +.. kernel-doc:: src/include/timestamp.h + :identifiers: timestamp_add_now +```
## Use / Test Cases