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