summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDipen Patel <dipenp@nvidia.com>2022-04-22 22:52:19 +0200
committerThierry Reding <treding@nvidia.com>2022-05-04 11:06:14 +0200
commited94eb2e22846e04ea32fe2282b49cb293ae88e2 (patch)
tree2c26125aee226cd79b7edb0972d522bc8503742c /tools
parentgpiolib: cdev: Add hardware timestamp clock type (diff)
downloadlinux-ed94eb2e22846e04ea32fe2282b49cb293ae88e2.tar.xz
linux-ed94eb2e22846e04ea32fe2282b49cb293ae88e2.zip
tools: gpio: Add new hardware clock type
gpiolib-cdev is extended to support hardware clock type, this patch reflects that fact. Signed-off-by: Dipen Patel <dipenp@nvidia.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/gpio/gpio-event-mon.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/gpio/gpio-event-mon.c b/tools/gpio/gpio-event-mon.c
index a2b233fdb572..6c122952c589 100644
--- a/tools/gpio/gpio-event-mon.c
+++ b/tools/gpio/gpio-event-mon.c
@@ -149,6 +149,7 @@ void print_usage(void)
" -r Listen for rising edges\n"
" -f Listen for falling edges\n"
" -w Report the wall-clock time for events\n"
+ " -t Report the hardware timestamp for events\n"
" -b <n> Debounce the line with period n microseconds\n"
" [-c <n>] Do <n> loops (optional, infinite loop if not stated)\n"
" -? This helptext\n"
@@ -174,7 +175,7 @@ int main(int argc, char **argv)
memset(&config, 0, sizeof(config));
config.flags = GPIO_V2_LINE_FLAG_INPUT;
- while ((c = getopt(argc, argv, "c:n:o:b:dsrfw?")) != -1) {
+ while ((c = getopt(argc, argv, "c:n:o:b:dsrfwt?")) != -1) {
switch (c) {
case 'c':
loops = strtoul(optarg, NULL, 10);
@@ -208,6 +209,9 @@ int main(int argc, char **argv)
case 'w':
config.flags |= GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME;
break;
+ case 't':
+ config.flags |= GPIO_V2_LINE_FLAG_EVENT_CLOCK_HTE;
+ break;
case '?':
print_usage();
return -1;