From 33c5afbd77f7d05caa8ad05112e414c74f4c9e04 Mon Sep 17 00:00:00 2001 From: Anuj Gangwar Date: Thu, 2 May 2019 15:25:13 +0530 Subject: include: uapi: move nvpps_ioctl header file Header file nvpps_ioctl have IOCTL definitions, so move the headers files from include/linux/ to include/uapi/linux. Change the path for header in dependent c files. Bug 2062672 Change-Id: I50a3d27978926db0088cb49a30c33eeac46bf83b Signed-off-by: Anuj Gangwar Reviewed-on: https://git-master.nvidia.com/r/2110163 GVS: Gerrit_Virtual_Submit Reviewed-by: Bibek Basu Reviewed-by: mobile promotions Tested-by: mobile promotions --- include/uapi/linux/nvpps_ioctl.h | 69 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 include/uapi/linux/nvpps_ioctl.h (limited to 'include/uapi/linux') diff --git a/include/uapi/linux/nvpps_ioctl.h b/include/uapi/linux/nvpps_ioctl.h new file mode 100644 index 000000000..ac3ca1711 --- /dev/null +++ b/include/uapi/linux/nvpps_ioctl.h @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#ifndef __UAPI_NVPPS_IOCTL_H__ +#define __UAPI_NVPPS_IOCTL_H__ + +#include +#include + + +struct nvpps_version { + struct _version { + __u32 major; + __u32 minor; + } version; + struct _api { + __u32 major; + __u32 minor; + } api; +}; + +#define NVPPS_VERSION_MAJOR 0 +#define NVPPS_VERSION_MINOR 1 +#define NVPPS_API_MAJOR 0 +#define NVPPS_API_MINOR 1 + +struct nvpps_params { + __u32 evt_mode; + __u32 tsc_mode; +}; + + +/* evt_mode */ +#define NVPPS_MODE_GPIO 0x01 +#define NVPPS_MODE_TIMER 0x02 + +/* tsc_mode */ +#define NVPPS_TSC_NSEC 0 +#define NVPPS_TSC_COUNTER 1 + + +struct nvpps_timeevent { + __u32 evt_nb; + __u64 tsc; + __u64 ptp; + __u64 tsc_res_ns; + __u32 evt_mode; + __u32 tsc_mode; + __u64 irq_latency; +}; + + +#define NVPPS_GETVERSION _IOR('p', 0x1, struct nvpps_version *) +#define NVPPS_GETPARAMS _IOR('p', 0x2, struct nvpps_params *) +#define NVPPS_SETPARAMS _IOW('p', 0x3, struct nvpps_params *) +#define NVPPS_GETEVENT _IOR('p', 0x4, struct nvpps_timeevent *) + +#endif /* __UAPI_NVPPS_IOCTL_H__ */ -- cgit v1.2.2