import PULS_20160108
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / misc / mediatek / lens / mt8127 / inc / AD5823.h
CommitLineData
6fa3eb70
S
1#ifndef _AD5823_H
2#define _AD5823_H
3
4#include <linux/ioctl.h>
5/* #include "kd_imgsensor.h" */
6
7#define AD5823_MAGIC 'A'
8/* IOCTRL(inode * ,file * ,cmd ,arg ) */
9
10
11/* Structures */
12typedef struct {
13/* current position */
14 u32 u4CurrentPosition;
15/* macro position */
16 u32 u4MacroPosition;
17/* Infiniti position */
18 u32 u4InfPosition;
19/* Motor Status */
20 bool bIsMotorMoving;
21/* Motor Open? */
22 bool bIsMotorOpen;
23/* Support SR? */
24 bool bIsSupportSR;
25} stAD5823_MotorInfo;
26
27/* Control commnad */
28/* S means "set through a ptr" */
29/* T means "tell by a arg value" */
30/* G means "get by a ptr" */
31/* Q means "get by return a value" */
32/* X means "switch G and S atomically" */
33/* H means "switch T and Q atomically" */
34#define AD5823IOC_G_MOTORINFO _IOR(AD5823_MAGIC, 0, stAD5823_MotorInfo)
35
36#define AD5823IOC_T_MOVETO _IOW(AD5823_MAGIC, 1, u32)
37
38#define AD5823IOC_T_SETINFPOS _IOW(AD5823_MAGIC, 2, u32)
39
40#define AD5823IOC_T_SETMACROPOS _IOW(AD5823_MAGIC, 3, u32)
41
42#else
43#endif