From 1b29c0163f812548fd5536bcb3a77d5c4dbd5ff9 Mon Sep 17 00:00:00 2001 From: Hyotaek Shim Date: Wed, 28 Oct 2020 16:36:05 +0900 Subject: [PATCH] tizen: Add an api for early initialization of input udev KERNEL[3.864698] add /devices/virtual/rc/rc1/input2 (input) DEVPATH=/devices/virtual/rc/rc1/input2 UDEV [6.541278] add /devices/virtual/rc/rc1/input2 (input) DEVPATH=/devices/virtual/rc/rc1/input2 For fast input accessing, input udev should be set up early, so that udev_device_get_is_initialized(input_udev_dev) check can be skipped before UDEV [6.541278]. Change-Id: I8182f856b0169f9c434bb360a49cfef109485c94 Signed-off-by: Hyotaek Shim --- src/libudev/libudev-device.c | 9 +++++++++ src/libudev/libudev.h | 3 +++ src/libudev/libudev.sym | 1 + 3 files changed, 13 insertions(+) diff --git a/src/libudev/libudev-device.c b/src/libudev/libudev-device.c index 7b9f54c..352bf44 100644 --- a/src/libudev/libudev-device.c +++ b/src/libudev/libudev-device.c @@ -893,3 +893,12 @@ sd_device *udev_device_get_sd_device(struct udev_device *udev_device) { return udev_device->device; } + +_public_ int udev_device_set_default_property_input(struct udev_device *udev_device) +{ + /** + * 0: Success + * 1: Skip + **/ + return 1; +} diff --git a/src/libudev/libudev.h b/src/libudev/libudev.h index aef4a55..c7841fa 100644 --- a/src/libudev/libudev.h +++ b/src/libudev/libudev.h @@ -95,6 +95,9 @@ int udev_device_set_sysattr_value(struct udev_device *udev_device, const char *s int udev_device_has_tag(struct udev_device *udev_device, const char *tag); int udev_device_has_current_tag(struct udev_device *udev_device, const char *tag); +/* special api supporting early initialization for input devices */ +int udev_device_set_default_property_input(struct udev_device *udev_device); + /* * udev_monitor * diff --git a/src/libudev/libudev.sym b/src/libudev/libudev.sym index 6aa6768..00c4c1f 100644 --- a/src/libudev/libudev.sym +++ b/src/libudev/libudev.sym @@ -38,6 +38,7 @@ global: udev_device_new_from_syspath; udev_device_ref; udev_device_unref; + udev_device_set_default_property_input; udev_enumerate_add_match_is_initialized; udev_enumerate_add_match_parent; udev_enumerate_add_match_property; -- 2.7.4