Skip to content

Commit ed94eb2

Browse files
pateldipen1984-nvthierryreding
authored andcommitted
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 <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 2068339 commit ed94eb2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/gpio/gpio-event-mon.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ void print_usage(void)
149149
" -r Listen for rising edges\n"
150150
" -f Listen for falling edges\n"
151151
" -w Report the wall-clock time for events\n"
152+
" -t Report the hardware timestamp for events\n"
152153
" -b <n> Debounce the line with period n microseconds\n"
153154
" [-c <n>] Do <n> loops (optional, infinite loop if not stated)\n"
154155
" -? This helptext\n"
@@ -174,7 +175,7 @@ int main(int argc, char **argv)
174175

175176
memset(&config, 0, sizeof(config));
176177
config.flags = GPIO_V2_LINE_FLAG_INPUT;
177-
while ((c = getopt(argc, argv, "c:n:o:b:dsrfw?")) != -1) {
178+
while ((c = getopt(argc, argv, "c:n:o:b:dsrfwt?")) != -1) {
178179
switch (c) {
179180
case 'c':
180181
loops = strtoul(optarg, NULL, 10);
@@ -208,6 +209,9 @@ int main(int argc, char **argv)
208209
case 'w':
209210
config.flags |= GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME;
210211
break;
212+
case 't':
213+
config.flags |= GPIO_V2_LINE_FLAG_EVENT_CLOCK_HTE;
214+
break;
211215
case '?':
212216
print_usage();
213217
return -1;

0 commit comments

Comments
 (0)