diff options
author | Emmanuel Vadot <manu@FreeBSD.org> | 2020-04-11 15:25:40 +0000 |
---|---|---|
committer | Emmanuel Vadot <manu@FreeBSD.org> | 2020-04-11 15:25:40 +0000 |
commit | 19602a38693a95ebf8995520b6b6f9c9131bfd83 (patch) | |
tree | f2c6e1b5a0ffb1b719bc66c220c97c3b983ddc13 /usr.sbin/gpioctl/gpioctl.c | |
parent | 62d95afacb84a8f0099e1ed888dd49ef3cb10626 (diff) | |
download | src-19602a38693a95ebf8995520b6b6f9c9131bfd83.tar.gz src-19602a38693a95ebf8995520b6b6f9c9131bfd83.zip |
gpioctl: Print interrupts capabilities
GPIO drivers who supports interrupts report them in the caps
(obtain via the getcaps method) but gpioctl doesn't know
how to interpret this and print "UNKNOWN" for each one of them.
Even if we don't have userland gpio interrupts support for now
let gpioctl print the supported caps.
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D24133
Notes
Notes:
svn path=/head/; revision=359805
Diffstat (limited to 'usr.sbin/gpioctl/gpioctl.c')
-rw-r--r-- | usr.sbin/gpioctl/gpioctl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.sbin/gpioctl/gpioctl.c b/usr.sbin/gpioctl/gpioctl.c index 04068f49bd02..060ea4ef0e90 100644 --- a/usr.sbin/gpioctl/gpioctl.c +++ b/usr.sbin/gpioctl/gpioctl.c @@ -62,6 +62,11 @@ static struct flag_desc gpio_flags[] = { { "II", GPIO_PIN_INVIN }, { "IO", GPIO_PIN_INVOUT }, { "PULSE", GPIO_PIN_PULSATE }, + { "INTRLL", GPIO_INTR_LEVEL_LOW}, + { "INTRLH", GPIO_INTR_LEVEL_HIGH}, + { "INTRER", GPIO_INTR_EDGE_RISING}, + { "INTREF", GPIO_INTR_EDGE_FALLING}, + { "INTREB", GPIO_INTR_EDGE_BOTH}, { NULL, 0 }, }; |