diff options
| author | elilliebjerg <elilliebjerg@nvidia.com> | 2020-05-12 06:36:56 -0400 |
|---|---|---|
| committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2020-11-13 21:41:10 -0500 |
| commit | 650e8445d622abd37453e634485412f479847e30 (patch) | |
| tree | 8e75b22dd57b87faa698acc784e4c72a4940c262 /include/linux | |
| parent | 8e39a283a4a757c81b6e1e91d839802bac346de8 (diff) | |
misc: nvs: Add NVS GTE support
- Add the Tegra hardware Generic Timestamping Engine support to the
NVidia Sensor framework.
- Use CONFIG_NVS_GTE in Linux kernel config.
Bug 3046736
Bug 2975033
Change-Id: I55397436ee635cdaf7788a3c5d6dc384601940df
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2342800
(cherry picked from commit 79de33624bb9f6cf10f77251039143d5d3128715)
Signed-off-by: elilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2439322
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/nvs_gte.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/include/linux/nvs_gte.h b/include/linux/nvs_gte.h new file mode 100644 index 000000000..f1b4ca15c --- /dev/null +++ b/include/linux/nvs_gte.h | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | /* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. | ||
| 2 | * | ||
| 3 | * This program is free software; you can redistribute it and/or modify it | ||
| 4 | * under the terms and conditions of the GNU General Public License version 2 | ||
| 5 | * as published by the Free Software Foundation. | ||
| 6 | * | ||
| 7 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 8 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 9 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 10 | * more details. | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef _NVS_GTE_IRQ_H_ | ||
| 14 | #define _NVS_GTE_IRQ_H_ | ||
| 15 | |||
| 16 | #include <linux/device.h> | ||
| 17 | |||
| 18 | struct nvs_gte_irq { | ||
| 19 | void *gte; | ||
| 20 | const char *dev_name; | ||
| 21 | int gpio; | ||
| 22 | int irq; | ||
| 23 | u64 irq_ts; | ||
| 24 | u64 err_n; | ||
| 25 | }; | ||
| 26 | |||
| 27 | struct nvs_gte_sts { | ||
| 28 | unsigned int ver; | ||
| 29 | char *gte; | ||
| 30 | char *err; | ||
| 31 | u64 ts_ns; | ||
| 32 | u64 ts_raw; | ||
| 33 | }; | ||
| 34 | |||
| 35 | int nvs_gte_ts(struct nvs_gte_irq *ngi); | ||
| 36 | int nvs_gte_exit(struct device *dev, struct nvs_gte_irq *ngi, unsigned int n); | ||
| 37 | int nvs_gte_init(struct device *dev, struct nvs_gte_irq *ngi, unsigned int n); | ||
| 38 | int nvs_gte_sts(struct nvs_gte_irq *ngi, struct nvs_gte_sts *ngs); | ||
| 39 | |||
| 40 | #endif /* _NVS_GTE_IRQ_H_ */ | ||
| 41 | |||
