evdi: added IOCTL for booting done log 95/33295/3
authorJinhyung Choi <jinhyung2.choi@samsung.com>
Sun, 28 Dec 2014 03:07:51 +0000 (12:07 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Tue, 20 Jan 2015 08:11:55 +0000 (00:11 -0800)
Change-Id: I08bc0f9ff1122efc84925c0af60d359c881a8ac1
Signed-off-by: Jinhyung Choi <jinhyung2.choi@samsung.com>
drivers/maru/maru_virtio_evdi.c

index abe13c4..711b7b8 100644 (file)
@@ -51,6 +51,9 @@
 #define LOGDEBUG(fmt, ...) \
        printk(KERN_DEBUG "%s: " fmt, DRIVER_NAME, ##__VA_ARGS__)
 
+#define LOGINFO(fmt, ...) \
+       printk(KERN_INFO "%s: " fmt, DRIVER_NAME, ##__VA_ARGS__)
+
 #define LOGERR(fmt, ...) \
        printk(KERN_ERR "%s: " fmt, DRIVER_NAME, ##__VA_ARGS__)
 
 /* device protocol */
 #define __MAX_BUF_SIZE 1024
 
+enum ioctl_cmd {
+       IOCTL_CMD_BOOT_DONE,
+};
+
 enum
 {
        route_qemu = 0,
@@ -391,6 +398,19 @@ static unsigned int evdi_poll(struct file *filp, poll_table *wait)
        return ret;
 }
 
+static long evdi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+{
+       switch (cmd) {
+               case IOCTL_CMD_BOOT_DONE:
+                       LOGINFO("BOOTING DONE.\n");
+                       break;
+               default:
+                       LOGERR("not available command.\n");
+                       return -EIO;
+       }
+       return 0;
+}
+
 static struct file_operations evdi_fops = {
                .owner = THIS_MODULE,
                .open = evdi_open,
@@ -398,6 +418,7 @@ static struct file_operations evdi_fops = {
                .read = evdi_read,
                .write = evdi_write,
                .poll  = evdi_poll,
+               .unlocked_ioctl  = evdi_ioctl,
 };