platform/core/system/deviced.git
5 years agocoverity: fix SIGSEGV warning 94/200194/1 accepted/tizen/unified/20190221.165759 submit/tizen/20190220.055111 submit/tizen/20190220.073046
sanghyeok.oh [Wed, 20 Feb 2019 02:35:27 +0000 (11:35 +0900)]
coverity: fix SIGSEGV warning

Change-Id: I401b65eda545123127659fe557565827c4369482
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
5 years agoshutdown: Ensure messages are printed as fast as possible 56/200056/2
Karol Lewandowski [Mon, 18 Feb 2019 12:18:20 +0000 (13:18 +0100)]
shutdown: Ensure messages are printed as fast as possible

Change-Id: I568816d81b357592f279638404292b7c299e10f9

5 years agopower: Introduce 'exit' reboot option 29/199929/3
Karol Lewandowski [Fri, 15 Feb 2019 15:27:07 +0000 (16:27 +0100)]
power: Introduce 'exit' reboot option

This option will cause system to perform complete shutdown
without final 'reboot' syscall.  Such feature was requested
by test team.

Test by calling:

  dbus-send --system --print-reply --dest=org.tizen.system.deviced --type=method_call /Org/Tizen/System/DeviceD/Reboot org.tizen.system.deviced.reboot.reboot string:exit int32:0

The system will execute shutdown sequence but most processes
will remain running (eg. when tested on odroid, the shell from
which command was invoked was not terminated).

To confirm it works see thatt PID1 binary is replaced by systemd-shutdown:

root@localhost:~# ps auxww
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  8.3  0.1   3828  2164 ?        Ss   00:37   0:06 /usr/lib/systemd/systemd-shutdown exit --log-level 6 --log-target kmsg --log-color --exit-code 0

Change-Id: I91112c535c80713f2d35081edeaa7c0e1d772c3b

5 years agopower: Remove erronous DIRECT poweroff type 28/199928/2
Karol Lewandowski [Thu, 14 Feb 2019 15:47:00 +0000 (16:47 +0100)]
power: Remove erronous DIRECT poweroff type

