1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
#ifndef _DW9718AF_H
#define _DW9718AF_H
#include <linux/ioctl.h>
/* #include "kd_imgsensor.h" */
#define DW9718AF_MAGIC 'A'
/* IOCTRL(inode * ,file * ,cmd ,arg ) */
/* Structures */
typedef struct {
/* current position */
u32 u4CurrentPosition;
/* macro position */
u32 u4MacroPosition;
/* Infiniti position */
u32 u4InfPosition;
/* Motor Status */
bool bIsMotorMoving;
/* Motor Open? */
bool bIsMotorOpen;
/* Support SR? */
bool bIsSupportSR;
} stDW9718AF_MotorInfo;
/* Structures */
/* #define LensdrvCM3 */
#ifdef LensdrvCM3
typedef struct {
/* APERTURE , won't be supported on most devices. */
float Aperture;
/* FILTER_DENSITY, won't be supported on most devices. */
float FilterDensity;
/* FOCAL_LENGTH, lens optical zoom setting. won't be supported on most devices. */
float FocalLength;
/* FOCAL_DISTANCE, current focus distance, lens to objects. */
float FocalDistance;
/* OPTICAL_STABILIZATION_MODE */
u16 u4OIS_Mode;
/* FACING */
u16 Facing;
/* Optical axis angle, optical axis is perpendicular to LCM, usually is {0,0}. */
float OpticalAxisAng[2];
/* Optical axis position (mm), usually is {0,0,0}. */
float Position[3];
/* Focus range, DOF, */
float FocusRange;
/* State */
u16 State;
/* INFO */
float InfoAvalibleMinFocusDistance;
float InfoAvalibleApertures;
float InfoAvalibleFilterDensity;
u16 InfoAvalibleOptStabilization;
float InfoAvalibleFocalLength;
float InfoAvalibleHypeDistance;
} stDW9718AF_MotorMETAInfo;
#endif
/* Control commnad */
/* S means "set through a ptr" */
/* T means "tell by a arg value" */
/* G means "get by a ptr" */
/* Q means "get by return a value" */
/* X means "switch G and S atomically" */
/* H means "switch T and Q atomically" */
#define DW9718AFIOC_G_MOTORINFO _IOR(DW9718AF_MAGIC, 0, stDW9718AF_MotorInfo)
#define DW9718AFIOC_T_MOVETO _IOW(DW9718AF_MAGIC, 1, u32)
#define DW9718AFIOC_T_SETINFPOS _IOW(DW9718AF_MAGIC, 2, u32)
#define DW9718AFIOC_T_SETMACROPOS _IOW(DW9718AF_MAGIC, 3, u32)
#ifdef LensdrvCM3
#define DW9718AFIOC_G_MOTORMETAINFO _IOR(DW9718AF_MAGIC, 4, stDW9718AF_MotorMETAInfo)
#endif
#else
#endif
|