From: Youngjae Cho Date: Tue, 12 Nov 2019 06:28:14 +0000 (+0900) Subject: Add touchscreen execute X-Git-Tag: accepted/tizen/unified/20191113.010239^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F94%2F217494%2F2;p=platform%2Fcore%2Fsystem%2Fdeviced.git Add touchscreen execute Change-Id: Ia97235271addd8c10690e1b0dbfdc92b3b8c0231 Signed-off-by: Youngjae Cho --- diff --git a/src/touchscreen/touchscreen.c b/src/touchscreen/touchscreen.c index 45caf74..a2ef250 100644 --- a/src/touchscreen/touchscreen.c +++ b/src/touchscreen/touchscreen.c @@ -24,6 +24,7 @@ #include "core/log.h" static struct touchscreen_device *touchscreen_dev; +static int touchscreen_enable = DEVICE_OPS_STATUS_START; static int touchscreen_probe(void *data) { @@ -100,8 +101,17 @@ static int touchscreen_set_state(enum touchscreen_state state) return ret; } +static int touchscreen_execute(void *data) +{ + touchscreen_enable = (int)data; + return 0; +} + static int touchscreen_start(enum device_flags flags) { + if (touchscreen_enable != DEVICE_OPS_STATUS_START) + return 0; + return touchscreen_set_state(TOUCHSCREEN_ON); } @@ -139,6 +149,7 @@ static const struct device_ops touchscreen_device_ops = { .start = touchscreen_start, .stop = touchscreen_stop, .dump = touchscreen_dump, + .execute = touchscreen_execute, }; DEVICE_OPS_REGISTER(&touchscreen_device_ops)