docs: timers: hpet: Modernize and document API
Subsystems (3)
A message that is not in the archive (sent off-list or not yet received): [email protected]
v2 cover docs: timers: hpet: Modernize and document API
This series addresses the feedback from Jonathan Corbet on the initial submission. The work has been split into two separate patches, and the line length has been restricted to under 80 columns.
Habil Eren Türker (2):
docs: timers: hpet: Modernize file references
docs: timers: hpet: Document userspace API and ioctl commands
Documentation/timers/hpet.rst | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-)
Signature · 1 line
2.47.3
PATCH v2 1/2 docs: timers: hpet: Modernize file references
The current HPET documentation contains outdated 'file:' prefixes for source tree references, which breaks proper rendering and hyperlink generation under the modern Sphinx-based documentation ecosystem.
Fix this by modernizing the paths using the standard literal backticks formatting.
--- Documentation/timers/hpet.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/timers/hpet.rst +2 -2
@@ -23,8 +23,8 @@ The driver supports detection of HPET driver allocation and initialization of the HPET before the driver module_init routine is called. This enables platform code which uses timer 0 or 1 as the main timer to intercept HPET initialization. An example of this initialization can be found in -arch/x86/kernel/hpet.c. +``arch/x86/kernel/hpet.c``. The driver provides a userspace API which resembles the API found in the RTC driver framework. An example user space program is provided in -file:samples/timers/hpet_example.c +``samples/timers/hpet_example.c``
Signature · 1 line
2.47.3
Jonathan Corbet
maintainerRe: [PATCH v2 1/2] [PATCH v2 1/2] docs: timers: hpet: Modernize file references
Quoted 18 lines · Habil Eren Türker
The current HPET documentation contains outdated 'file:' prefixes for source tree references, which breaks proper rendering and hyperlink generation under the modern Sphinx-based documentation ecosystem.
Fix this by modernizing the paths using the standard literal backticks formatting.
Signed-off-by Habil Eren Türker <[email protected]>--- Documentation/timers/hpet.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)Documentation/timers/hpet.rst +0
-0@@ -23,8 +23,8 @@ The driver supports detection of HPET driver allocation and initialization of the HPET before the driver module_init routine is called. This enables
Documentation/timers/hpet.rst The driver supports detection of HPET driver allocation and initialization · line 30
Quoted 10 lines
Documentation/timers/hpet.rst +2
-2platform code which uses timer 0 or 1 as the main timer to intercept HPET initialization. An example of this initialization can be found in -arch/x86/kernel/hpet.c. +``arch/x86/kernel/hpet.c``. The driver provides a userspace API which resembles the API found in the RTC driver framework. An example user space program is provided in -file:samples/timers/hpet_example.c +``samples/timers/hpet_example.c``
That last line is something you should really have fixed before sending this patch.
Thanks,
jon
Jonathan Corbet
maintainerRe: [PATCH v2 1/2] [PATCH v2 1/2] docs: timers: hpet: Modernize file references
Quoted 25 lines · Jonathan Corbet
Quoted 23 lines · Habil Eren Türker
The current HPET documentation contains outdated 'file:' prefixes for source tree references, which breaks proper rendering and hyperlink generation under the modern Sphinx-based documentation ecosystem.
Fix this by modernizing the paths using the standard literal backticks formatting.
Signed-off-by Habil Eren Türker <[email protected]>--- Documentation/timers/hpet.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)Documentation/timers/hpet.rst +1
-1@@ -23,8 +23,8 @@ The driver supports detection of HPET driver allocation and initialization of the HPET before the driver module_init routine is called. This enables platform code which uses timer 0 or 1 as the main timer to intercept HPET initialization. An example of this initialization can be found in -arch/x86/kernel/hpet.c. +``arch/x86/kernel/hpet.c``.
Quoted 8 lines
Documentation/timers/hpet.rst The driver supports detection of HPET driver allocation and initialization · line 30
Quoted 5 lines
Documentation/timers/hpet.rst +1
-1The driver provides a userspace API which resembles the API found in the RTC driver framework. An example user space program is provided in -file:samples/timers/hpet_example.c +``samples/timers/hpet_example.c``That last line is something you should really have fixed before sending this patch.
I guess the next patch does fix it, so no need to resend for that.
One other question: did you write these patches yourself, or was there LLM assistance involved? In the latter case, they need Assisted-by tags.
Thanks,
jon
Re: [PATCH v2 1/2] [PATCH v2 1/2] docs: timers: hpet: Modernize file references
Hi Jonathan,
Thanks for the note.
Yes, I used an LLM assistant, and I will resubmit
with the proper "Assisted-by" tags.
To be more specific: the LLM pointed out that the 'file:' prefix is deprecated and suggested using backticks instead.
It also helped correct some typos in the commit message and documentation text.
The rest of the work - identifying the issue, researching, verifying, and resolving it - was entirely my own.
Sorry for the noise; I will send v3 with the correct tags shortly.
Regards,
Türker
v3 cover docs: timers: hpet: Modernize and document API
In reply to Jonathan CorbetThis series updates the HPET (High Precision Event Timer) documentation by updating outdated file paths and documenting the userspace API, including the available ioctl commands.
---
v2 -> v3:
- Add Assisted-by tags to individual patches for LLM assistance.
- Remove stray [PATCH v2 x/2] prefixes from commit subjects.
- Fix a missing newline warning.
v1 -> v2:
- Split the original single patch into a two-patch series.
- Keep the text files less than 80 columns.
Habil Eren Türker (2):
docs: timers: hpet: Modernize file references
docs: timers: hpet: Document userspace API and ioctl commands
Documentation/timers/hpet.rst | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-)
Signature · 1 line
2.47.3
PATCH v3 1/2 docs: timers: hpet: Modernize file references
The current HPET documentation contains outdated 'file:' prefixes for source tree references, which breaks proper rendering and hyperlink generation under the modern Sphinx-based documentation ecosystem.
Fix this by modernizing the paths using the standard literal backticks formatting.
--- Documentation/timers/hpet.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/timers/hpet.rst +2 -2
@@ -23,8 +23,8 @@ The driver supports detection of HPET driver allocation and initialization of the HPET before the driver module_init routine is called. This enables platform code which uses timer 0 or 1 as the main timer to intercept HPET initialization. An example of this initialization can be found in -arch/x86/kernel/hpet.c. +``arch/x86/kernel/hpet.c``. The driver provides a userspace API which resembles the API found in the RTC driver framework. An example user space program is provided in -file:samples/timers/hpet_example.c +``samples/timers/hpet_example.c``
Signature · 1 line
2.47.3
PATCH v3 2/2 docs: timers: hpet: Document userspace API and ioctl commands
In reply to Habil Eren TürkerAdd a dedicated 'Userspace API and ioctl Commands' section to clearly document the supported ioctl interfaces extrapolated from include/uapi/linux/hpet.h, including the layout of struct hpet_info.
--- Documentation/timers/hpet.rst | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
Documentation/timers/hpet.rst +29 -0
@@ -28,3 +28,32 @@ initialization. An example of this initialization can be found in The driver provides a userspace API which resembles the API found in the RTC driver framework. An example user space program is provided in ``samples/timers/hpet_example.c`` + +Userspace API and ioctl Commands +================================ + +* ``HPET_IE_ON`` / ``HPET_IE_OFF`` + Enables or disables the interrupt generation for the timer channel. + +* ``HPET_INFO`` + It is used to query the capabilities and current status of the HPET. + When the ioctl call is made, the kernel populates the ``struct hpet_info`` + structure and returns it to userspace: + + .. code-block:: c + + struct hpet_info { + unsigned long hi_ireqfreq; /* Hz */ + unsigned long hi_flags; /* information */ + unsigned short hi_hpet; + unsigned short hi_timer; + }; + +* ``HPET_EPI`` / ``HPET_DPI`` + Enables or disables periodic interrupts. When activated, the timer + triggers continuously at the specified frequency. + +* ``HPET_IRQFREQ`` + Sets the interrupt frequency for the periodic timer. This request + takes an unsigned long argument specifying the desired frequency in Hz. +
Signature · 1 line
2.47.3
Jonathan Corbet
maintainerQuoted 3 lines · Habil Eren Türker
This series updates the HPET (High Precision Event Timer) documentation by updating outdated file paths and documenting the userspace API, including the available ioctl commands.
A few notes:
- When you send a new version, send it as a new thread rather than as a reply to a previous one.
- The format of the Assisted-by tag is "Assisted-by: LLM"; see Documentation/process/coding-assistants.rst in a reasonably recent kernel.
- Patch 2 generated complaints about the addition of trailing white space; that is something you want to avoid.
I have fixed all of this up and applied the patches; please watch out for these things next time.
jon
Hi Jon,
Thank you for applying the patches and for the detailed feedback. I will make sure to send new versions as separate threads, use the correct Assisted-by tag, and avoid trailing whitespace in the future.
Regards,
Türker
PATCH v2 2/2 docs: timers: hpet: Document userspace API and ioctl commands
In reply to Habil Eren TürkerAdd a dedicated 'Userspace API and ioctl Commands' section to clearly document the supported ioctl interfaces extrapolated from include/uapi/linux/hpet.h, including the layout of struct hpet_info.
--- Documentation/timers/hpet.rst | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-)
Documentation/timers/hpet.rst +29 -1
@@ -27,4 +27,32 @@ initialization. An example of this initialization can be found in The driver provides a userspace API which resembles the API found in the RTC driver framework. An example user space program is provided in -``samples/timers/hpet_example.c`` +``samples/timers/hpet_example.c`` + +Userspace API and ioctl Commands +================================ + +* ``HPET_IE_ON`` / ``HPET_IE_OFF`` + Enables or disables the interrupt generation for the timer channel. + +* ``HPET_INFO`` + It is used to query the capabilities and current status of the HPET. + When the ioctl call is made, the kernel populates the ``struct hpet_info`` + structure and returns it to userspace: + + .. code-block:: c + + struct hpet_info { + unsigned long hi_ireqfreq; /* Hz */ + unsigned long hi_flags; /* information */ + unsigned short hi_hpet; + unsigned short hi_timer; + }; + +* ``HPET_EPI`` / ``HPET_DPI`` + Enables or disables periodic interrupts. When activated, the timer + triggers continuously at the specified frequency. + +* ``HPET_IRQFREQ`` + Sets the interrupt frequency for the periodic timer. This request + takes an unsigned long argument specifying the desired frequency in Hz.
Signature · 1 line
2.47.3