Commit ed94eb2e authored by Dipen Patel's avatar Dipen Patel Committed by Thierry Reding

tools: gpio: Add new hardware clock type

gpiolib-cdev is extended to support hardware clock type, this
patch reflects that fact.
Signed-off-by: default avatarDipen Patel <dipenp@nvidia.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent 2068339a
...@@ -149,6 +149,7 @@ void print_usage(void) ...@@ -149,6 +149,7 @@ void print_usage(void)
" -r Listen for rising edges\n" " -r Listen for rising edges\n"
" -f Listen for falling edges\n" " -f Listen for falling edges\n"
" -w Report the wall-clock time for events\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" " -b <n> Debounce the line with period n microseconds\n"
" [-c <n>] Do <n> loops (optional, infinite loop if not stated)\n" " [-c <n>] Do <n> loops (optional, infinite loop if not stated)\n"
" -? This helptext\n" " -? This helptext\n"
...@@ -174,7 +175,7 @@ int main(int argc, char **argv) ...@@ -174,7 +175,7 @@ int main(int argc, char **argv)
memset(&config, 0, sizeof(config)); memset(&config, 0, sizeof(config));
config.flags = GPIO_V2_LINE_FLAG_INPUT; 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) { switch (c) {
case 'c': case 'c':
loops = strtoul(optarg, NULL, 10); loops = strtoul(optarg, NULL, 10);
...@@ -208,6 +209,9 @@ int main(int argc, char **argv) ...@@ -208,6 +209,9 @@ int main(int argc, char **argv)
case 'w': case 'w':
config.flags |= GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME; config.flags |= GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME;
break; break;
case 't':
config.flags |= GPIO_V2_LINE_FLAG_EVENT_CLOCK_HTE;
break;
case '?': case '?':
print_usage(); print_usage();
return -1; return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment