Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dipen Patel and committed by
Thierry Reding
ed94eb2e 2068339a

+5 -1
+5 -1
tools/gpio/gpio-event-mon.c
··· 149 149 " -r Listen for rising edges\n" 150 150 " -f Listen for falling edges\n" 151 151 " -w Report the wall-clock time for events\n" 152 + " -t Report the hardware timestamp for events\n" 152 153 " -b <n> Debounce the line with period n microseconds\n" 153 154 " [-c <n>] Do <n> loops (optional, infinite loop if not stated)\n" 154 155 " -? This helptext\n" ··· 175 174 176 175 memset(&config, 0, sizeof(config)); 177 176 config.flags = GPIO_V2_LINE_FLAG_INPUT; 178 - while ((c = getopt(argc, argv, "c:n:o:b:dsrfw?")) != -1) { 177 + while ((c = getopt(argc, argv, "c:n:o:b:dsrfwt?")) != -1) { 179 178 switch (c) { 180 179 case 'c': 181 180 loops = strtoul(optarg, NULL, 10); ··· 208 207 break; 209 208 case 'w': 210 209 config.flags |= GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME; 210 + break; 211 + case 't': 212 + config.flags |= GPIO_V2_LINE_FLAG_EVENT_CLOCK_HTE; 211 213 break; 212 214 case '?': 213 215 print_usage();