Commit 51849e1cad ("power: Rework handling of repeated poweroff/reboot
request") mistakenly introduced POWEROFF type.  Before that commit
"DIRECT" type was used to mean POWEROFF.

This commit reverts to original behaviour, dropping DIRECT type
for all new uses but retains constant for compatiblity.

Change-Id: I4ddd5fa7fe45dd54bd9a597ed36b989b93a2f3f8

5 years agoAdd dbus_get_temperature for method, GetTemperature 55/196355/3 accepted/tizen/unified/20190219.154139 submit/tizen/20190218.105211
lokilee73 [Thu, 27 Dec 2018 11:42:01 +0000 (20:42 +0900)]
Add dbus_get_temperature for method, GetTemperature

Change-Id: I732241d0d3c57deba03e0beaf6caf949ddf7009f
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agodbus: systemd: change api - start/stop systemd unit 35/197635/8 accepted/tizen/unified/20190211.060141 submit/tizen/20190208.064159 submit/tizen/20190208.083757
sanghyeok.oh [Mon, 14 Jan 2019 23:35:12 +0000 (08:35 +0900)]
dbus: systemd: change api - start/stop systemd unit

move systemd related dbus api to libgdbus(libsyscommon)

Change-Id: I6ae0c125dc5293fbc38df7ca3a0ba7cde12a8f38
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
5 years agoApply device_notify_once() 57/199257/2
Hyotaek Shim [Fri, 8 Feb 2019 02:02:25 +0000 (11:02 +0900)]
Apply device_notify_once()

Change-Id: Ic56422e699bd3b1bae9174d31b271c40c7c5e907
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoRevert "Do not unnecessarily check booting-done" 55/199255/2
Hyotaek Shim [Fri, 8 Feb 2019 01:55:58 +0000 (01:55 +0000)]
Revert "Do not unnecessarily check booting-done"

This reverts commit 53256c665e90251b688e277d6ea8673476d317cf.

Change-Id: Ic9ddcec6a9b7a2e7832901d296e3eb6d4a9b99d3

5 years agoAdd notifier_device_ops for late or no booting done signal 24/199224/4 accepted/tizen/unified/20190208.061643 submit/tizen/20190207.112658
lokilee73 [Thu, 7 Feb 2019 09:51:25 +0000 (18:51 +0900)]
Add notifier_device_ops for late or no booting done signal

Systemd can't confirm booting done signal in valid time.
So, add notifier_device_ops to broadcast booting done siganl after 30 seconds,
if there is no booting done signal in it.

Change-Id: I535f8a848239b75fcd8e92f1ff13cd8ce895868a
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoDo not unnecessarily check booting-done 22/199222/1
Hyotaek Shim [Thu, 7 Feb 2019 09:40:59 +0000 (18:40 +0900)]
Do not unnecessarily check booting-done

Change-Id: I5680777ac0b907a6a8e394d1659e0e5b48d1192f
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoAdd device_notify_once() to avoid multiple invocation 16/199216/3
Hyotaek Shim [Thu, 7 Feb 2019 09:18:15 +0000 (18:18 +0900)]
Add device_notify_once() to avoid multiple invocation

Change-Id: I355dbe2d937e5ebdc5ffa8c59228763900e34568
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoFix deviced-shutdown installation 67/199067/1 submit/tizen/20190207.012533
Hyotaek Shim [Fri, 1 Feb 2019 08:32:24 +0000 (17:32 +0900)]
Fix deviced-shutdown installation

The location should be /usr/lib/systemd/deviced-shutdown (for both 32-bit and 64-bit build)

Change-Id: Ic31de51f4b2f848d2602f1dbc42d34283cc0f624
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoPlugin Architecture - for device module adaptation 64/199064/1
Hyotaek Shim [Fri, 1 Feb 2019 08:13:56 +0000 (17:13 +0900)]
Plugin Architecture - for device module adaptation

Change-Id: I5aef481d44b13c9cd3f8529cc04596d56a683f1c
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoAdd dump module to get debug infomation for devices 46/199046/2
lokilee73 [Fri, 1 Feb 2019 04:54:32 +0000 (13:54 +0900)]
Add dump module to get debug infomation for devices

When dump signal is received, dump logs are saved under /var/log/deviced.log

Change-Id: Idde9ce3bb02430e5373dbd953134e8e4acf46616
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoCoverity: 'handle' going out of scope 34/199034/1
Hyotaek Shim [Fri, 1 Feb 2019 02:15:50 +0000 (11:15 +0900)]
Coverity: 'handle' going out of scope

Change-Id: Ib055cb0f12fd23d6c9750ef977b76c3d166203f8
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoRemove unused edbus-handler 82/198982/1
Hyotaek Shim [Thu, 31 Jan 2019 11:21:30 +0000 (20:21 +0900)]
Remove unused edbus-handler

Change-Id: I5a95dc4c181ca2c22793264f98198340cd0cfb40
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoFix 64-bit build errors, /lib64/systemd/ 48/198948/1 accepted/tizen/unified/20190201.061331 submit/tizen/20190131.080207
Hyotaek Shim [Thu, 31 Jan 2019 08:01:24 +0000 (17:01 +0900)]
Fix 64-bit build errors, /lib64/systemd/

Change-Id: I7170c14e46cdd8ccbbcfcede18232bb10a62c8e9
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoVersion 5.5.0 06/198906/1
Hyotaek Shim [Thu, 31 Jan 2019 02:58:47 +0000 (11:58 +0900)]
Version 5.5.0

Change-Id: I5bfa2097c864342fccd20c0660524a0c35ac5580
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agopower: Add deviced-shutdown 24/197324/11 submit/tizen/20190131.021840
Karol Lewandowski [Thu, 10 Jan 2019 00:17:22 +0000 (00:17 +0000)]
power: Add deviced-shutdown

This commit provides special binary that is going to handle
Tizen system shutdown.

This utility is called by systemd, not deviced.

The final shutdown scheme is going to look like following:

 1. deviced receivies request to shutdown/reboot the system,

    - preparation is performed (send signals, etc)

    - operation start is marked in /run/

    - hardcoded actions are started

    - depending on shutdown type following is performed:
      + direct shutdown: system is rebooted immidietly (end of flow)
      + other: dbus request to systemd is sent

 2. systemd receives the "poweroff" request

    - supported requests are Reboot, PowerOff & Halt

    - systemd (pid1) replaces it's own process with shutdown binary
      (execve("/usr/lib/systemd/systemd-shutdown"))

    - shutdown binary is provided by deviced package by alternatives
      mechanism

# ls -l systemd-shutdown
systemd-shutdown -> /etc/alternatives/systemd-shutdown
# ls -l /etc/alternatives/systemd-shutdown
/etc/alternatives/systemd-shutdown -> /usr/lib/systemd/deviced-shutdown

      (alternatives allow both systemd and deviced to "provide" same
       binary, with deviced having higher priority being selected as
       the one to use)

 3. /usr/lib/systemd/systemd-shutdown becomes pid1

    - original systemd1 manager is no longer available, meaning no restart,
      watchdog, socket/path/etc activation is handled.

    - depending on systemd-provided params it performs reboot or poweroff

Change-Id: I46b4d0f375a1a6e7fc3e1d74b0530d7ec73ccb12
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agopower: Rework handling of repeated poweroff/reboot request 23/197323/8
Karol Lewandowski [Thu, 10 Jan 2019 00:11:44 +0000 (00:11 +0000)]
power: Rework handling of repeated poweroff/reboot request

This commit generalizes "repeated poweroff/reboot" code path
to use same state variables as dbus requests (poweroff_opt var).

Additionally, multiple constructs are simplified.

Change-Id: I989c7fdbf021da0d69d9062507a05fd8692846a5
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoRemove extcon_count.c and extcon_count.h 09/198809/5
lokilee73 [Wed, 30 Jan 2019 02:16:26 +0000 (11:16 +0900)]
Remove extcon_count.c and extcon_count.h

Because they have dependency with products

Change-Id: I1fe49f9b0089f85ad09d4d7c21e5c609195be7eb
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoChange the way to make display.conf 41/198041/1 submit/tizen/20190118.054503
lokilee73 [Fri, 18 Jan 2019 02:47:46 +0000 (11:47 +0900)]
Change the way to make display.conf

To make display.conf by using 'cat' can add duplicated contents in it.
So, change the way by file replacement

Change-Id: I69215787e89012ac8183899cea16b4215c73d65b
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoFix integer overflow in extcon_count.c 56/197956/2 accepted/tizen/unified/20190118.055736 submit/tizen/20190117.103942
lokilee73 [Thu, 17 Jan 2019 09:02:44 +0000 (18:02 +0900)]
Fix integer overflow in extcon_count.c

Change-Id: I83ac1617238aa664f1c5c6d1cff0c6945f5b1940
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoApply conf file and change thermal structure 67/197367/8
lokilee73 [Thu, 10 Jan 2019 12:08:51 +0000 (21:08 +0900)]
Apply conf file and change thermal structure

Firstly, thermal value depends on hardware.
So, we have to apply different temp table for each targets.

Secondly, change the name on temp table as products.
ex) Critical -> Limt
    Danger -> Shutdown

Lastly, change condition in thermal_get_temp_enum

Change-Id: If25be071e000dfaa1d5e68d205538cd2332d1d9b
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agodbus: modify to use send with reply 22/197022/1 accepted/tizen/unified/20190114.060204 submit/tizen/20190114.010204
lokilee73 [Wed, 9 Jan 2019 02:22:49 +0000 (11:22 +0900)]
dbus: modify to use send with reply

change dbus function to fix errors in media and battery

Change-Id: I4d91ad3419dab43c74d72fd58d767c5fdbe91d21
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agosensitivity: merge sensitivity 73/196673/2 accepted/tizen/unified/20190108.062317 submit/tizen/20190107.023946 submit/tizen/20190107.113744
sanghyeok.oh [Thu, 3 Jan 2019 10:23:51 +0000 (19:23 +0900)]
sensitivity: merge sensitivity

Change-Id: I3a6e0336d699f9a006cbe47fa920603e33d2d956
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
5 years agoRemove executable flag from non-executable files 64/196264/2 accepted/tizen/unified/20181231.125000 submit/tizen/20181227.070601 submit/tizen/20181231.010834 submit/tizen/20181231.070821
lokilee73 [Thu, 27 Dec 2018 01:42:47 +0000 (10:42 +0900)]
Remove executable flag from non-executable files

Change-Id: I6b848799d6a5f568350becac14c3d85c10b6b3e9
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoFix build error 46/196246/1 accepted/tizen/unified/20181227.062046 submit/tizen/20181226.112600
lokilee73 [Wed, 26 Dec 2018 11:21:24 +0000 (20:21 +0900)]
Fix build error

Change-Id: I8de7b15bdc3b921e2bb8e09e60e7a128deb3d198
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoChange thermal algorithm to get temp value from device HAL 08/195308/3 submit/tizen/20181226.101405
lokilee73 [Wed, 12 Dec 2018 10:29:30 +0000 (19:29 +0900)]
Change thermal algorithm to get temp value from device HAL
Needed action is triggered by below table

