media: camera: Build CDI as OOT module

Convert automotive CDI kernel driver to OOT module.

Jira CAMERASW-7592

Change-Id: Ib19ee594cc65f8041f6eba9aff7faefb753b771b
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2780572
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Frank Chen
2022-09-22 10:47:59 -07:00
committed by mobile promotions
parent 0e0d2f2c07
commit 9ad6f3c84e
19 changed files with 4200 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2020-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#ifndef __UAPI_CDI_DEV_H__
#define __UAPI_CDI_DEV_H__
#include <linux/ioctl.h>
#include <linux/types.h>
#define CDI_DEV_PKG_FLAG_WR 1
#define CDI_DEV_IOCTL_RW _IOW('o', 1, struct cdi_dev_package)
#define CDI_DEV_IOCTL_GET_PWR_INFO _IOW('o', 2, struct cdi_dev_pwr_ctrl_info)
#define DES_PWR_NVCCP 0U
#define DES_PWR_GPIO 1U
#define DES_PWR_NO_PWR 0xFFU
#define CAM_PWR_NVCCP 0U
#define CAM_PWR_MAX20087 1U
#define CAM_PWR_NO_PWR 0xFFU
#define MAX_POWER_LINKS_PER_BLOCK (4U)
struct __attribute__ ((__packed__)) cdi_dev_pwr_ctrl_info {
__s8 cam_pwr_method;
__s8 cam_pwr_i2c_addr;
__u8 cam_pwr_links[MAX_POWER_LINKS_PER_BLOCK];
};
struct __attribute__ ((__packed__)) cdi_dev_package {
__u16 offset;
__u16 offset_len;
__u32 size;
__u32 flags;
unsigned long buffer;
};
#endif /* __UAPI_CDI_DEV_H__ */