aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc/mediatek/lens/common/inc/MT9P017AF.h
blob: f55ca075f6c0885243c7f77504d286be5acf2fea (plain) (blame)
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
#ifndef _MT9P017AF_H
#define _MT9P017AF_H

#include <linux/ioctl.h>
/* #include "kd_imgsensor.h" */

#define MT9P017AF_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;
} stMT9P017AF_MotorInfo;

/* 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 MT9P017AFIOC_G_MOTORINFO _IOR(MT9P017AF_MAGIC, 0, stMT9P017AF_MotorInfo)

#define MT9P017AFIOC_T_MOVETO _IOW(MT9P017AF_MAGIC, 1, u32)

#define MT9P017AFIOC_T_SETINFPOS _IOW(MT9P017AF_MAGIC, 2, u32)

#define MT9P017AFIOC_T_SETMACROPOS _IOW(MT9P017AF_MAGIC, 3, u32)

#else
#endif