power: disable CPU lock/unlock on iot-headless 81/267481/1 accepted/tizen/unified/20211207.133137 submit/tizen/20211206.061425
authorYoungjae Cho <y0.cho@samsung.com>
Mon, 6 Dec 2021 06:01:51 +0000 (15:01 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Mon, 6 Dec 2021 06:03:33 +0000 (15:03 +0900)
Change-Id: Idd2cf460012f7bfab2ef8c9c649a54d1d1b50471
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
src/power.c

index 971a6ff..1e32f31 100644 (file)
@@ -455,10 +455,14 @@ int device_power_request_lock(power_lock_e type, int timeout_ms)
                } else if (type == POWER_LOCK_CPU) {
                        /* in case of headless, request for cpu lock is handled
                         * in power module of deviced, not in display module */
+
+                       /* In current policy, headless doesn't support cpulock. Disable it.
                        ret = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME,
                                DEVICED_PATH_POWER, DEVICED_INTERFACE_POWER,
                                "LockCpu", g_variant_new("(i)", timeout_ms), NULL);
                        return errno_to_device_error(ret);
+                       */
+                       return DEVICE_ERROR_NOT_SUPPORTED;
                }
        }
 
@@ -505,10 +509,14 @@ int device_power_release_lock(power_lock_e type)
                } else if (type == POWER_LOCK_CPU) {
                        /* in case of headless, request for cpu unlock is handled
                         * in power module of deviced, not in display module */
+
+                       /* In current policy, headless doesn't support cpulock. Disable it.
                        ret_val = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME,
                                DEVICED_PATH_POWER, DEVICED_INTERFACE_POWER,
                                "UnlockCpu", NULL, NULL);
                        return errno_to_device_error(ret_val);
+                       */
+                       return DEVICE_ERROR_NOT_SUPPORTED;
                }
        }