summaryrefslogtreecommitdiff
path: root/drivers/autotst/autotstdrv.h
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2017-08-30 08:25:59 +0000
committerYuval Adam <_@yuv.al>2017-08-30 08:25:59 +0000
commit8e4bff4cab0ddac6060645b0715210484d02ff40 (patch)
tree3a5c3024371a04692a3a6d9974d001cdff8ebf84 /drivers/autotst/autotstdrv.h
Initial file dump from open source releaseHEADmaster
Diffstat (limited to 'drivers/autotst/autotstdrv.h')
-rw-r--r--drivers/autotst/autotstdrv.h87
1 files changed, 87 insertions, 0 deletions
diff --git a/drivers/autotst/autotstdrv.h b/drivers/autotst/autotstdrv.h
new file mode 100644
index 00000000..48cb8f6e
--- /dev/null
+++ b/drivers/autotst/autotstdrv.h
@@ -0,0 +1,87 @@
+
+#ifndef _AUTOTSTDRV_20130207_H__
+#define _AUTOTSTDRV_20130207_H__
+
+//-----------------------------------------------------------------------------
+#ifdef __cplusplus
+extern "C" {
+#endif // __cplusplus
+//-----------------------------------------------------------------------------
+
+#include <asm/ioctl.h>
+
+//
+//------------------------------------------------------------------------------
+//
+#define AUTOTST_IOCTL_MAGIC 'A'
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+struct autotst_i2c_info_t {
+ unsigned char bus;
+ unsigned char rcv0;
+ unsigned short addr;
+
+ unsigned short reg;
+ unsigned char regBits; // 8 or 16
+ unsigned char rcv1;
+
+ unsigned char rcv2;
+ unsigned char data_len;
+ unsigned char data[16];
+
+};
+
+//
+#define AUTOTST_IOCTL_I2C_READ _IOWR(AUTOTST_IOCTL_MAGIC, 0x00, struct autotst_i2c_info_t)
+#define AUTOTST_IOCTL_I2C_WRITE _IOWR(AUTOTST_IOCTL_MAGIC, 0x01, struct autotst_i2c_info_t)
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+#define AUTOTST_GPIO_DIR_IN 0
+#define AUTOTST_GPIO_DIR_OUT 1
+
+struct autotst_gpio_info_t {
+ unsigned short gpio;
+ unsigned char dir;
+ unsigned char val;
+ unsigned char pup_enb;
+ unsigned char pup;
+ unsigned char pdwn_enb;
+ unsigned char pdwn;
+};
+
+#define AUTOTST_IOCTL_GPIO_INIT _IOWR(AUTOTST_IOCTL_MAGIC, 0x10, struct autotst_gpio_info_t)
+#define AUTOTST_IOCTL_GPIO_GET _IOWR(AUTOTST_IOCTL_MAGIC, 0x11, struct autotst_gpio_info_t)
+#define AUTOTST_IOCTL_GPIO_SET _IOW (AUTOTST_IOCTL_MAGIC, 0x12, struct autotst_gpio_info_t)
+#define AUTOTST_IOCTL_GPIO_CLOSE _IOW (AUTOTST_IOCTL_MAGIC, 0x13, struct autotst_gpio_info_t)
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+#define AUTOTST_LCD_DATA_NUM 32
+#define AUTOTST_IOCTL_LCD_DATA _IOW (AUTOTST_IOCTL_MAGIC, 0x30, int)
+#define AUTOTST_IOCTL_LCD_MIPI_ON _IOW (AUTOTST_IOCTL_MAGIC, 0x31, int)
+#define AUTOTST_IOCTL_LCD_MIPI_OFF _IOW (AUTOTST_IOCTL_MAGIC, 0x32, int)
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+#define AUTOTST_KEY_INVALID_ROW 0xFFEE
+#define AUTOTST_KEY_INVALID_COL 0xFFEE
+
+struct autotst_key_info_t {
+ unsigned short val; // key value
+ unsigned short row; //
+ unsigned short col;
+ unsigned short gio;
+};
+
+#define AUTOTST_IOCTL_GET_KEYINFO _IOWR(AUTOTST_IOCTL_MAGIC, 0x40, struct autotst_key_info_t)
+
+
+//-----------------------------------------------------------------------------
+#ifdef __cplusplus
+}
+#endif // __cplusplus
+//-----------------------------------------------------------------------------
+
+#endif // _AUTOTSTDRV_20130207_H__