power: separate power configuration for each profile 48/273248/3 submit/tizen/20220405.053020
authorYoungjae Cho <y0.cho@samsung.com>
Fri, 1 Apr 2022 06:30:23 +0000 (15:30 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Mon, 4 Apr 2022 05:42:43 +0000 (05:42 +0000)
Change-Id: Id24e09c02a3e4e706cbe95eeee351eb23c250273
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
CMakeLists.txt
conf/power-profile-iot-headed.conf [new file with mode: 0644]
conf/power-profile-iot-headless.conf [new file with mode: 0644]
conf/power-profile-mobile.conf [moved from conf/power.conf with 100% similarity]
conf/power-profile-tv.conf [new file with mode: 0644]
conf/power-profile-wearable.conf [new file with mode: 0644]
packaging/deviced.spec

index 49efd97..287aac9 100644 (file)
@@ -278,7 +278,11 @@ ENDIF()
 
 IF(POWER_MODULE STREQUAL on)
        INSTALL_CONF(conf init)
-       INSTALL_CONF(conf power)
+       INSTALL_CONF(conf power-profile-mobile)
+       INSTALL_CONF(conf power-profile-wearable)
+       INSTALL_CONF(conf power-profile-tv)
+       INSTALL_CONF(conf power-profile-iot-headed)
+       INSTALL_CONF(conf power-profile-iot-headless)
 ENDIF()
 
 # USB connection
diff --git a/conf/power-profile-iot-headed.conf b/conf/power-profile-iot-headed.conf
new file mode 100644 (file)
index 0000000..ce213be
--- /dev/null
@@ -0,0 +1,11 @@
+[Reboot]
+Option=recovery
+Option=download
+Option=wdownload
+Option=debug
+Option=silent
+
+[PowerState]
+TimeoutSleepSupport=no
+ChangeStateMaxWaitSecond=10
+PowerOffDelaySecond=4
diff --git a/conf/power-profile-iot-headless.conf b/conf/power-profile-iot-headless.conf
new file mode 100644 (file)
index 0000000..27c6908
--- /dev/null
@@ -0,0 +1,11 @@
+[Reboot]
+Option=recovery
+Option=download
+Option=wdownload
+Option=debug
+Option=silent
+
+[PowerState]
+TimeoutSleepSupport=yes
+ChangeStateMaxWaitSecond=10
+PowerOffDelaySecond=0
diff --git a/conf/power-profile-tv.conf b/conf/power-profile-tv.conf
new file mode 100644 (file)
index 0000000..437c672
--- /dev/null
@@ -0,0 +1,11 @@
+[Reboot]
+Option=recovery
+Option=download
+Option=wdownload
+Option=debug
+Option=silent
+
+[PowerState]
+TimeoutSleepSupport=yes
+ChangeStateMaxWaitSecond=10
+PowerOffDelaySecond=4
diff --git a/conf/power-profile-wearable.conf b/conf/power-profile-wearable.conf
new file mode 100644 (file)
index 0000000..437c672
--- /dev/null
@@ -0,0 +1,11 @@
+[Reboot]
+Option=recovery
+Option=download
+Option=wdownload
+Option=debug
+Option=silent
+
+[PowerState]
+TimeoutSleepSupport=yes
+ChangeStateMaxWaitSecond=10
+PowerOffDelaySecond=4
index 1331169..97860ae 100644 (file)
@@ -223,6 +223,7 @@ update-alternatives --remove shutdown %{_sbindir}/deviced-power-command || :
 
 %post plugin-profile-mobile
 mv %{_sysconfdir}/deviced/display-profile-mobile.conf %{_sysconfdir}/deviced/display.conf
+mv %{_sysconfdir}/deviced/power-profile-mobile.conf %{_sysconfdir}/deviced/power.conf
 mkdir -p %{_libdir}/deviced
 mv %{_libdir}/mobile-display.so %{_libdir}/deviced/display.so
 %if %{?battery_module} == on
@@ -231,6 +232,7 @@ mv %{_libdir}/mobile-battery.so %{_libdir}/deviced/battery.so
 
 %post plugin-profile-wearable
 mv %{_sysconfdir}/deviced/display-profile-wearable.conf %{_sysconfdir}/deviced/display.conf
+mv %{_sysconfdir}/deviced/power-profile-wearable.conf %{_sysconfdir}/deviced/power.conf
 mkdir -p %{_libdir}/deviced
 mv %{_libdir}/wearable-display.so %{_libdir}/deviced/display.so
 %if %{?battery_module} == on
@@ -239,16 +241,19 @@ mv %{_libdir}/wearable-battery.so %{_libdir}/deviced/battery.so
 
 %post plugin-profile-tv
 mv %{_sysconfdir}/deviced/display-profile-tv.conf %{_sysconfdir}/deviced/display.conf
+mv %{_sysconfdir}/deviced/power-profile-tv.conf %{_sysconfdir}/deviced/power.conf
 mkdir -p %{_libdir}/deviced
 mv %{_libdir}/tv-display.so %{_libdir}/deviced/display.so
 
 %post plugin-profile-iot-headed
 mv %{_sysconfdir}/deviced/display-profile-iot-headed.conf %{_sysconfdir}/deviced/display.conf
+mv %{_sysconfdir}/deviced/power-profile-iot-headed.conf %{_sysconfdir}/deviced/power.conf
 mkdir -p %{_libdir}/deviced
 mv %{_libdir}/iot-headed-display.so %{_libdir}/deviced/display.so
 
 %post plugin-profile-iot-headless
 mv %{_sysconfdir}/deviced/input-profile-iot-headless.conf %{_sysconfdir}/deviced/input.conf
+mv %{_sysconfdir}/deviced/power-profile-iot-headless.conf %{_sysconfdir}/deviced/power.conf
 mkdir -p %{_libdir}/deviced
 mv %{_libdir}/iot-headless-input-handler.so %{_libdir}/deviced/input-handler.so
 mv %{_libdir}/iot-headless-power.so %{_libdir}/deviced/power.so
@@ -267,7 +272,6 @@ mv %{_libdir}/iot-headless-battery.so %{_libdir}/deviced/battery.so
 %{_unitdir}/basic.target.wants/sdb-prestart.service
 %endif
 %config %{_sysconfdir}/dbus-1/system.d/org.tizen.system.deviced.conf
-%config %{_sysconfdir}/deviced/power.conf
 %config %{_sysconfdir}/deviced/init.conf
 %if %{?battery_module} == on
 %config %{_sysconfdir}/deviced/battery.conf
@@ -337,6 +341,7 @@ mv %{_libdir}/iot-headless-battery.so %{_libdir}/deviced/battery.so
 %license LICENSE.Apache-2.0
 %defattr(-,root,root,-)
 %config %{_sysconfdir}/deviced/display-profile-mobile.conf
+%config %{_sysconfdir}/deviced/power-profile-mobile.conf
 %{_libdir}/mobile-display.so
 %if %{?battery_module} == on
 %{_libdir}/mobile-battery.so
@@ -349,6 +354,7 @@ mv %{_libdir}/iot-headless-battery.so %{_libdir}/deviced/battery.so
 %license LICENSE.Apache-2.0
 %defattr(-,root,root,-)
 %config %{_sysconfdir}/deviced/display-profile-wearable.conf
+%config %{_sysconfdir}/deviced/power-profile-wearable.conf
 %{_libdir}/wearable-display.so
 %if %{?battery_module} == on
 %{_libdir}/wearable-battery.so
@@ -361,6 +367,7 @@ mv %{_libdir}/iot-headless-battery.so %{_libdir}/deviced/battery.so
 %license LICENSE.Apache-2.0
 %defattr(-,root,root,-)
 %config %{_sysconfdir}/deviced/display-profile-tv.conf
+%config %{_sysconfdir}/deviced/power-profile-tv.conf
 %{_libdir}/tv-display.so
 %{_unitdir}/rndis.service
 %{_bindir}/rndis.sh
@@ -370,6 +377,7 @@ mv %{_libdir}/iot-headless-battery.so %{_libdir}/deviced/battery.so
 %license LICENSE.Apache-2.0
 %defattr(-,root,root,-)
 %config %{_sysconfdir}/deviced/display-profile-iot-headed.conf
+%config %{_sysconfdir}/deviced/power-profile-iot-headed.conf
 %{_libdir}/iot-headed-display.so
 %{_unitdir}/rndis.service
 %{_bindir}/rndis.sh
@@ -379,6 +387,7 @@ mv %{_libdir}/iot-headless-battery.so %{_libdir}/deviced/battery.so
 %license LICENSE.Apache-2.0
 %defattr(-,root,root,-)
 %config %{_sysconfdir}/deviced/input-profile-iot-headless.conf
+%config %{_sysconfdir}/deviced/power-profile-iot-headless.conf
 %{_libdir}/iot-headless-input-handler.so
 %{_libdir}/iot-headless-power.so
 %{_libdir}/iot-headless-battery.so