From 3685bbca001915ff19d19fb76bd64c4eeca8c6d7 Mon Sep 17 00:00:00 2001 From: Ankit Patel Date: Tue, 24 Mar 2020 13:23:37 +0530 Subject: [PATCH] headers : move/modified header for User-space ABI copied/moved/modified headers from the driver directory to the include/uapi directory, which have IOCTL components required to get access from user space as per Linux kernel user-space ABI. Bug 2062672 Signed-off-by: Ankit Patel Change-Id: Ie70b2839e0a1031a685ff3e4bb93c73741645f44 (cherry picked from commit 348c5ff55d7499222f154aea9e9893e6cfa677ce) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2318682 Reviewed-by: automaticguardword Reviewed-by: Bibek Basu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/misc/tegra-cec/tegra_cec.h | 11 ++--------- include/uapi/misc/tegra_cec.h | 31 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 9 deletions(-) create mode 100644 include/uapi/misc/tegra_cec.h diff --git a/drivers/misc/tegra-cec/tegra_cec.h b/drivers/misc/tegra-cec/tegra_cec.h index cd3bdf3d..bbd54153 100644 --- a/drivers/misc/tegra-cec/tegra_cec.h +++ b/drivers/misc/tegra-cec/tegra_cec.h @@ -1,7 +1,7 @@ /* * drivers/misc/tegra-cec/tegra_cec.h * - * Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2012-2020, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -21,6 +21,7 @@ #include #include +#include #define TEGRA_CEC_FRAME_MAX_LENGTH 16 @@ -165,12 +166,4 @@ static int tegra_cec_remove(struct platform_device *pdev); #define TEGRA_CEC_NAME "tegra_cec" -#define TEGRA_CEC_IOC_MAGIC 'C' - -#define TEGRA_CEC_IOCTL_ERROR_RECOVERY _IO(TEGRA_CEC_IOC_MAGIC, 1) -#define TEGRA_CEC_IOCTL_DUMP_REGISTERS _IO(TEGRA_CEC_IOC_MAGIC, 2) -#define TEGRA_CEC_IOCTL_SET_RX_SNOOP _IO(TEGRA_CEC_IOC_MAGIC, 3) -#define TEGRA_CEC_IOCTL_GET_RX_SNOOP _IO(TEGRA_CEC_IOC_MAGIC, 4) -#define TEGRA_CEC_IOCTL_GET_POST_RECOVERY _IO(TEGRA_CEC_IOC_MAGIC, 5) - #endif /* TEGRA_CEC_H */ diff --git a/include/uapi/misc/tegra_cec.h b/include/uapi/misc/tegra_cec.h new file mode 100644 index 00000000..1f4d0cfd --- /dev/null +++ b/include/uapi/misc/tegra_cec.h @@ -0,0 +1,31 @@ +/* + * include/uapi/misc/tegra_cec.h + * + * Copyright (c) 2012-2020, NVIDIA CORPORATION. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + +#ifndef __UAPI_TEGRA_CEC_H +#define __UAPI_TEGRA_CEC_H + +#define TEGRA_CEC_IOC_MAGIC 'C' + +#define TEGRA_CEC_IOCTL_ERROR_RECOVERY _IO(TEGRA_CEC_IOC_MAGIC, 1) +#define TEGRA_CEC_IOCTL_DUMP_REGISTERS _IO(TEGRA_CEC_IOC_MAGIC, 2) +#define TEGRA_CEC_IOCTL_SET_RX_SNOOP _IO(TEGRA_CEC_IOC_MAGIC, 3) +#define TEGRA_CEC_IOCTL_GET_RX_SNOOP _IO(TEGRA_CEC_IOC_MAGIC, 4) +#define TEGRA_CEC_IOCTL_GET_POST_RECOVERY _IO(TEGRA_CEC_IOC_MAGIC, 5) + +#endif /* __UAPI_TEGRA_CEC_H */