ex) Action Table
--------------------------------------------------
Current Previous Action
--------------------------------------------------
NORMAL NORMAL X
WARNING ReleaseAction
CRITICAL ReleaseAction
DANGER X
--------------------------------------------------
WARNING NORMAL WarningAction
WARNING X
CRITICAL WarningAction
DANGER X
--------------------------------------------------
CRITICAL NORMAL LimitAction
WARNING LimitAction
CRITICAL X
DANGER X
--------------------------------------
DANGER NORMAL ShutdownAction
WARNING ShutdownAction
CRITICAL ShutdownAction
DANGER X
--------------------------------------------------

Change-Id: Id8bd9737f9c648d1ed131dc22c3d8de3ba1b58a0
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoFix incorrect changes for build errors 52/195952/1 accepted/tizen/unified/20181220.170035 submit/tizen/20181220.044547
lokilee73 [Thu, 20 Dec 2018 04:40:58 +0000 (13:40 +0900)]
Fix incorrect changes for build errors

Change-Id: I22b86b4e8efe2449c05bdc1a03edb771845161ac
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoFix left build errors for aarch64 84/195484/1 accepted/tizen/unified/20181214.111014 submit/tizen/20181214.043905
lokilee73 [Fri, 14 Dec 2018 01:35:36 +0000 (10:35 +0900)]
Fix left build errors for aarch64

Change-Id: Iba78b2d02d12b291b09c192f333b09e1c84abcff
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoFix build errors 26/194726/1 accepted/tizen/unified/20181207.175428 submit/tizen/20181207.064308
lokilee73 [Fri, 7 Dec 2018 05:27:11 +0000 (14:27 +0900)]
Fix build errors

Change-Id: Idb1ad4f63f9571531201469b95ecab01c4f923e6
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agopower: disable_coredump_handler: Fix error condition correctly 28/193928/1 accepted/tizen/unified/20181205.063355 submit/tizen/20181204.070128
Karol Lewandowski [Tue, 27 Nov 2018 13:16:33 +0000 (14:16 +0100)]
power: disable_coredump_handler: Fix error condition correctly

fd could be zero as well and it's not an error condition.  Fix
the check to only test write() return value.

Change-Id: I92932f7fa2368d88fc2210f35f35521ba51161c2

5 years agoDisable coredump handler for the shutdown period 00/193900/1
Karol Lewandowski [Tue, 27 Nov 2018 09:32:42 +0000 (10:32 +0100)]
Disable coredump handler for the shutdown period

Change-Id: I2e83e006ce0c360616154c68f4871ee221427389

5 years agoRemove commented-out code and fix violations of coding standard 60/193660/5 accepted/tizen/unified/20181127.133503 submit/tizen/20181127.023050
lokilee73 [Fri, 23 Nov 2018 02:17:50 +0000 (11:17 +0900)]
Remove commented-out code and fix violations of coding standard

Change-Id: I410fb5ffcdc789cdc579e431c77f99b71d5b0b82
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoMerge "Unify extcon_get_count() and extcon_set_count() to extcon_update_count()"... accepted/tizen/unified/20181123.063246 submit/tizen/20181122.055216
Hyotaek Shim [Thu, 22 Nov 2018 05:34:59 +0000 (05:34 +0000)]
Merge "Unify extcon_get_count() and extcon_set_count() to extcon_update_count()" into tizen

5 years agoReorganize poweroff/restart functions 18/193518/4
Hyotaek Shim [Wed, 21 Nov 2018 11:08:27 +0000 (20:08 +0900)]
Reorganize poweroff/restart functions

Change-Id: I4cfd934bbc44ecf02369987e78a6471b39fed57a
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoUnify extcon_get_count() and extcon_set_count() to extcon_update_count() 70/193570/3
lokilee73 [Thu, 22 Nov 2018 03:19:56 +0000 (12:19 +0900)]
Unify extcon_get_count() and extcon_set_count() to extcon_update_count()

Change-Id: Ie25017889cbd005c12b3c5177ddc38c64dd28153
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoRename status of external connectors with prefix extcon_ 10/193210/1 accepted/tizen/unified/20181121.060504 submit/tizen/20181120.234806
lokilee73 [Fri, 16 Nov 2018 05:31:51 +0000 (14:31 +0900)]
Rename status of external connectors with prefix extcon_

ex) external devices
cradle, earjack, hdmi, usb, usb-host

Change-Id: I0eea6a932bcca6d10bddccfaa3a8a60114fbcd8b
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoTo apply depense code for double usb-host-test start or stop 54/192954/1 accepted/tizen/unified/20181115.151613 submit/tizen/20181115.015729
lokilee73 [Tue, 13 Nov 2018 07:12:34 +0000 (16:12 +0900)]
To apply depense code for double usb-host-test start or stop

Change-Id: I070bbf23e7c84551536f9a74f9d46894c03b2932
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
(cherry picked from commit e01b84a77b941a84369619f053d7dbe693f88a2e)

5 years agoFix a display item in auto test 99/192199/2 accepted/tizen/unified/20181113.085856 submit/tizen/20181112.103304
lokilee73 [Wed, 31 Oct 2018 11:27:32 +0000 (20:27 +0900)]
Fix a display item in auto test

Set brightness to 0
-> return error because it is the same with DIM

Change-Id: Id964312b5791b4230bdd507b7e563cf10a30a561
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoFix bugs that are related with display for auto_test 86/192186/2
lokilee73 [Wed, 31 Oct 2018 09:08:50 +0000 (18:08 +0900)]
Fix bugs that are related with display for auto_test

Display item in auto test fails.
1. Set/Get brightness
2. Set/Get maxbrightness
   -> add LCD NORMAL on dbus parameter
3. Set brightness to 0
   -> return error because it is the same with DIM

Change-Id: Ifb20f923e7a38d9c7b57c57fb0b469915be68b38
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoMinor fix - remove unnecessary extern declaration 94/192194/1
Hyotaek Shim [Wed, 31 Oct 2018 10:41:08 +0000 (19:41 +0900)]
Minor fix - remove unnecessary extern declaration

extern struct display_plugin disp_plgn;

Change-Id: Iac5802261347e5ade06d160daffdd402f6ece631
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoIntegrate config-enable-display-timer rpm into mobile profile, and fix conf files 83/192183/4
Hyotaek Shim [Wed, 31 Oct 2018 08:33:54 +0000 (17:33 +0900)]
Integrate config-enable-display-timer rpm into mobile profile, and fix conf files

Change-Id: I31f7cc6eb5577e92d1668eb43a45779cf0b6f929
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoPlugin architecture - IoT profile 81/192181/1
Hyotaek Shim [Wed, 31 Oct 2018 08:27:09 +0000 (17:27 +0900)]
Plugin architecture - IoT profile

