summaryrefslogtreecommitdiff
path: root/drivers/hte/hte-tegra194-test.c
AgeCommit message (Collapse)AuthorFilesLines
2023-10-28hte: tegra: Fix missing error code in tegra_hte_test_probe()Harshit Mogalapalli1-1/+3
The value of 'ret' is zero when of_hte_req_count() fails to get number of entitties to timestamp. And returning success(zero) on this failure path is incorrect. Fixes: 9a75a7cd03c9 ("hte: Add Tegra HTE test driver") Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> Reviewed-by: Dipen Patel <dipenp@nvidia.com> Signed-off-by: Dipen Patel <dipenp@nvidia.com>
2023-04-27hte: tegra-194: Use proper includesLinus Walleij1-5/+4
The test driver uses the gpiod consumer API so include the right <linux/gpio/consumer.h> header. This may cause a problem with struct of_device_id being implcitly pulled in by the legacy header <linux/gpio.h> so include <linux/mod_devicetable.h> explicitly as well. While at it, drop explicit moduleparam.h (it's included with module.h) and sort the headers. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Dipen Patel <dipenp@nvidia.com> Signed-off-by: Dipen Patel <dipenp@nvidia.com>
2023-04-27hte: tegra: fix 'struct of_device_id' build errorArnd Bergmann1-0/+1
Without the extra #include, this driver produces a build failure in some configurations. drivers/hte/hte-tegra194-test.c:96:34: error: array type has incomplete element type 'struct of_device_id' 96 | static const struct of_device_id tegra_hte_test_of_match[] = { Fixes: 9a75a7cd03c9 ("hte: Add Tegra HTE test driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Dipen Patel <dipenp@nvidia.com> Signed-off-by: Dipen Patel <dipenp@nvidia.com>
2023-04-27hte: Add Tegra234 providerDipen Patel1-1/+1
The Tegra234 AON GPIO instance and LIC IRQ support HTE. For the GPIO HTE support, it also requires to add mapping between GPIO and HTE framework same as it was done with Tegra194 SoC. Signed-off-by: Dipen Patel <dipenp@nvidia.com>
2022-05-10hte: Fix possible use-after-free in tegra_hte_test_remove()Yang Yingliang1-1/+1
del_timer() does not wait until the timer handler finishing. This means that the timer handler may still be running after the driver's remove function has finished, which would result in a use-after-free. Fix it by calling del_timer_sync(), which makes sure the timer handler has finished. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Dipen Patel <dipenp@nvidia.com> Acked-by: Dipen Patel <dipenp@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-05-10hte: Remove unused including <linux/version.h>Jiapeng Chong1-1/+0
Eliminate the follow versioncheck warning: ./drivers/hte/hte-tegra194-test.c: 8 linux/version.h not needed. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Reviewed-by: Dipen Patel <dipenp@nvidia.com> Acked-by: Dipen Patel <dipenp@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-05-04hte: Add Tegra HTE test driverDipen Patel1-0/+239
The test driver uses IRQ and GPIO lines to timestamp using HTE subsystem. The patch also adds compilation support in Kconfig and Makefile. Signed-off-by: Dipen Patel <dipenp@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>