Skip to content

Commit 31ab09b

Browse files
pateldipen1984-nvthierryreding
authored andcommitted
drivers: Add hardware timestamp engine (HTE) subsystem
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 <[email protected]> Reported-by: kernel test robot <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 6406ac6 commit 31ab09b

File tree

6 files changed

+1237
-0
lines changed

6 files changed

+1237
-0
lines changed

drivers/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,4 +239,6 @@ source "drivers/most/Kconfig"
239239

240240
source "drivers/peci/Kconfig"
241241

242+
source "drivers/hte/Kconfig"
243+
242244
endmenu

drivers/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,4 @@ obj-$(CONFIG_INTERCONNECT) += interconnect/
188188
obj-$(CONFIG_COUNTER) += counter/
189189
obj-$(CONFIG_MOST) += most/
190190
obj-$(CONFIG_PECI) += peci/
191+
obj-$(CONFIG_HTE) += hte/

drivers/hte/Kconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
menuconfig HTE
3+
bool "Hardware Timestamping Engine (HTE) Support"
4+
help
5+
Hardware Timestamping Engine (HTE) Support.
6+
7+
Some devices provide a hardware timestamping engine which can
8+
timestamp certain device lines/signals in realtime. It comes with a
9+
benefit for the applications needing accurate timestamping event with
10+
less jitter. This framework provides a generic interface to such HTE
11+
providers and consumer devices.
12+
13+
If unsure, say no.
14+

drivers/hte/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
obj-$(CONFIG_HTE) += hte.o
2+

0 commit comments

Comments
 (0)