[PATCH v2 2/2] [PATCH v2 2/2] docs: timers: hpet: Document userspace API and ioctl commands

From: Habil Eren Türker

Date: Sat Sep 26 2026 - 14:09:50 EST


Add 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.

Signed-off-by: Habil Eren Türker <habilerenturker@xxxxxxxxxxx>
---
Documentation/timers/hpet.rst | 30 +++++++++++++++++++++++++++++-
1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/Documentation/timers/hpet.rst b/Documentation/timers/hpet.rst
index fe02bfd5d..cc9fb3e37 100644
--- a/Documentation/timers/hpet.rst
+++ b/Documentation/timers/hpet.rst
@@ -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``
\ No newline at end of file
+``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.
--
2.47.3