lokilee73 [Tue, 27 Oct 2020 02:29:56 +0000 (11:29 +0900)]
Add comments for DEVICE_NOTIFIER_POWEROFF
Change-Id: If4f2dbcbc66a6579612016b16207339bfe14a37b
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Youngjae Cho [Mon, 26 Oct 2020 06:10:10 +0000 (15:10 +0900)]
Fix restart option to on-failure
This prevents restarting deviced when the deviced is returning main()
through poweroff sequence.
Change-Id: Icbb4a8c306721a1613c04d41060fbbd323c5e62b
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
lokilee73 [Tue, 13 Oct 2020 07:02:06 +0000 (16:02 +0900)]
Skip running animation if option is silent
Change-Id: Iaccd10955d02a129ad352b0a13192ed47042ffa9
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
(cherry picked from commit
ca9d81149e324e49efc033810b25ce787f7c4c00)
Youngjae Cho [Mon, 14 Sep 2020 02:49:48 +0000 (11:49 +0900)]
Use definitions of libsyscommon instead of device api
device api now uses libsyscommon library for dbus communication.
To get in line with this change, Deviced is required to use the
callback function of libsyscommon instead of that of api/device.
Change-Id: I5c8f8025ba215ec2fb9a6722ee66ca4b2d8fbea2
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Tue, 13 Oct 2020 03:28:30 +0000 (12:28 +0900)]
Apply dpms cache globally
Existing get_lcd_power() accesses to node directly, but it now uses
dpms_get_cached_state() instead. Accessing to the node is separated
into another function, get_lcd_power_node().
Change-Id: Ic05ce15d0fd1ec603c88db470144631a7e1b3ebd
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Mon, 12 Oct 2020 05:33:32 +0000 (14:33 +0900)]
Fix dbus call of default_pmlock_check()
For non-killable daemons, the return of resourced's CheckAppStatus
is always ignored. Therefore, fix not to call CheckAppStatus when
the pmlock_check is checking non-killable daemon, not app.
Change-Id: Ifeef32754c9d94a18ad302b97927407de91b83d8
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Youngjae Cho [Mon, 5 Oct 2020 08:09:04 +0000 (17:09 +0900)]
Adopt a dpms cache
In the previos structure, deviced sets dpms through Enlightenment,
whereas gets dpms by reading the lcd power node directly. There is
a possibility of a miasmatch between the actual dpms state and the
lcd power node. The cached dpms value is alternatively used for
this situation in replacement of the get_lcd_power().
Change-Id: Id0144cd76cb017694198856f6b40ff7162b61e64
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Thu, 8 Oct 2020 08:18:22 +0000 (17:18 +0900)]
silent reboot: Fix initial DPMS contol
For silent reboot, don't do DPMS_ON, which was done at the
end of init_dpms().
Change-Id: I3692503aa1b7a10085dcc19408148be440f382f7
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Hyotaek Shim [Wed, 7 Oct 2020 06:39:48 +0000 (15:39 +0900)]
Add get_lcd_power_node() for direct accessing the lcd power node
Change-Id: Id47db38af56b2f6b6e4be0e6b46acf79b0564d75
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
lokilee73 [Tue, 6 Oct 2020 11:33:36 +0000 (20:33 +0900)]
Do not handle LCD DIM, when display.Dimming is 0
LCD DIM is not supported in dbus_changestate.
Change-Id: Ie6d1ca66dcf5770492df3331fb71802a089df1af
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Mon, 5 Oct 2020 11:30:36 +0000 (20:30 +0900)]
Fix compile error
display_conf->Dimming can be obtained via get_var_display_config()
Change-Id: I846084962769e2b2e6846552f8724b6bd6d221d5
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Mon, 5 Oct 2020 05:03:18 +0000 (14:03 +0900)]
Do not handle LCD DIM, when display.Dimming is 0
LCD DIM lock/unlock is not supported in
dbus_lockstate and dbus_unlockstate.
Change-Id: I51e913b66adf55bb78124185ae5aca19b46ce1a2
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
(cherry picked from commit
8dbf5cc61905833fed475ef0f3bc720ffe0ddc07)
lokilee73 [Tue, 29 Sep 2020 07:59:38 +0000 (16:59 +0900)]
Add S_LCDDIM in process_background and process_foreground
S_NORMAL is affected by signal, AppStatusChange.
ex) lock status of process with the signal
node->background: true, LOCK is ignored
node->background: false, LOCK is valid
Add S_LCDDIM to make it controlled by AppStatusChange as well.
Change-Id: I4f97a07c39bc58c8599a8dae68601849bff12791
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Mon, 21 Sep 2020 11:55:01 +0000 (20:55 +0900)]
Add logs to get pid information for below functions.
ex) dbus_changestatebyreason
dbus_customlcdon
dbus_customlcdoff
dbus_setbrightness
dbus_holdbrightness
dbus_releasebrightness
dbus_lcdpaneloffmode
dbus_dimstay_control
dbus_staytouchscreenoff
Change-Id: I3e692a5b2a407df04ec6e9aeab2f596b88fb7590
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Wed, 16 Sep 2020 11:16:20 +0000 (20:16 +0900)]
Remove unused function ciritical_log
ex) CRITICAL_LOG is used instead of critical_log
Change-Id: Ib47f59e9d3425cd877f978286c4da3501bdb4866
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Tue, 15 Sep 2020 09:52:18 +0000 (18:52 +0900)]
Deduplicate below functions
ex) update_lock_timer
process_background
process_foreground
Change-Id: I396f02f04943a27134c6b7a708f65d386c97edec
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Yunmi Ha [Mon, 14 Sep 2020 07:11:28 +0000 (16:11 +0900)]
Replace function name to get variable pointer
Change-Id: I8c057e2cf393636fcf439b0a6f9d62f5e7254992
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Yunmi Ha [Thu, 10 Sep 2020 08:26:16 +0000 (17:26 +0900)]
Fix battery link error when battery module is off
- When battery_module option is off,
there is link error about undefined function.
- Get battery reference by battery plugin handle.
Change-Id: I4b8649c98d52617bd98f97cfd37f52a355a1d565
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Yunmi Ha [Fri, 4 Sep 2020 03:10:09 +0000 (12:10 +0900)]
The battery plugin is not built, when battery module is off.
Change-Id: I5d3ded1a4708448c77a7bc61a31ed8d4134005ea
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
lokilee73 [Thu, 10 Sep 2020 07:14:30 +0000 (16:14 +0900)]
Change function name
ex) dh_get_param_from_var to g_variant_get_safe
Change-Id: Ie8f2efe288b983debe60ec29100a4e146e280827
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Youngjae Cho [Thu, 10 Sep 2020 04:36:35 +0000 (13:36 +0900)]
Update warning_id when registering lockcheck timer
Segfault occurs when the lock node had been deleted during
FORCE_RELEASE_LOCK_INTERVAL and accessed by lockcheck timer callback.
Change-Id: I8defd4fa15a3276588286ef6ae7811d34433241b
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit
dd12492f83aa2a72e1f580569b81c594e72e042c)
Yunmi Ha [Fri, 4 Sep 2020 02:57:18 +0000 (11:57 +0900)]
Get battery status from battery plugin.
- When battery_module option is off,
there is link error about undefined function.
- Change battery reference to battery plugin same as display.
Change-Id: I75924fd15f81e2485463f0d3eca3f8e798ecaec6
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
lokilee73 [Tue, 8 Sep 2020 02:05:37 +0000 (11:05 +0900)]
Deduplicate display_load_config
Change-Id: I450a89b1e115a0302101aae95cfd643eb651ff6b
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Sat, 29 Aug 2020 08:13:31 +0000 (17:13 +0900)]
Support multi HDMI + Svace fix
1) Support multi HDMI
There are two HDMI ports in RPI4 target
and it can be increased in the future.
So, make a bitmap table for HDMI.
Supported MAX HDMI number is 64 for now.
Below data is listed up.
extcon# : 1 is shifted by #
ex) type value bitmap
extcon1 1/0 0x10/0x00
extcon2 1/0 0x100/0x000
extcon3 1/0 0x1000/0x0000
If one of them is 1, then 1(connected) is broadcasted.
Otherwise, 0(disconnected) is broadcasted.
2) Svace fix
src/power/power-control.c
Below condition is removed,
because .log_type is same or bigger than PM_LOG_MIN
pm_history_log[index].log_type < PM_LOG_MIN
Change-Id: Ib9dbaa374cc5ccbbde1ebac45840befe1fb786d2
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Yunmi Ha [Fri, 28 Aug 2020 08:41:33 +0000 (17:41 +0900)]
Fix dlsym() caller for get_display_conf
Change-Id: If9eac834f99620e52807881c321d2f08e4a6e194
Youngjae Cho [Mon, 31 Aug 2020 02:38:10 +0000 (11:38 +0900)]
Enhance display/power lock managemenent
Summary:
- Detect someone who holds lock longer than 30 minutes.
- If a general application is detected, deviced generates signal
with time information in addtion to pid.
- If a specific daemon is detected, deviced tries to kill it directly.
For general applications:
Added an addition information, lock holding time in second, to the
signal "pmlock_expired". This makes someone, who is in charge of
application lifecycle and notification, possible to determine whether
to kill that application or not.
For some specific killable daemon:
Added list of killable daemon to conf file and deviced loads that list.
If a killable daemon holds lock longer than 30 minutes, deviced directly
sends SIGTERM to that daemon, releasing lock. After for a while, deviced
checks once more, if the daemon is still alive then, sends SIGKILL.
Change-Id: Ia0d433facdcc7814e19278619a58a111ff7ff7c3
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Tue, 1 Sep 2020 02:12:49 +0000 (11:12 +0900)]
Return errno for failing fopen in config_parse
Change-Id: I23c0e54128f59c9a3b3e533add1670cfb74bf9df
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
lokilee73 [Thu, 27 Aug 2020 05:35:56 +0000 (14:35 +0900)]
Dosen't lock becasue it could prevent Suspend-to-RAM
If internal lock by USB-HOST is on, it can prevent going to suspend-to-ram.
So, remove it.
Change-Id: I87852664313d662cf38af120383506bd2116932f
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Tue, 25 Aug 2020 10:51:28 +0000 (19:51 +0900)]
Deduplicate Power Manager history functions
ex)
pm_history_init
pm_history_save
pm_history_print
Change-Id: Ib322155e0091d6f972a833d140beb3c1bd4c890b
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Fri, 21 Aug 2020 06:48:51 +0000 (15:48 +0900)]
Add internal CAPIs to auto test
ex)
device_touchscreen_disable
device_touchscreen_enable
device_display_get_brightness_state
device_display_get_max_brightness_state
device_display_set_brightness_state
device_display_change_state_by_reason
device_multi_led_get_number
device_multi_led_control
device_battery_get_info_direct
device_pmqos_app_launch_home
device_pmqos_homescreen
device_get_reboot_mode
Change-Id: I3f45437591ed29c9477851b138d51d9fd5864295
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Youngjae Cho [Thu, 20 Aug 2020 04:45:08 +0000 (13:45 +0900)]
Fix display not to go into AOD when poweroff
Change-Id: Ie57cc79a23eb20b948e8bdf54ce6acadcd1474b6
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Yunmi Ha [Fri, 7 Aug 2020 09:29:07 +0000 (18:29 +0900)]
Change display_conf to static
Change-Id: I64cc875bd0fb554f297bf95ba6994ffe429c52ef
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Yunmi Ha [Fri, 7 Aug 2020 08:51:23 +0000 (17:51 +0900)]
Change states global variable to static
Change-Id: I86483d65ad63f6ceca0c12111f994ffaf95669eb
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Yunmi Ha [Fri, 7 Aug 2020 07:23:17 +0000 (16:23 +0900)]
Change battery global variable to static
Change-Id: I2d2b3e024e0518bf9f442ec4820c12546085160f
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Hyotaek Shim [Tue, 18 Aug 2020 05:00:00 +0000 (14:00 +0900)]
Fix build warnings
Change-Id: Ibcc05e48990655e0d62e08dc43fa7fe448c1cb9c
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Yunmi Ha [Fri, 14 Aug 2020 07:33:47 +0000 (16:33 +0900)]
Add initialize constructor for backlight init.
Change-Id: I592367573b0550d6841b1440ba7e2ea47849471f
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Youngjae Cho [Wed, 15 Jul 2020 09:22:28 +0000 (18:22 +0900)]
Change backlight_ops static
Change-Id: I8d958fc084a74e6272f470bf81a7f1a342c10492
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Yunmi Ha [Thu, 13 Aug 2020 06:17:59 +0000 (15:17 +0900)]
Add initialize constructor for variable init.
Change-Id: I0c469e3609f4c99a36531d1a2a9adbcea48aab50
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Yunmi Ha [Wed, 12 Aug 2020 06:21:35 +0000 (15:21 +0900)]
Move variable initialization code to probe function
Change-Id: Ieafb6b73e6a64da572d79b401937cc495bb8fa16
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Yunmi Ha [Wed, 12 Aug 2020 05:35:11 +0000 (14:35 +0900)]
Fix battery_plgn memory corruption
Change-Id: Ib20a86452e669873cd7b0f1a0ae3ef21f077ac0a
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Hyotaek Shim [Wed, 12 Aug 2020 02:38:58 +0000 (11:38 +0900)]
Fix initializtion for extcon_usbhost
Change-Id: I98e67b10b0f3790b70ee77bbd3d41cb6ee99dc39
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Youngjae Cho [Thu, 6 Aug 2020 02:12:06 +0000 (11:12 +0900)]
Guarantee to restore brightness to default on LCDON
AutoBrightnessChanged with level 0 on LCDON will check brightness. If
the current brightnes is different to default brightness, restore the
brightness to the default brightness. This is especially important for
turning on LCD from AOD clock as the deferred brightness effect is
applied at this point.
Change-Id: Ia82a058c5d462d7739d51d161e2740586d990247
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
lokilee73 [Fri, 7 Aug 2020 09:18:51 +0000 (18:18 +0900)]
Change power related global variables and functions to static
Change-Id: I7a1f14ac7d7ebab5a2cefab8b070b246e62dd866
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Youngjae Cho [Thu, 16 Jul 2020 07:02:11 +0000 (16:02 +0900)]
Change display_plgn, battery_plgn static
Change-Id: I3933a70a3f197cf6955b378429aa99c6e1f69150
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
lokilee73 [Tue, 4 Aug 2020 04:27:39 +0000 (13:27 +0900)]
Add doze_pmqos_request for cpu throttling
Request for cpu throttling is sent from DEVICED to PASS,
when LCD is ON or OFF
ex) LCD OFF : 1 to enter doze mode
LCD ON : 0 to leave doze mode
Change-Id: I4a655be04dd5bbd5198e452bda85cbd9df8f06e7
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Yunmi Ha [Wed, 5 Aug 2020 07:59:56 +0000 (16:59 +0900)]
Remove unnecessary dependencies
- remove 'libdevice-node' package dependencies.
Change-Id: I7e85a9bc54e077923b8d44793e3df7d9e91a7e32
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Hyotaek Shim [Tue, 4 Aug 2020 05:04:50 +0000 (14:04 +0900)]
Wait for 4 sec. before poweroff_prepare() and set LCD_OFF in disable_display()
To preserve boot animation time and keep black screen even if the animation is killed
To set LCD_NORMAL when "devicectl display stop" is executed
Change-Id: I58a855bc6d3940fc417481523552f24df22731d7
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Hyotaek Shim [Tue, 4 Aug 2020 06:56:48 +0000 (06:56 +0000)]
Revert "Change abnormal health popup lcddim lock to 60s"
This reverts commit
ec0c8ae86c88d2e5f42b133ff408416e75ebeef3.
Change-Id: I8ad4a44d91601d049f0707e65256c83d49347432
Youngjae Cho [Mon, 27 Jul 2020 04:35:58 +0000 (13:35 +0900)]
Add DPMS checklist for dependable DPMS control
For guaranteeing HBMOFF before DPMS OFF, needs for checker has arisen.
There can be corner case that HBM hasn't been offed before DPMS OFF.
To detect such situation, introduced checklist. And check right before
the DPMS request, guaranteeing HBMOFF.
Change-Id: Id490891f98ec2896b5b6b566aedc741c4c7b2f91
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit
084c700b17ffdba0b3e3b295ece1867faaf8bb0a)
Youngjae Cho [Thu, 23 Jul 2020 04:38:11 +0000 (13:38 +0900)]
Apply new power management feature, Doze mode
Change-Id: Ia515c2130c1b68eab6dc5bc2b5a3d2beb62c1114
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Thu, 23 Jul 2020 01:19:15 +0000 (10:19 +0900)]
Change abnormal health popup lcddim lock to 60s
In the below commit,
6b0553796377417ea333f246742dc302e024cc6e
it is missed that update macro to 1 min.
Change-Id: I3c761d3107ff62e6137505d6fca38b5f6dec92bc
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit
1eb746baa6176ba20528236afc1a28e1000ff421)
Youngjae Cho [Tue, 21 Jul 2020 04:34:24 +0000 (13:34 +0900)]
Do not control sw bezel on changing display state
sw bezel is only controlled by vconf.
Change-Id: I44a75eed17ccd3cd5115bce810cd15a017bfdf9f
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit
b8151da7cb2cc94a21b99aaebfe1ba9ac31e603b)
lokilee73 [Tue, 14 Jul 2020 12:34:50 +0000 (21:34 +0900)]
Devide pm_status_flag into set and clear functions
to remove global variable
set_pm_status_flag is to add flag in pm_status_flag
clear_pm_status_flag is to clear flag in pm_status_flag
Change-Id: If3d9b6969c5a86338b66ca96f1b65fac7efff3a7
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Youngjae Cho [Wed, 15 Jul 2020 05:35:20 +0000 (14:35 +0900)]
Add missing NULL check of calling HAL
Change-Id: I85454fd6ce2bebd041025240e0b7c1606b9e6ec4
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Wed, 15 Jul 2020 04:20:50 +0000 (13:20 +0900)]
Add null checking code before calling a bezel HAL
Change-Id: Idb80accdaefb7820a0776ca55415d2ffd115d83f
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit
3809eaa73c98dbc14fae730352fc877e19622f7c)
lokilee73 [Mon, 13 Jul 2020 07:02:17 +0000 (16:02 +0900)]
Move pm_old_state to display.c to remove global variable
Change-Id: Id366233f17a0ab7cee367775ce5758a8df21854d
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Wed, 8 Jul 2020 06:06:42 +0000 (15:06 +0900)]
Move pm_cur_state to display.c to remove global variable
Change-Id: If9eb70c2b8fdeff1f4248983fa5d8b07bd6de86b
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Tue, 7 Jul 2020 10:46:49 +0000 (19:46 +0900)]
Change global variable to static one
Change-Id: I371c2bb10dd31fd0080c6c87a62b27be9891a5fa
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Youngjae Cho [Wed, 8 Jul 2020 02:18:09 +0000 (11:18 +0900)]
Fix coverity issue
Change-Id: Ia09f20d916d8128c07aea903dca24a5afa5a562e
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Tue, 7 Jul 2020 09:17:32 +0000 (18:17 +0900)]
Fix coverity issue
Change-Id: Ia9a1a6aa32514a482ce64345088ad99be59e9634
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Tue, 7 Jul 2020 08:16:19 +0000 (17:16 +0900)]
Add vibration intensity control logic for bezel
Change-Id: I1025c52aa25e549bd56b35d54a570fd5078813d7
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit
fd2915816cc1dd60ec856fea0afaa3649b5154bb)
Youngjae Cho [Tue, 16 Jun 2020 02:34:03 +0000 (11:34 +0900)]
Add brightness interaction
Add brightness interaction among
- Set
- Hold
- HBM
- LBM
- LowbatteryDim
- DimStay (Battery Abnormal Health)
The condition in display_dimstay_check() is deleted,
if ((pm_status_flag & PWRSV_FLAG) && !(pm_status_flag & BRTCH_FLAG))
return true;
as all the brightness controlled by HBM/LBM/Hold/Release/Set is allowed
to change even though in low battery dim situation.
Checking HBM state after LCDON is deleted, as now sensord always notify
deviced about the brightness state on receiving LCDOn signal.
Change-Id: I2fc2babde83656d0743f113b5547e6edea72768f
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Mon, 6 Jul 2020 05:26:58 +0000 (14:26 +0900)]
Add auto-test for brightness
Usage: deviced-auto-test wearable brightness [tcname]
Change-Id: Ied1e76aa411e0d78e912ad7050de4e0077933728
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Mon, 6 Jul 2020 04:46:31 +0000 (13:46 +0900)]
Fix not to defer processing lowbat on realoff
If uevent continues to occur shorter than 1.5s on realoff state,
it defers processing lowbattery infinitely and makes poweroff sequence
unreachable. For that case, added exception to process lowbat
immediately when the battery state is realoff.
Change-Id: I90354fa261f73aa2e5b8451078576fcc070166a8
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit
c07e2dda8467cd2df6ccea80f3449e1a05993f31)
Youngjae Cho [Tue, 30 Jun 2020 02:22:14 +0000 (11:22 +0900)]
Change order of checking HW/SW bezel
SW bezel can have both HW/SW bezel node, but HW bezel can only have
HW bezel node. So check SW bezel first, and after check HW bezel.
Change-Id: I437eabb66e64cd922636999c1d3b952fa03e096c
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit
99d786411ab6361f2875a47876a478ccd04aaab3)
lokilee73 [Mon, 29 Jun 2020 04:53:49 +0000 (13:53 +0900)]
Add signal to broadcast key input values on iot profile
Change-Id: I2c40a4f5d09533ad4551578edd65ffca7d3d16db
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Youngjae Cho [Tue, 23 Jun 2020 03:52:27 +0000 (12:52 +0900)]
Fix internal lock/unlock not to broadcast signal
Change-Id: If45717a51fc6bca342e69dafb9c3d13aa6dc5400
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Tue, 23 Jun 2020 01:37:42 +0000 (10:37 +0900)]
Add varialbe for checking battery initialization
Change-Id: Ib3e325abdb0da182a86d07c56796db2366f2722e
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
lokilee73 [Fri, 26 Jun 2020 05:39:23 +0000 (14:39 +0900)]
Rescale temperature value when there is no HAL
Currently, temperature is updated with 3 digits.
So, it has to be rescaled to proper Celsius value.
ex) 280 -> 28
There are 2 ways to get temperature.
1. From HAL
- uevent_delivered : get it via uevent
- battery_get_current : read it directly from node
ex) /sys/class/power_supply/battery/status, health, present...
2. No HAL
- uevent_power_handler : get it via uevent
- load_uevent : read it directly from uevent node
ex) /sys/class/power_supply/battery/uevent
Change-Id: I07e123a5bfd0f66900037eac466d07a9e8e90922
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Karol Lewandowski [Wed, 24 Jun 2020 11:48:48 +0000 (13:48 +0200)]
packaging: Fix removal of systemd-shutdown alternative
Change-Id: Id10034c710c3ae2b950dd173868572f7ae895a52
INSUN PYO [Wed, 24 Jun 2020 11:24:40 +0000 (20:24 +0900)]
Change systemd-shutdown installation directory
On 64bit machine, "%{_libdir}" is /usr/lib64.
systemd uses fixed /usr/lib/systemd/systemd-shutdown
Change-Id: I2d196f61b47c9db992152d45bf7a14becc427f06
Youngjae Cho [Mon, 22 Jun 2020 05:26:28 +0000 (14:26 +0900)]
Fix to use usual dlog for initializing bezel
Replace critical_log to _I, _E
Change-Id: I55602d6c91489e2f57e771220ad175ef70b31edd
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit
a93e912d1f58d0830dca60b6da21df60ce3e731c)
Youngjae Cho [Mon, 22 Jun 2020 02:12:32 +0000 (11:12 +0900)]
Fix how to determine HW/SW bezel
HW/SW bezel cannot be distinguished each other by checking existance
of get_state/get_sw_state function, as those are defined for all target.
Fixed it to call the function and check the return value.
Change-Id: I1a296c9682e5dcf3e0393f804f532283406a7007
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit
dedebfceef94e0cac2ffe9998c4744e78bde9176)
lokilee73 [Mon, 15 Jun 2020 12:17:32 +0000 (21:17 +0900)]
Change battery units in auto test
1. Add power_source, voltage, current and temperature
in battery power_supply_type
ex) power_source, voltage, current and temperature are
updated by uevent. BUt they are not tested.
2. Add compare_power_supply to check set and get values.
ex) pass and fail is only decided by returned value
Add compare_power_supply to improve it.
3. Add vconf test
ex) Add vconf test function to check it
4. Send battery parameters to battery_changed
ex) Currently, battery parameters set by auto test are
not delievered to battery_changed.
So, battery related parameters and vconf values are
not updated properly
Change-Id: I90a98cccfc6f0421bf5762ef6b766876cf6b1e56
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
INSUN PYO [Wed, 17 Jun 2020 23:57:21 +0000 (08:57 +0900)]
Fix indentation
Change-Id: I747371c7fca1f3ad0d0df37160180af68f9fd3ff
lokilee73 [Thu, 18 Jun 2020 01:31:20 +0000 (10:31 +0900)]
Change to print led logs when pid is different
Change-Id: I832fbd8da3e9d5602f8444e90f97fb289bd928fe
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Hyotaek Shim [Fri, 12 Jun 2020 01:12:37 +0000 (01:12 +0000)]
Merge "Add voltage_now and voltage_average in battery_changed" into tizen
Hyotaek Shim [Thu, 11 Jun 2020 11:23:27 +0000 (20:23 +0900)]
Apply tizen.org/privilege/internal/default/platform to PmQos
Change-Id: I6a166c5817491f4e7598078346ac92590470b2aa
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
lokilee73 [Thu, 11 Jun 2020 08:43:30 +0000 (17:43 +0900)]
Add voltage_now and voltage_average in battery_changed
voltage_now and voltage_average are updated via battery_changed.
So add them in it.
Change-Id: Iaa4a6d483dbbb6bdca1b3f5c3b7362cfca533f91
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Wed, 10 Jun 2020 08:25:18 +0000 (17:25 +0900)]
Change code to control multi led
Change-Id: If6ff3cfa37c3c15369e09640a86bb1a8736e41db
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Hyotaek Shim [Tue, 9 Jun 2020 05:54:36 +0000 (14:54 +0900)]
Add BixbyWakeup to pmqos
Change-Id: Ib80d1338b6a9bc98678d8bd16af05b4d6507e0a7
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Hyotaek Shim [Tue, 9 Jun 2020 04:23:55 +0000 (13:23 +0900)]
Add PATH=/bin:/usr/bin:/sbin:/usr/sbin to rndis.sh
Change-Id: I50c9078262d1caf30d8ceef16b03da9990e98719
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Sangyoon Jang [Thu, 4 Jun 2020 04:18:41 +0000 (13:18 +0900)]
Revert "tzip: enable kernel cache"
This reverts commit
943f83448abdbd96607ffce72587663ca75bebfb.
These cache option cause a problem in some cases such as mount
install. The older version of zip file is mounted even if the newer version
is installed.
Change-Id: Ia5f6e1fb94d738400b3d28662db25ea84cd3d596
Youngjae Cho [Tue, 2 Jun 2020 02:01:07 +0000 (11:01 +0900)]
Filter pid -1 by dbus_connection_get_sender_pid()
When dbus_connection_get_sender_pid() returns -1 as pid, regards it
as the sender has been dead.
Change-Id: Iecaa3f946b9da6533583fe2f4bfc4f2af4842931
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
lokilee73 [Tue, 2 Jun 2020 05:35:10 +0000 (14:35 +0900)]
Add battery plugin for wearable and mobile
Wearable plugin
- check_power_supply_noti
- update_ovp
- display_changed: relaunch health popup on LCDON
Mobile plugin
- check_power_supply_noti
- update_ovp
- display_changed
- added dbus signal handler: abnormal_popup_dbus_signal_handler
Change-Id: I86a08e0f8d61e997fa0fc424e32d6d8c1de5cf96
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
lokilee73 [Thu, 4 Jun 2020 07:29:34 +0000 (16:29 +0900)]
Fix svace warning
Change-Id: I8b55e5fe02d4f03c9df0f81f87dc3ca4a0d20e7c
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
(cherry picked from commit
87865b414580b2b274e05e32f37c5bedd5b0d17e)
Youngjae Cho [Wed, 3 Jun 2020 04:59:58 +0000 (13:59 +0900)]
Fix lcd_on_direct() not to update old state
As updating old state within lcd_on_direct() causes several problems,
this patch reverts the parts related to state update of lcd_on_direct()
from the following patches.
-
613ecd25da136c6cf210e00a15a21783f7ecdf5b
-
32a6e47d137a00c2a8b037b23ef4387f2ebecb23
-
6e04a05360c0a77a1e4d0275d967acb89719d3e1
In general, lcd_on_direct() is followed by
default_proc_change_state_action(), and the subroutine is like below.
- lcd_on_direct() : update old state
-> ... (do something)
-> default_proc_change_state_action() : update old state once more
-> default_action()
So for the default_action(), if it is called through lcd_on_direct(),
pm_old_state and pm_cur_state is always same because old state is
updated twice. This makes below code in default_action() unreachable.
device_notify(DEVICE_NOTIFIER_LCD, (void *)&pm_cur_state);
As a result, lcd_on_direct() should not update the pm_old_state.
Change-Id: Iefe46720100c9adc858f86ba54b06361946e3b88
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
lokilee73 [Wed, 3 Jun 2020 04:50:45 +0000 (13:50 +0900)]
Add udev related code in auto test for battery tests
udev events should not be delivered for battery tests.
So, add udev related code to start and stop it.
In addition, add battery full and temperature test functions.
Change-Id: I3624b2c8238b08b36a89eacc9c6674458ffab452
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
(cherry picked from commit
fa309a75edd44811da1bc1cbc9ec4f2a6daa1680)
lokilee73 [Wed, 20 May 2020 09:36:49 +0000 (18:36 +0900)]
Fix linking error detected by ASAN
global variable battery_plgn is multiply defined in plugin.c and power-supply.c
error log:
[ 283s] /usr/lib/gcc/armv7l-tizen-linux-gnueabi/9.2.0/../../../../armv7l-tizen-linux-gnueabi/bin/ld:
../../../src/shared/libshared.a(plugin.c.o):(.bss+0x40): multiple definition of `battery_plgn';
CMakeFiles/mobile-battery.dir/__/__/__/src/battery/power-supply.c.o:(.bss+0x5a0): first defined here
[ 283s] /usr/lib/gcc/armv7l-tizen-linux-gnueabi/9.2.0/../../../../armv7l-tizen-linux-gnueabi/bin/ld:
../../../src/shared/libshared.a(plugin.c.o):(.bss+0xc1): multiple definition of `__odr_asan.battery_plgn';
CMakeFiles/mobile-battery.dir/__/__/__/src/battery/power-supply.c.o:(.bss+0x7a0): first defined here
Change-Id: I76d354f7a7d3532c8c5a933090fcc88a57c2e76e
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Wed, 27 May 2020 10:46:25 +0000 (19:46 +0900)]
Fix not to reset timer by 7 seconds by custom_lcdon() during tutorial
custom_lcdon() resets normal timeout by 7 seconds.
This method is called when, for example, wrist-up or notification occurs.
But during tutorial, fixed it not to reset timeout timer by fixed 7 seconds,
but to reset the value of setting timeout.
Change-Id: I9b3dda9c057ca8e7f0d895455573db47ebed39da
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Wed, 27 May 2020 10:42:31 +0000 (19:42 +0900)]
Reset timer on switch_lcd_on
switch_lcd_on turns on lcd and change internal state to LCD_NORMAL.
But it doesn't reset timer.
It will be done in subroutine, default_action().
But some cases, default_action() cannot be reached.
For that case, switch_lcd_on() has to reset timer once more.
Change-Id: I3709195337de05509d7b32af60f698d27022d938
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Wed, 27 May 2020 04:51:48 +0000 (13:51 +0900)]
Remove unused cpu conf related code
Change-Id: I2697f58ef58e91048281c14c7d848b6cfe1e2e20
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
(cherry picked from commit
30324e833214e2beb02b28f73c6669a77ad457c9)
Youngjae Cho [Tue, 26 May 2020 11:18:06 +0000 (20:18 +0900)]
Fix pmqos
Now for each pmqos_cpu manages timer itself by name. So it is
possible that multiple timer exist and run at the same time.
On receiving new pmqos request for starting boost,
1. If there is no timer managed by that pmqos name, starts boost and
create a timer.
2. If there is a running timer and the new timeout is later than the
previous timeout, delete the existing timer and create a new one.
At this time, the important thing is that the cpu boost is already
started, so the cpu boost is not performed.
3. If there is a running timer and the new timeout is earlier than the
previous timeout, do nothing because the previous timer includes
current request.
Change-Id: Id3956a949aee85070896ff5cb64d93484f5e3427
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit
5bec2b03d472c9e3737714e948029a0ef5a19bde)
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Mon, 18 May 2020 08:08:59 +0000 (17:08 +0900)]
Deduplicate display plugin source code: Display Lock
Change-Id: Ia0e44856f304f345543e50744dd8a459006fcd2d
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
lokilee73 [Fri, 15 May 2020 07:57:08 +0000 (16:57 +0900)]
Add PACKAGE_UNPACK_PATH
Change-Id: I479937e2e8af68af53c0e158883601e6b79f8c47
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Fri, 15 May 2020 07:46:36 +0000 (16:46 +0900)]
Fix battery noti depending on profiles
Only mobile profile sends noti
- remove_health_popup()
- changed_battery_cf()
Change-Id: Ib1e2a5b1979acf477a8b7f533d4ab7f98d9d6ddd
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
lokilee73 [Fri, 15 May 2020 08:16:40 +0000 (17:16 +0900)]
Remove declared but not implemented functions
- deviced_mmc_control
- deviced_usb_control
- deviced_get_usb_control
Change-Id: If237e8bfa9c54265f785a3bb89820511f7928f7a
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Chang Joo Lee [Wed, 13 May 2020 08:36:17 +0000 (08:36 +0000)]
Revert "Comment out code that doesn't work"
This reverts commit
80d2fd610915beec36aa0a7ff6aad97df732c671.
Change-Id: Ib89eef05f2bab376f0e9e52f612bebbf73babf1f
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Wed, 13 May 2020 07:40:33 +0000 (16:40 +0900)]
Separate the lock of USB and USB-HOST
USB-HOST now uses INTERNAL_LOCK_USB_HOST.
Using the same lock, INTERNAL_LOCK_USB, by USB and USB-HOST could cause
problem. Below is an example.
1. USB connected -> grab INTERNAL_LOCK_USB to lcdoff
2. USB-HOST connected -> grab INTERNAL_LOCK_USB to lcdoff
3. USB-HOST disconnected -> release INTERNAL_LOCK_USB
The step 3 is problem: USB-HOST release INTERNAL_LOCK_USB which had been
acquired by USB.
Change-Id: I1f0492e0e49effe98394a617ae5600f73ca52497
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Wed, 13 May 2020 03:32:22 +0000 (12:32 +0900)]
Use aw_register
Change-Id: Ide9dfadc39d11e9ff0bfe6ebb318e11e0ffcd654
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit
c1430cc2daf19ac5908f2666f7b03a2c7843a4e9)