Change-Id: I524ab65b1ec77f472249d86c2c6611cdb30412f1
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoPlugin architecture - TV profile 54/192154/2
Hyotaek Shim [Wed, 31 Oct 2018 03:04:36 +0000 (12:04 +0900)]
Plugin architecture - TV profile

Change-Id: Ib4d7eea6ccc78eb4cd1bdc803f32a8006524a1f9
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoPlugin architecture - wearable profile 49/192149/1
Hyotaek Shim [Wed, 31 Oct 2018 02:31:09 +0000 (11:31 +0900)]
Plugin architecture - wearable profile

Change-Id: I4f05b4da3f3067878b07779870013b1d0ea24731
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoPlugin architecture - mobile profile 41/192141/3
Hyotaek Shim [Tue, 30 Oct 2018 12:50:36 +0000 (21:50 +0900)]
Plugin architecture - mobile profile

Change-Id: I65811fb7958cb4865c5e5c616953ca9267bbfd76
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoChange usb sequence to broadcast usb state after setting vconf value 32/192032/1
lokilee73 [Mon, 29 Oct 2018 05:35:35 +0000 (14:35 +0900)]
Change usb sequence to broadcast usb state after setting vconf value

Change-Id: Ifbbbc70b160e3a351a484d633c3b955ecb6d98d0

5 years agousb: Remove usb-operation 67/191867/2
Paweł Szewczyk [Tue, 27 Feb 2018 16:16:29 +0000 (17:16 +0100)]
usb: Remove usb-operation

Starting and stopping usb operation is specific to the implementation.
This responsibility is moved to USB HAL.

Change-Id: I8a729a1343d27dc04e5a5611c9fd6ccdf394d4a4
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
5 years agousb-host-test: disable unit start rate limiting in ffs daemon 78/190378/2 accepted/tizen/5.0/unified/20181102.021851 accepted/tizen/unified/20181001.150952 submit/tizen/20181001.110913 submit/tizen/20181015.012421 submit/tizen_5.0/20181101.000004
Paweł Szewczyk [Mon, 1 Oct 2018 09:37:27 +0000 (11:37 +0200)]
usb-host-test: disable unit start rate limiting in ffs daemon

The usb-host-ffs-test-daemon is, by design, an on-demand daemon. It is
restarted by each test case.
The test cases, however, are run very fast in big series, triggering
unit restart limiting mechanism in systemd and entering it into failure
state.

To prevent this from happening, this commit disables the limiting.

Change-Id: I6b107442cea14015df9ab8d01ce23382b51fd872
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
5 years agoRemove svace error 25/190325/1 submit/tizen/20181001.071210
pr.jung [Mon, 1 Oct 2018 04:27:44 +0000 (13:27 +0900)]
Remove svace error

Change-Id: I25e34b89a92fbe495ddc8f00e3daca3f4ac35cbb
Signed-off-by: pr.jung <pr.jung@samsung.com>
5 years agoAdd two function to support multi leds. 04/189504/9 accepted/tizen/unified/20180928.080535 submit/tizen/20180927.030248
lokilee73 [Tue, 18 Sep 2018 07:38:14 +0000 (16:38 +0900)]
Add two function to support multi leds.
1. dbus_multi_led_control : to control leds
2. dbus_getnumofleds : to get the number of leds

Change-Id: I1b2101c4532b266416a88f5f5bf5ad67dea6fd73
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoRemove build warnings 02/189302/1 accepted/tizen/unified/20180917.135131 submit/tizen/20180917.044139
pr.jung [Mon, 17 Sep 2018 02:46:48 +0000 (11:46 +0900)]
Remove build warnings

Change-Id: I67bfaf29299825a9b8df19acd969a903af9e5dbc
Signed-off-by: pr.jung <pr.jung@samsung.com>
5 years agodbus: replace iter_loop with iter_next 02/188602/1 accepted/tizen/unified/20180907.043133 submit/tizen/20180906.120154 submit/tizen/20180906.120214
sanghyeok.oh [Thu, 6 Sep 2018 11:31:02 +0000 (20:31 +0900)]
dbus: replace iter_loop with iter_next

In case of g_variant_iter_loop,
in spite of it reaches end of iteration, trying to assign 0(or null) to param.
If array(with size - g_variant_iter_n_children(iter);) is used as param, it will causes segfault.

So change iter_loop to iter_next.
iter_next don't trying to assign value to param when it reaches end of iteration.
it just return FALSE

Change-Id: I11668d7ff6ee9ad71b62e829921dfd640469e5d7
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
5 years agodbus: remove inappropriate usage of gdbus proxy 48/186748/5 accepted/tizen/unified/20180814.175032 submit/tizen/20180814.071409
sanghyeok.oh [Tue, 14 Aug 2018 05:03:22 +0000 (14:03 +0900)]
dbus: remove inappropriate usage of gdbus proxy

Change-Id: Ief812a5cf282fb2113e18fea7e5dde19c52b8ba1
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
5 years agoFix devices_init procedure to prevent starting dev before probing
Hyotaek Shim [Mon, 13 Aug 2018 12:11:22 +0000 (21:11 +0900)]
Fix devices_init procedure to prevent starting dev before probing

Change-Id: I3fac32e208cd6412e0646bbf9c047b2730e9eed9
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agocoverity fix 05/186305/1 accepted/tizen/unified/20180809.074816 submit/tizen/20180809.012213
sanghyeok.oh [Thu, 9 Aug 2018 01:06:39 +0000 (10:06 +0900)]
coverity fix

Change-Id: I8f26ba62367c6087350dfca570e7cf3e1a584fc6
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
5 years agocoverity fix 62/185262/1 accepted/tizen/unified/20180802.134917 submit/tizen/20180802.055024
sanghyeok.oh [Fri, 27 Jul 2018 06:23:27 +0000 (15:23 +0900)]
coverity fix

Change-Id: I5c3518dcb897fa95f49fcb7dd34b5ce8ae5bc232
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
5 years agoRemove X related code 70/185070/2 accepted/tizen/unified/20180727.063750 submit/tizen/20180726.113419
lokilee73 [Thu, 26 Jul 2018 02:01:04 +0000 (11:01 +0900)]
Remove X related code

Display server was already changed to Wayland.
So, X related code is removed.

Change-Id: Id9d8ebe174e6eb98230a42310ba1b7daa6b89bf2
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoMinor fixes on poweroff functions 15/185015/1
Hyotaek Shim [Wed, 25 Jul 2018 07:58:46 +0000 (16:58 +0900)]
Minor fixes on poweroff functions

Change-Id: I9edb6c0692cbcb86b0abe63673a8ef5faa95a111
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoRemove delay time for power off animation 81/184981/1
lokilee73 [Wed, 25 Jul 2018 02:36:38 +0000 (11:36 +0900)]
Remove delay time for power off animation

Time for power off animation is guanranteed by resourced.

Change-Id: I7bd70ca3c31f66d20a918a838e5d4ab11e484dfe
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoChange notification method from synchronization to asynchronization 39/184939/2
lokilee73 [Tue, 24 Jul 2018 10:41:57 +0000 (19:41 +0900)]
Change notification method from synchronization to asynchronization
for battery and temperature

There was a bug that caused delayed boot-up issue because of media notification.
Basically, we don't have to wait until notification is finished.
The same bug can be protected by chaning notification way to asynchronization

Change-Id: I52c8bd9d752b2ed4178090fd6ecdc78b0a9a9a0d
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoRe-arrange the type and event for poweroff 84/184884/2 accepted/tizen/unified/20180725.060430 submit/tizen/20180724.051636
lokilee73 [Tue, 24 Jul 2018 05:49:52 +0000 (14:49 +0900)]
Re-arrange the type and event for poweroff

Remove duplicated function, poweroff_send_broadcast,
And move system_shutdown_send_system_event.

Change-Id: I527d3449ef01c387c088eb317a884d88a92002ae
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoFix direct_set_debug.sh to work only for legacy usb gadget drivers 63/184863/2 accepted/tizen/unified/20180724.073351 submit/tizen/20180723.235134
Hyotaek Shim [Mon, 23 Jul 2018 23:48:33 +0000 (08:48 +0900)]
Fix direct_set_debug.sh to work only for legacy usb gadget drivers

Change-Id: Id17ba7e233d0f3eba553a0e09dd8c6c49b33bc24
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoFix build warnings 24/184824/2 accepted/tizen/unified/20180723.151510 submit/tizen/20180723.113316
Hyotaek Shim [Mon, 23 Jul 2018 11:11:47 +0000 (20:11 +0900)]
Fix build warnings

Change-Id: I28f7bd0b4d3649fba90d2f4e2d06d56e1ed5271b
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoChange from synchronization to asynchronization for MediaDeviceNotiOn 84/184784/1
lokilee73 [Mon, 23 Jul 2018 06:13:21 +0000 (15:13 +0900)]
Change from synchronization to asynchronization for MediaDeviceNotiOn

While target boots up, deviced sends a request to System-apps for MediaDeviceNotiOn.
And System-apps forwards it to notification.
However, When quickpanel is not ready, notification can't deal with it.
And booting time is extended to 8 seconds.
So, change the request from synchronization to asynchronization.

Change-Id: I7f484b8e976ec922323b4869935264a5b50e72cc
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
6 years agoMinor fix for build errors 77/183877/1
Hyotaek Shim [Thu, 12 Jul 2018 05:21:52 +0000 (14:21 +0900)]
Minor fix for build errors

Change-Id: I15f345076780ac063468620e9ac902d8b8f0cd97
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 years agoTzip: fix a suspend failure problem on Tzip(fuse) mount 64/180764/28
Hyotaek Shim [Mon, 4 Jun 2018 05:12:43 +0000 (14:12 +0900)]
Tzip: fix a suspend failure problem on Tzip(fuse) mount

[ 6268.033010] PM: suspend entry (deep)
[ 6268.033013] PM: Syncing filesystems ... done.
[ 6268.038702] Freezing user space processes ...
[ 6288.043502] Freezing of tasks failed after 20.004 seconds (1 tasks refusing to freeze, wq_busy=0):
...

Reference: https://bugs.launchpad.net/ubuntu/+source/sshfs-fuse/+bug/388419

--- Remaining work ---
Between tzip_suspend() and actual system suspend (autosleep),
additional Tzip user processes might appear.
We still need to fix this race condition problem as well.

Change-Id: I9f9097e440e8bda86d3e0982436c559186a527d9
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 years agoFix dbus returned error by unmatched signature 12/183712/1
lokilee73 [Tue, 10 Jul 2018 08:17:02 +0000 (17:17 +0900)]
Fix dbus returned error by unmatched signature

charge notification is unmatched between deviced and system-popup

Change-Id: Icbae53e130cb6dd600cba4cd406dbb1efdf37569
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
6 years agousbhost: Ignore zeros when checking policy 06/181406/3 accepted/tizen/unified/20180712.092553 submit/tizen/20180710.030326
Paweł Szewczyk [Wed, 13 Jun 2018 09:57:24 +0000 (11:57 +0200)]
usbhost: Ignore zeros when checking policy

Change-Id: I3b60ded8baa51e40788d5093061bb9a9873e4da0
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
6 years agoAdd voltage and temperature for battery infomation and dbus 34/178934/3 submit/tizen/20180706.105024
lokilee73 [Tue, 15 May 2018 02:37:34 +0000 (11:37 +0900)]
Add voltage and temperature for battery infomation and dbus

Change-Id: Ida0fe1083c3d53ed32dda93c410d8263fcc59301
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
6 years agoChange watchdog timeout from 30 sec. to 90 sec. 94/183494/2
Hyotaek Shim [Fri, 6 Jul 2018 04:33:45 +0000 (13:33 +0900)]
Change watchdog timeout from 30 sec. to 90 sec.

It has been observed,
after a long suspend timeout/delay, Systemd may kill processes by Watchdog timeout as soon as it is thawed.
This is a workaground patch to avoid such a problem.

[Thu Jul  5 03:18:04 2018]  [1:   kworker/u4:9: 8153] Freezing of tasks failed after 20.006 seconds (1 tasks refusing to freeze, wq_bu$
[Thu Jul  5 03:18:04 2018]  [1:   kworker/u4:9: 8153] shealth-exercis D    0 16604   3220 0x00400209
[Thu Jul  5 03:18:04 2018]  [1:   kworker/u4:9: 8153] Call trace:
[Thu Jul  5 03:18:04 2018]  [1:   kworker/u4:9: 8153] [<ffffff8008085b70>] __switch_to+0x8c/0xa0
[Thu Jul  5 03:18:04 2018]  [1:   kworker/u4:9: 8153] [<ffffff80088d4720>] __schedule+0x37c/0x72c
[Thu Jul  5 03:18:04 2018]  [1:   kworker/u4:9: 8153] [<ffffff80088d4bcc>] schedule+0x8c/0xac
[Thu Jul  5 03:18:04 2018]  [1:   kworker/u4:9: 8153] [<ffffff80088d786c>] schedule_timeout+0x148/0x38c
[Thu Jul  5 03:18:04 2018]  [1:   kworker/u4:9: 8153] [<ffffff8008439f78>] kbase_destroy_context+0x394/0x448
[Thu Jul  5 03:18:04 2018]  [1:   kworker/u4:9: 8153] [<ffffff80084465d4>] kbase_release+0xf4/0x158
[Thu Jul  5 03:18:04 2018]  [1:   kworker/u4:9: 8153] [<ffffff80081ded58>] __fput+0xf4/0x1a8
[Thu Jul  5 03:18:04 2018]  [1:   kworker/u4:9: 8153] [<ffffff80081dee68>] ____fput+0xc/0x14
[Thu Jul  5 03:18:04 2018]  [1:   kworker/u4:9: 8153] [<ffffff80080bd378>] task_work_run+0xbc/0xe8
[Thu Jul  5 03:18:04 2018]  [1:   kworker/u4:9: 8153] [<ffffff80080891a0>] do_notify_resume+0x80/0x90
[Thu Jul  5 03:18:04 2018]  [1:   kworker/u4:9: 8153] [<ffffff8008082f8c>] work_pending+0x8/0x10
...
Jul 05 14:37:25 localhost systemd[1]: storaged.service: Watchdog timeout (limit 30s)!
Jul 05 14:37:25 localhost systemd[1]: storaged.service: Killing process 3092 (storaged) with signal SIGABRT.

Change-Id: I4936d36151ab36cb5868a6c614143ddd9220baa1
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 years agolibdeviced: Remove internal apis to mount/unmount/format primary sdcard 77/183177/1 accepted/tizen/unified/20180705.172747 submit/tizen/20180705.064054
pr.jung [Tue, 3 Jul 2018 03:12:50 +0000 (12:12 +0900)]
libdeviced: Remove internal apis to mount/unmount/format primary sdcard

- deviced_request_mount_mmc
- deviced_request_unmount_mmc
- deviced_request_format_mmc
- deviced_format_mmc

Change-Id: I2cb0c92496f5d38f654ebfc29eba1d8e64f413f9
Signed-off-by: pr.jung <pr.jung@samsung.com>
6 years agoFix crash by usbhost popup 14/182914/1 accepted/tizen/unified/20180704.154006 submit/tizen/20180704.010647
lokilee73 [Thu, 28 Jun 2018 13:05:27 +0000 (22:05 +0900)]
Fix crash by usbhost popup

crash happends by below dbus command, because "req" is null.
So, add exception code to avoid it.

dbus-send --system --type=method_call --print-reply --reply-timeout=120000
--dest=org.tizen.system.popup /Org/Tizen/System/Popup/System
org.tizen.system.popup.System.PopupLaunch dict:string:string:"_SYSPOPUP_CONTENT_","usbhost","_APP_PID_","1151"

Change-Id: If0a9182367f6001e336fe78986e59c0cb3d02a56
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
6 years agoTo fix dbus policy error with dpm 08/182408/2 accepted/tizen/unified/20180629.061535 submit/tizen/20180625.102537 submit/tizen/20180625.142706 submit/tizen/20180627.063926 submit/tizen/20180627.113622 submit/tizen/20180628.074606
lokilee73 [Mon, 25 Jun 2018 01:43:32 +0000 (10:43 +0900)]
To fix dbus policy error with dpm

Change policy user from system_fw to security_fw

Change-Id: Ie79eb6e059746ca3a4042124b857e7eb03786e2d
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
6 years agoFix dbus returned error by unmatched signature between deviced and system-popup 95/182195/3
lokilee73 [Thu, 21 Jun 2018 07:00:41 +0000 (16:00 +0900)]
Fix dbus returned error by unmatched signature between deviced and system-popup

Change-Id: I00ed9d5acf2c4f19a0e5488c74a4e7a7c358c3d2
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
6 years agoRefactoring on check_lcd_is_on() return values 36/182036/1
Hyotaek Shim [Wed, 20 Jun 2018 04:23:35 +0000 (13:23 +0900)]
Refactoring on check_lcd_is_on() return values

Change-Id: I82398431e64c5d9d94da0ba46979ddecf90b00fc
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 years agoAdd privilege check for dbus_changestate 91/181991/1 accepted/tizen/unified/20180621.141336 submit/tizen/20180620.132539
lokilee73 [Tue, 19 Jun 2018 11:43:11 +0000 (20:43 +0900)]
Add privilege check for dbus_changestate

Change-Id: I7b65c139857ad85830f8e4a89e7745bf25874329
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
6 years agoRevert "Add a debugging code for blocked dpms_get_power()" 29/181929/1 accepted/tizen/unified/20180619.142047 submit/tizen/20180619.052936
Hyotaek Shim [Tue, 19 Jun 2018 05:26:55 +0000 (14:26 +0900)]
Revert "Add a debugging code for blocked dpms_get_power()"

This reverts commit 95359826ccd4cbc45a262e289615a048f2cc8dcc.

Change-Id: Idf8c02227c1534637a8aad025764fe177f8da9b0
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 years agousbhost: Fix signature of OpenDevice result 05/181405/1 submit/tizen/20180615.023805
Paweł Szewczyk [Wed, 13 Jun 2018 09:44:16 +0000 (11:44 +0200)]
usbhost: Fix signature of OpenDevice result

The OpenDevice method is expected to return two values: return code and
a file descriptor.

Change-Id: I523f7a74a132e6aef198fb97d1f58d64a2901367
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
6 years agoAdd a debugging code for blocked dpms_get_power() 10/181210/1 accepted/tizen/unified/20180619.110320 submit/tizen/20180614.110151
Hyotaek Shim [Mon, 11 Jun 2018 05:16:27 +0000 (14:16 +0900)]
Add a debugging code for blocked dpms_get_power()

Program terminated with signal SIGABRT, Aborted.
 #0  0xb68c1964 in poll () at ../sysdeps/unix/syscall-template.S:84
 84 ../sysdeps/unix/syscall-template.S: No such file or directory.
 [Current thread is 1 (Thread 0xb6f4a180 (LWP 7281))]
 (gdb) bt
 #0  0xb68c1964 in poll () at ../sysdeps/unix/syscall-template.S:84
 #1  0xb6b7fc18 in g_main_context_poll (priority=<optimized out>, n_fds=1, fds=0xb8c177a8,
     timeout=<optimized out>, context=0xb8c10cf0) at gmain.c:4259
 #2  g_main_context_iterate (context=0xb8c10cf0, block=block@entry=1, dispatch=dispatch@entry=1,
     self=<optimized out>) at gmain.c:3955
 #3  0xb6b7ffd8 in g_main_loop_run (loop=0xb8c10800) at gmain.c:4156
 #4  0xb6e3f5c0 in g_dbus_connection_send_message_with_reply_sync (
     connection=connection@entry=0xb8bd0868, message=message@entry=0xb51d8630,
     flags=G_DBUS_SEND_MESSAGE_FLAGS_NONE, timeout_msec=10000, timeout_msec@entry=-1225985936,
     out_serial=out_serial@entry=0x0, cancellable=0x0, error=0xbeb38994, error@entry=0xbeb3898c)
     at gdbusconnection.c:2844
 #5  0xb6e3fb70 in g_dbus_connection_call_sync_internal (connection=0xb8bd0868,
     bus_name=<optimized out>, object_path=object_path@entry=0xb6f9f0f4 "/org/enlightenment/wm",
     interface_name=0xb6f9f0d8 "org.enlightenment.wm.dpms", method_name=<optimized out>,
     method_name@entry=0xb6f9f0f4 "/org/enlightenment/wm", parameters=0x0,
     parameters@entry=0xb6c9bce1 <dbus_handle_method_sync+104>,
     reply_type=reply_type@entry=0xb6fa02a8, flags=flags@entry=G_DBUS_CALL_FLAGS_NONE,
     timeout_msec=timeout_msec@entry=10000, fd_list=fd_list@entry=0x0,
     out_fd_list=out_fd_list@entry=0x0, cancellable=cancellable@entry=0x0, error=0xbeb38a24,
     error@entry=0x2710) at gdbusconnection.c:6901
 #6  0xb6e42294 in g_dbus_connection_call_sync (connection=<optimized out>, bus_name=<optimized out>,
     object_path=object_path@entry=0xb6f9f0f4 "/org/enlightenment/wm",
     interface_name=<optimized out>, method_name=method_name@entry=0xb6fa02a8 "get",
     parameters=parameters@entry=0x0, reply_type=reply_type@entry=0x0,
     flags=flags@entry=G_DBUS_CALL_FLAGS_NONE, timeout_msec=timeout_msec@entry=10000,
     cancellable=cancellable@entry=0x0, error=error@entry=0xbeb38a24) at gdbusconnection.c:7128
 #7  0xb6c9bce0 in dbus_handle_method_sync (dest=<optimized out>,
     path=0xb6f9f0f4 "/org/enlightenment/wm", iface=<optimized out>, method=0xb6fa02a8 "get",
     signature=signature@entry=0x0, param=param@entry=0x0)
     at /usr/src/debug/libsyscommon-4.1/src/libgdbus/dbus-system.c:1994
 #8  0xb6f87100 in dpms_get_power (state=0xbeb38a6c)
     at /usr/src/debug/deviced-5.0.0/src/display/dpms-wayland-none.c:90

Change-Id: Ia53fb83140509b9ed4db213df2ef09af1ae2f649
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 years agoModify WATCHDOG_TIMEOUT to 5 seconds 04/181204/1
Hyotaek Shim [Mon, 11 Jun 2018 05:02:30 +0000 (14:02 +0900)]
Modify WATCHDOG_TIMEOUT to 5 seconds

Change-Id: I41f635437cb8c6930780efbac4548311d5eeffce
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 years agoFix dbus policy to allow group users in Tzip 65/181065/1
Hyotaek Shim [Fri, 8 Jun 2018 01:57:36 +0000 (10:57 +0900)]
Fix dbus policy to allow group users in Tzip

Change-Id: Ibc76b9c7c1c562286e82974937bdd54204e68bc1
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 years agolibdeviced: Remove unused internal APIs 64/180664/1 submit/tizen/20180605.010244
pr.jung [Fri, 1 Jun 2018 02:18:24 +0000 (11:18 +0900)]
libdeviced: Remove unused internal APIs

- RequestSecureMount and RequestSecureUnmount doesn't exist.

Change-Id: I3fa24b8a4b245f102dca56bf004400ceaa84fa6c
Signed-off-by: pr.jung <pr.jung@samsung.com>
6 years agopm: set powerlock at deviced init time 25/180125/8 submit/tizen/20180531.061428
Donghwan Jeong [Fri, 25 May 2018 04:40:25 +0000 (13:40 +0900)]
pm: set powerlock at deviced init time

While the powerlock is unlocked, system can fall asleep even at the Normal state.
For instance, you can see this problem right after deviced is restarted by suspend-time crash.

Change-Id: Ibb5422409de1cf45d7e70df25c58b0f6bea0e049
Signed-off-by: Donghwan Jeong <dh.jeong@samsung.com>
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 years agoSychronize internal apis with ones in device 56/180356/1 submit/tizen/20180528.132417
lokilee73 [Mon, 28 May 2018 13:17:20 +0000 (22:17 +0900)]
Sychronize internal apis with ones in device

Change-Id: I4023ce26db5befde2da12661e0d3bf5191580cc6
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
6 years agoAdd condition to remove unnecessary logs in timeout_handler 73/180173/2
lokilee73 [Fri, 25 May 2018 07:43:51 +0000 (16:43 +0900)]
Add condition to remove unnecessary logs in timeout_handler

Lots of logs in timeout_handler are printed in special condition.
LCD always on + changestate of S_LCDOFF by dbus request
So, add condition of pm_cur_state to remove timer.

Change-Id: Ibaed3baa638097771a53d02028bd0f32694794fb
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
6 years agoRemove logs in timeout_handler 10/179610/1 accepted/tizen/unified/20180521.003454 submit/tizen/20180518.133141
lokilee73 [Fri, 18 May 2018 13:25:12 +0000 (22:25 +0900)]
Remove logs in timeout_handler

Change-Id: Ibc35dc73f7cd7615b6d37a9853c0505d6d11bdcd
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
6 years agodbus-policy: remove unnecessary rule 66/179166/1 accepted/tizen/unified/20180516.162339 submit/tizen/20180516.115228
sanghyeok.oh [Wed, 16 May 2018 07:02:26 +0000 (16:02 +0900)]
dbus-policy: remove unnecessary rule

Change-Id: Ie0520916de700ec531062b99e099546ab9bd0e2c
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
6 years agousb-host-ffs-test-daemon: Improve error handling 02/172002/9 accepted/tizen/unified/20180514.144941 submit/tizen/20180514.115021
Paweł Szewczyk [Wed, 7 Mar 2018 13:35:40 +0000 (14:35 +0100)]
usb-host-ffs-test-daemon: Improve error handling

 - Added ep0 thread for handling disable requests
 - Errors are handled by simply reseting the threads
 - Added few race-condition protecting locks and conditions.
 - Sleep at few critical points (workaround for race conditions that
   couldn't be identified so far)

Change-Id: I9e0f9de975493390251763d6f07eea550b77ed6d
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
6 years agoRemove README.error.code 11/178211/1 accepted/tizen/unified/20180509.073053 submit/tizen/20180509.001007
Hyotaek Shim [Wed, 9 May 2018 00:07:00 +0000 (09:07 +0900)]
Remove README.error.code

Change-Id: I78881d49d62c37f107cc048dc448fed29531bf8d
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 years agoModify dbus for DIM 04/177004/8 accepted/tizen/unified/20180502.071144 submit/tizen/20180430.051948 submit/tizen/20180502.014710
lokilee73 [Tue, 24 Apr 2018 11:32:55 +0000 (20:32 +0900)]
Modify dbus for DIM

Change-Id: I706f6f55accc9858939fc8ae3e621b489f637b15
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
6 years agoRemove unnecessary "Requires" to avoid build issues regarding noarch 56/177056/2 accepted/tizen/unified/20180426.062452 submit/tizen/20180425.045604 submit/tizen/20180425.054444
Hyotaek Shim [Wed, 25 Apr 2018 04:52:09 +0000 (13:52 +0900)]
Remove unnecessary "Requires" to avoid build issues regarding noarch

Dear All,
I came up today with a dependency problem, that blocks verification of SR.
The SR submit/tizen/20180424.062711 for tef-simulator
(platform/core/security/tef-simulator) failed to create 5 images.
Although, there is nothing wrong in changes proposed in tef-simulator.
The images that failed to build do not even contain tef-simulator and should not be affected anyway.

Here is what happened:
1) tef -simulator builds only for Intel archs, because of this line in tef-simulator.spec:
ExcludeArch: armv6l armv7hl armv7l aarch64

2) build of tef-simulator triggers build of key-manager-ta,
which triggers build of deviced, but still only for Intel archs.
Build is not retriggered for arm (armv7l and aarch64) architectures,
because there were no changes in code there.

3) Five of images requires deviced-config-profile-wearable or
deviced-config-enable-display-timer package which are part of deviced and is noarch.
They have been rebuild in the SR so is published as
deviced-config-profile-wearable-5.0.0-20180424.062711.noarch,
deviced-config-enable-display-timer-5.0.0-20180424.062711.noarch

4) According to deviced.spec (platform/core/system/deviced) config-profile-wearable,
deviced-config-enable-display-timer packages requires deviced package with exactly same version and release:

%package config-profile-wearable
Summary:    Configuration files for wearable profile
Group:      System/Management
Requires:   %{name} = %{version}-%{release}
BuildArch:  noarch

%package config-enable-display-timer
Summary:    Configuration files for display
Group:      System/Management
Requires:   %{name} = %{version}-%{release}
BuildArch:  noarch

However deviced package in version and release 5.0.0-20180424.062711
is not found for armv7l architecture, because version from reference snapshot is 5.0.0-36.3.

So the problem is that the noarch package (config-profile-wearable)
can be rebuild without rebuilding main package (deviced) for arm architectures.
And then it is impossible to satisfy "Requires" criteria and match exactly same version during image creation.

The proposed solution would be to remove these 2 lines
(Requires: %{name} = %{version}-%{release}) from deviced.spec
as these packages providing conf does not really depend on deviced package.
I verified that it won't break images as deviced itself is also included
in meta files for wearable and mobile images which have this issue.

Lukasz Wojciechowski
Principal Software Engineer

Samsung R&D Institute Poland
Samsung Electronics

Change-Id: I95061848b3bb0429840122e01fd72db5adda5f2a
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 years agoRevert "Revert "Revert "usb: Remove usb-operation""" 48/176248/1 accepted/tizen/unified/20180418.090557 submit/tizen/20180418.001657 submit/tizen/20180418.001958
Hyotaek Shim [Wed, 18 Apr 2018 00:13:21 +0000 (09:13 +0900)]
Revert "Revert "Revert "usb: Remove usb-operation"""

This reverts commit f50deea1efd5062415f43eb0722983daae77413f.

Change-Id: I3dc62a8c786376039dcc2592ecc61d8f348a6885
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 years agoRevert "To prevent Watchdog Kill during the dbus sync call" 99/176199/1 accepted/tizen/unified/20180417.173243 submit/tizen/20180417.092207
Hyotaek Shim [Tue, 17 Apr 2018 09:19:21 +0000 (18:19 +0900)]
Revert "To prevent Watchdog Kill during the dbus sync call"

This reverts commit 19f28633e69ec61b9bd32d904b89f0b5a6f48aee.

Change-Id: I57727e680fa9351fd1a3254f25d10bd639302ab6
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 years agoRevert "Revert "usb: Remove usb-operation"" 36/174836/2 accepted/tizen/unified/20180412.073808 submit/tizen/20180411.015824 submit/tizen/20180411.122642
Paweł Szewczyk [Wed, 4 Apr 2018 10:58:08 +0000 (12:58 +0200)]
Revert "Revert "usb: Remove usb-operation""

This revert was only temporary solution and with updated HAL implementation
deviced should not start any services itself.

This reverts commit 64bec949084f2bff0dce333052eda84d0244ee3f.

Change-Id: Ifd5ccb3b2bbdf764ef0f3a2a191755494cdb7b64
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
6 years agoFix a build problem that occurred with a new version of cmake(3.9.4) 48/175048/1 accepted/tizen/unified/20180409.100028 submit/tizen/20180408.231339
Hyotaek Shim [Fri, 6 Apr 2018 07:26:37 +0000 (16:26 +0900)]
Fix a build problem that occurred with a new version of cmake(3.9.4)

Change-Id: I4531dc40550ea2feb29a90abc0329b0557cc1229
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 years agoChange the method for thermal 06/175006/1
lokilee73 [Fri, 6 Apr 2018 02:16:24 +0000 (11:16 +0900)]
Change the method for thermal

From ChangedCooldownMode to thermal_scenario

Change-Id: Ie5dd8ec75a2018b1dc61dee34f37777e9a88a455
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
6 years agoRefactor dbus_handle_init into two parts 65/174865/4 accepted/tizen/unified/20180406.061936 submit/tizen/20180405.024125 submit/tizen/20180405.044417 submit/tizen/20180405.051333 submit/tizen/20180405.111955
lokilee73 [Wed, 4 Apr 2018 12:39:46 +0000 (21:39 +0900)]
Refactor dbus_handle_init into two parts

It's to solve timing issue caused by telephony.
When it requests AddPoweroffWait, it fails because dbus in deviced is not ready.

Change-Id: I03f64928e361301ba87330298a19bd7482317081
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>