+* 1.7.2
+- added reset function for host keyboard
+- deleted blank in maru_virtio_hwkey.c
+== Sungmin Ha <sungmin82.ha@samsung.com> 2013-12-03
* 1.7.1
- method for initial scale factor value determining
== GiWoong Kim <giwoong.kim@samsung.com> 2013-11-26
static void virtio_hwkey_device_reset(VirtIODevice *vdev)
{
- INFO("reset hwkey device\n");
- vqidx = 0;
+ INFO("reset hwkey device\n");
+ vqidx = 0;
}
static void virtio_hwkey_class_init(ObjectClass *klass, void *data)
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
dc->exit = virtio_hwkey_device_exit;
vdc->init = virtio_hwkey_device_init;
- vdc->reset = virtio_hwkey_device_reset;
+ vdc->reset = virtio_hwkey_device_reset;
vdc->get_features = virtio_hwkey_get_features;
}
return;
}
+ if (!virtio_queue_ready(vkbd->vq)) {
+ INFO("virtqueue is not ready.\n");
+ return;
+ }
+
index = &(vkbd->kbdqueue.index);
TRACE("[Enter] input_event handler. cnt %d\n", vkbd->kbdqueue.wptr);
return 0;
}
+static void virtio_keyboard_device_reset(VirtIODevice *vdev)
+{
+ VirtIOKeyboard *vkbd;
+ vkbd = VIRTIO_KEYBOARD(vdev);
+
+ INFO("reset keyboard device\n");
+ vkbd->kbdqueue.rptr = 0;
+ vkbd->kbdqueue.index = 0;
+}
+
static void virtio_keyboard_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
dc->exit = virtio_keyboard_device_exit;
vdc->init = virtio_keyboard_device_init;
+ vdc->reset = virtio_keyboard_device_reset;
vdc->get_features = virtio_keyboard_get_features;
}