gpiolib: cdev: Add hardware timestamp clock type
authorDipen Patel <dipenp@nvidia.com>
Fri, 22 Apr 2022 20:52:18 +0000 (13:52 -0700)
committerThierry Reding <treding@nvidia.com>
Wed, 4 May 2022 09:06:13 +0000 (11:06 +0200)
commit2068339a6c35147847ba433fd0da67b313779059
tree0afe504d45dce232acf40ade38c5af10c8ea2a91
parent10e4afd6cc4bf1b6cc21ad9418bcebdcc18abefb
gpiolib: cdev: Add hardware timestamp clock type

This patch adds new clock type for the GPIO controller which can
timestamp gpio lines in using hardware means. To expose such
functionalities to the userspace, code has been added where
during line create or set config API calls, it checks for new
clock type and if requested, calls HTE API. During line change
event, the HTE subsystem pushes timestamp data to userspace
through gpiolib-cdev.

Signed-off-by: Dipen Patel <dipenp@nvidia.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpio/gpiolib-cdev.c
include/uapi/linux/gpio.h