1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 **************************************************************************** 11 ****************************************************************************/ 12 #ifndef __SOC2030_H__ 13 #define __SOC2030_H__ 14 15 #include <linux/ioctl.h> 16 17 #define SOC2030_IOCTL_SET_MODE _IOWR('o', 1, struct soc2030_mode) 18 #define SOC2030_IOCTL_GET_STATUS _IOC(_IOC_READ, 'o', 2, 10) 19 #define SOC2030_IOCTL_SET_PRIVATE _IOWR('o', 3, struct soc2030_regs) 20 #define SOC2030_IOCTL_GET_MODES _IO('o', 4) 21 #define SOC2030_IOCTL_GET_NUM_MODES _IOR('o', 5, unsigned int) 22 #define SOC2030_IOCTL_SET_EFFECT _IOWR('o', 6, unsigned int) 23 #define SOC2030_IOCTL_SET_WHITEBALANCE _IOWR('o', 7, unsigned int) 24 #define SOC2030_IOCTL_SET_EXP_COMP _IOWR('o', 8, int) 25 26 #define SOC2030_POLL_WAITMS 50 27 #define SOC2030_MAX_RETRIES 3 28 #define SOC2030_POLL_RETRIES 5 29 30 #define SOC2030_MAX_PRIVATE_SIZE 1024 31 #define SOC2030_MAX_NUM_MODES 6 32 33 #define SOC_EV_MAX 2 34 #define SOC_EV_MIN -2 35 #define EXP_TARGET 0x32 36 37 enum { 38 REG_TABLE_END, 39 WRITE_REG_DATA, 40 WRITE_REG_BIT_H, 41 WRITE_REG_BIT_L, 42 POLL_REG_DATA, 43 POLL_REG_BIT_H, 44 POLL_REG_BIT_L, 45 WRITE_VAR_DATA, 46 POLL_VAR_DATA, 47 DELAY_MS, 48 }; 49 50 enum { 51 EFFECT_NONE, 52 EFFECT_BW, 53 EFFECT_NEGATIVE, 54 EFFECT_POSTERIZE, 55 EFFECT_SEPIA, 56 EFFECT_SOLARIZE, 57 EFFECT_AQUA, 58 EFFECT_MAX, 59 }; 60 61 enum { 62 WB_AUTO, 63 WB_INCANDESCENT, 64 WB_FLUORESCENT, 65 WB_DAYLIGHT, 66 WB_CLOUDYDAYLIGHT, 67 WB_NIGHT, 68 WB_MAX, 69 }; 70 71 struct soc2030_regs { 72 __u8 op; 73 __u16 addr; 74 __u16 val; 75 }; 76 77 struct soc2030_mode { 78 int xres; 79 int yres; 80 int fps; 81 struct soc2030_regs *regset; 82 }; 83 84 #endif 85 86 87