From: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx> Linus, as discussed this is the pull-request containing the line watch ioctl() as well as a couple patches picked up during the merge window. Details are in the signed tag. Please pull. The following changes since commit bb6d3fb354c5ee8d6bde2d576eb7220ea09862b9: Linux 5.6-rc1 (2020-02-09 16:08:48 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git tags/gpio-updates-for-v5.7-part1 for you to fetch changes up to 33f0c47b8fb4724792b16351a32b24902a5d3b07: tools: gpio: implement gpio-watch (2020-02-12 12:05:47 +0100) ---------------------------------------------------------------- gpio updates for v5.7 part 1 - make irqs optional in gpio-pxa - improve the logic behind the get() and set() callbacks in gpio-wcd934x - add new kfifo helpers (acked by kfifo maintainer) - rework the locking mechanism for lineevent kfifo - implement a new ioctl() for watching changes on GPIO lines ---------------------------------------------------------------- Axel Lin (2): gpio: wcd934x: Don't change gpio direction in wcd_gpio_set gpio: wcd934x: Fix logic of wcd_gpio_get Bartosz Golaszewski (7): kfifo: provide noirqsave variants of spinlocked in and out helpers kfifo: provide kfifo_is_empty_spinlocked() gpiolib: rework the locking mechanism for lineevent kfifo gpiolib: emit a debug message when adding events to a full kfifo gpiolib: provide a dedicated function for setting lineinfo gpiolib: add new ioctl() for monitoring changes in line info tools: gpio: implement gpio-watch Lubomir Rintel (1): gpio: pxa: Avoid a warning when gpio0 and gpio1 IRQS are not there drivers/gpio/gpio-pxa.c | 4 +- drivers/gpio/gpio-wcd934x.c | 9 +- drivers/gpio/gpiolib.c | 350 ++++++++++++++++++++++++++++++++++---------- drivers/gpio/gpiolib.h | 1 + include/linux/kfifo.h | 73 +++++++++ include/uapi/linux/gpio.h | 30 ++++ tools/gpio/.gitignore | 1 + tools/gpio/Build | 1 + tools/gpio/Makefile | 11 +- tools/gpio/gpio-watch.c | 99 +++++++++++++ 10 files changed, 493 insertions(+), 86 deletions(-) create mode 100644 tools/gpio/gpio-watch.c