Skip to content

Commit

Permalink
drivers: Add hardware timestamp engine (HTE) subsystem
Browse files Browse the repository at this point in the history
Some devices can timestamp system lines/signals/Buses in real-time
using the hardware counter or other hardware means which can give
finer granularity and help avoid jitter introduced by software
timestamping. To utilize such functionality, this patchset creates
HTE subsystem where devices can register themselves as providers so
that the consumers devices can request specific line from the
providers. The patch also adds compilation support in Makefile and
menu options in Kconfig.

The provider does following:
- Registers chip with the framework.
- Provides translation hook to convert logical line id.
- Provides enable/disable, request/release callbacks.
- Pushes timestamp data to HTE subsystem.

The consumer does following:
- Initializes line attribute.
- Gets HTE timestamp descriptor.
- Requests timestamp functionality.
- Puts HTE timestamp descriptor.

Signed-off-by: Dipen Patel <dipenp@nvidia.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
  • Loading branch information
Dipen Patel authored and Thierry Reding committed May 4, 2022
1 parent 6406ac6 commit 31ab09b
Show file tree
Hide file tree
Showing 6 changed files with 1,237 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -239,4 +239,6 @@ source "drivers/most/Kconfig"

source "drivers/peci/Kconfig"

source "drivers/hte/Kconfig"

endmenu
1 change: 1 addition & 0 deletions drivers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,4 @@ obj-$(CONFIG_INTERCONNECT) += interconnect/
obj-$(CONFIG_COUNTER) += counter/
obj-$(CONFIG_MOST) += most/
obj-$(CONFIG_PECI) += peci/
obj-$(CONFIG_HTE) += hte/
14 changes: 14 additions & 0 deletions drivers/hte/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SPDX-License-Identifier: GPL-2.0-only
menuconfig HTE
bool "Hardware Timestamping Engine (HTE) Support"
help
Hardware Timestamping Engine (HTE) Support.

Some devices provide a hardware timestamping engine which can
timestamp certain device lines/signals in realtime. It comes with a
benefit for the applications needing accurate timestamping event with
less jitter. This framework provides a generic interface to such HTE
providers and consumer devices.

If unsure, say no.

2 changes: 2 additions & 0 deletions drivers/hte/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
obj-$(CONFIG_HTE) += hte.o

Loading

0 comments on commit 31ab09b

Please sign in to comment.