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>
This commit is contained in:
parent
10e4afd6cc
commit
2068339a6c
2 changed files with 222 additions and 33 deletions
|
|
@ -66,6 +66,8 @@ struct gpiochip_info {
|
|||
* @GPIO_V2_LINE_FLAG_BIAS_PULL_DOWN: line has pull-down bias enabled
|
||||
* @GPIO_V2_LINE_FLAG_BIAS_DISABLED: line has bias disabled
|
||||
* @GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME: line events contain REALTIME timestamps
|
||||
* @GPIO_V2_LINE_FLAG_EVENT_CLOCK_HTE: line events contain timestamps from
|
||||
* hardware timestamp engine
|
||||
*/
|
||||
enum gpio_v2_line_flag {
|
||||
GPIO_V2_LINE_FLAG_USED = _BITULL(0),
|
||||
|
|
@ -80,6 +82,7 @@ enum gpio_v2_line_flag {
|
|||
GPIO_V2_LINE_FLAG_BIAS_PULL_DOWN = _BITULL(9),
|
||||
GPIO_V2_LINE_FLAG_BIAS_DISABLED = _BITULL(10),
|
||||
GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME = _BITULL(11),
|
||||
GPIO_V2_LINE_FLAG_EVENT_CLOCK_HTE = _BITULL(12),
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue