tegra-cec: make tegra-cec as loadable module.

This change makes tegra-cec driver as loadable module
and adds uapi tegra_cec.h file for IOCTL interface.

Verification:
Verified on orin-slt with basic cec tx-rx data with TV.

bug 4954851

Change-Id: Id3ca696429b2897aa9d80604a365f3221c94a770
Signed-off-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3273953
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Prafull Suryawanshi
2024-12-24 06:20:15 +00:00
committed by Jon Hunter
parent 27e8c7ae95
commit ce33039eea
2 changed files with 23 additions and 0 deletions

View File

@@ -818,3 +818,9 @@ static struct platform_driver tegra_cec_driver = {
.resume = tegra_cec_resume,
#endif
};
module_platform_driver(tegra_cec_driver);
MODULE_DESCRIPTION("Tegra CEC Driver");
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Prafull Suryawanshi <prafulls@nvidia.com>");

View File

@@ -0,0 +1,17 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* SPDX-FileCopyrightText: Copyright (c) 2012-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#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 */