2 #ifndef _AUTOTSTDRV_20130207_H__
3 #define _AUTOTSTDRV_20130207_H__
5 //-----------------------------------------------------------------------------
9 //-----------------------------------------------------------------------------
11 #include <asm/ioctl.h>
14 //------------------------------------------------------------------------------
16 #define AUTOTST_IOCTL_MAGIC 'A'
18 //-----------------------------------------------------------------------------
19 //-----------------------------------------------------------------------------
20 struct autotst_i2c_info_t {
26 unsigned char regBits; // 8 or 16
30 unsigned char data_len;
31 unsigned char data[16];
36 #define AUTOTST_IOCTL_I2C_READ _IOWR(AUTOTST_IOCTL_MAGIC, 0x00, struct autotst_i2c_info_t)
37 #define AUTOTST_IOCTL_I2C_WRITE _IOWR(AUTOTST_IOCTL_MAGIC, 0x01, struct autotst_i2c_info_t)
39 //-----------------------------------------------------------------------------
40 //-----------------------------------------------------------------------------
41 #define AUTOTST_GPIO_DIR_IN 0
42 #define AUTOTST_GPIO_DIR_OUT 1
44 struct autotst_gpio_info_t {
48 unsigned char pup_enb;
50 unsigned char pdwn_enb;
54 #define AUTOTST_IOCTL_GPIO_INIT _IOWR(AUTOTST_IOCTL_MAGIC, 0x10, struct autotst_gpio_info_t)
55 #define AUTOTST_IOCTL_GPIO_GET _IOWR(AUTOTST_IOCTL_MAGIC, 0x11, struct autotst_gpio_info_t)
56 #define AUTOTST_IOCTL_GPIO_SET _IOW (AUTOTST_IOCTL_MAGIC, 0x12, struct autotst_gpio_info_t)
58 //-----------------------------------------------------------------------------
59 //-----------------------------------------------------------------------------
60 #define AUTOTST_LCD_DATA_NUM 32
61 #define AUTOTST_IOCTL_LCD_DATA _IOW (AUTOTST_IOCTL_MAGIC, 0x30, int)
62 #define AUTOTST_IOCTL_LCD_MIPI_ON _IOW (AUTOTST_IOCTL_MAGIC, 0x31, int)
63 #define AUTOTST_IOCTL_LCD_MIPI_OFF _IOW (AUTOTST_IOCTL_MAGIC, 0x32, int)
65 //-----------------------------------------------------------------------------
66 //-----------------------------------------------------------------------------
67 #define AUTOTST_KEY_INVALID_ROW 0xFFEE
68 #define AUTOTST_KEY_INVALID_COL 0xFFEE
70 struct autotst_key_info_t {
71 unsigned short val; // key value
72 unsigned short row; //
77 #define AUTOTST_IOCTL_GET_KEYINFO _IOWR(AUTOTST_IOCTL_MAGIC, 0x40, struct autotst_key_info_t)
80 //-----------------------------------------------------------------------------
84 //-----------------------------------------------------------------------------
86 #endif // _AUTOTSTDRV_20130207_H__