devicectl: add suspend/resume command 18/286218/1
authorYoungjae Cho <y0.cho@samsung.com>
Tue, 27 Dec 2022 08:25:51 +0000 (17:25 +0900)
committeryoungjae cho <y0.cho@samsung.com>
Mon, 2 Jan 2023 02:09:53 +0000 (02:09 +0000)
commitfb63c8bb6c1534af77444656976f9f9cc020206a
tree541fe466f8b265c07c323a0ac553920ca1ad8460
parentce7c360f4e0c8b8ae0075cffc9706abb5b011cb2
devicectl: add suspend/resume command

Usage: devicectl power suspend|resume reason(int)
 #) devicectl power suspend 12345
 #) devicectl power resume 2000

The value reason can be an any integer and the devicectl doesn't test
it is valid reason or not. Therefore some listeners of suspend/resume
event might malfunction as they receive a wierd reason.

Change-Id: I62c66e0a8034f9884fd006404991330902ecca21
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit 4d0daf18b56643cfaeb81f7ca777135726340398)
src/power/power-dbus.c
tools/devicectl/devicectl.c