From 3edf8a150ae191565553a4dbf9afa2ca94bc5340 Mon Sep 17 00:00:00 2001 From: Gary Zhang Date: Fri, 15 Apr 2011 22:06:24 -0700 Subject: ARM: Tegra: Sh532u: Add focus motor state check Return last requested position if the motor settled or timeout occurs. Original-Change-Id: Ib0ff58b827fcf871dbf185eb0a284b7fe010aef2 Reviewed-on: http://git-master/r/27978 Reviewed-by: Frank Chen Reviewed-by: Andrei Denissov Reviewed-by: Gary Zhang Tested-by: Gary Zhang Reviewed-by: Scott Williams Rebase-Id: Rd5395077ebfd868f65cea951176962594dc476ad --- include/media/sh532u.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include/media') diff --git a/include/media/sh532u.h b/include/media/sh532u.h index 2581d9ae7cbd..9fba8e084e29 100644 --- a/include/media/sh532u.h +++ b/include/media/sh532u.h @@ -21,8 +21,17 @@ #include /* For IOCTL macros */ -#define SH532U_IOCTL_GET_CONFIG _IOR('o', 1, struct sh532u_config) +#define SH532U_IOCTL_GET_CONFIG _IOR('o', 1, struct sh532u_config) #define SH532U_IOCTL_SET_POSITION _IOW('o', 2, u32) +#define SH532U_IOCTL_GET_MOVE_STATUS _IOW('o', 3, unsigned char) + +enum sh532u_move_status { + SH532U_STATE_UNKNOWN = 1, + SH532U_WAIT_FOR_MOVE_END, + SH532U_WAIT_FOR_SETTLE, + SH532U_LENS_SETTLED, + SH532U_Forced32 = 0x7FFFFFFF +}; struct sh532u_config { __u32 settle_time; -- cgit v1.2.3