mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 01:31:30 +03:00
Port camera drivers below from /kenrel/nvidia to /kernel/nvidia-oot as OOT modules: - Fusa-capture driver - Tegra V4L2 framework driver - vi/csi driver - tegra camera platform driver Change-Id: I390af27096425bb11e0934201dd1a90f001bb3fa Signed-off-by: Frank Chen <frankc@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2780698 Reviewed-by: FNU Raunak <fraunak@nvidia.com> Reviewed-by: Ankur Pawar <ankurp@nvidia.com> Reviewed-by: Shiva Dubey <sdubey@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
103 lines
2.1 KiB
C
103 lines
2.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (c) 2012-2022 NVIDIA Corporation. All rights reserved.
|
|
*/
|
|
|
|
#ifndef __NVC_FOCUS_H__
|
|
#define __NVC_FOCUS_H__
|
|
|
|
/* NVC_FOCUS_CAP_VER0: invalid */
|
|
/* NVC_FOCUS_CAP_VER1:
|
|
* __u32 version
|
|
* __u32 actuator_range
|
|
* __u32 settle_time
|
|
*/
|
|
#define NVC_FOCUS_CAP_VER1 1
|
|
/* NVC_FOCUS_CAP_VER2 adds:
|
|
* __u32 focus_macro;
|
|
* __u32 focus_hyper;
|
|
* __u32 focus_infinity;
|
|
*/
|
|
#define NVC_FOCUS_CAP_VER2 2
|
|
#define NVC_FOCUS_CAP_VER 2 /* latest version */
|
|
|
|
#define AF_POS_INVALID_VALUE INT_MAX
|
|
|
|
/* These are the slew rate values coming down from the configuration */
|
|
/* Disabled is the same as fastest. Default is the default */
|
|
/* slew rate configuration in the focuser */
|
|
#define SLEW_RATE_DISABLED 0
|
|
#define SLEW_RATE_DEFAULT 1
|
|
#define SLEW_RATE_SLOWEST 9
|
|
|
|
|
|
enum nvc_focus_sts {
|
|
NVC_FOCUS_STS_UNKNOWN = 1,
|
|
NVC_FOCUS_STS_NO_DEVICE,
|
|
NVC_FOCUS_STS_INITIALIZING,
|
|
NVC_FOCUS_STS_INIT_ERR,
|
|
NVC_FOCUS_STS_WAIT_FOR_MOVE_END,
|
|
NVC_FOCUS_STS_WAIT_FOR_SETTLE,
|
|
NVC_FOCUS_STS_LENS_SETTLED,
|
|
NVC_FOCUS_STS_FORCE32 = 0x7FFFFFFF
|
|
};
|
|
|
|
struct nvc_focus_nvc {
|
|
__u32 focal_length;
|
|
__u32 fnumber;
|
|
__u32 max_aperture;
|
|
} __packed;
|
|
|
|
struct nvc_focus_cap {
|
|
__u32 version;
|
|
__s32 actuator_range;
|
|
__u32 settle_time;
|
|
__s32 focus_macro;
|
|
__s32 focus_hyper;
|
|
__s32 focus_infinity;
|
|
__u32 slew_rate;
|
|
__u32 position_translate;
|
|
} __packed;
|
|
|
|
|
|
#define NV_FOCUSER_SET_MAX 10
|
|
#define NV_FOCUSER_SET_DISTANCE_PAIR 16
|
|
|
|
struct nv_focuser_set_dist_pairs {
|
|
__s32 fdn;
|
|
__s32 distance;
|
|
} __packed;
|
|
|
|
struct nv_focuser_set {
|
|
__s32 posture;
|
|
__s32 macro;
|
|
__s32 hyper;
|
|
__s32 inf;
|
|
__s32 hysteresis;
|
|
__u32 settle_time;
|
|
__s32 macro_offset;
|
|
__s32 inf_offset;
|
|
__u32 num_dist_pairs;
|
|
struct nv_focuser_set_dist_pairs
|
|
dist_pair[NV_FOCUSER_SET_DISTANCE_PAIR];
|
|
} __packed;
|
|
|
|
struct nv_focuser_config {
|
|
__u32 focal_length;
|
|
__u32 fnumber;
|
|
__u32 max_aperture;
|
|
__u32 range_ends_reversed;
|
|
__s32 pos_working_low;
|
|
__s32 pos_working_high;
|
|
__s32 pos_actual_low;
|
|
__s32 pos_actual_high;
|
|
__u32 slew_rate;
|
|
__u32 circle_of_confusion;
|
|
__u32 num_focuser_sets;
|
|
struct nv_focuser_set focuser_set[NV_FOCUSER_SET_MAX];
|
|
} __packed;
|
|
|
|
|
|
#endif /* __NVC_FOCUS_H__ */
|
|
|