summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-09-01Enhance display/power lock managemenentsubmit/tizen/20200902.021453accepted/tizen/unified/20200902.145534Youngjae Cho4-34/+279
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>
2020-09-01Return errno for failing fopen in config_parseYoungjae Cho1-1/+1
Change-Id: I23c0e54128f59c9a3b3e533add1670cfb74bf9df Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2020-08-27Dosen't lock becasue it could prevent Suspend-to-RAMlokilee731-7/+3
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>
2020-08-26Deduplicate Power Manager history functionslokilee736-296/+82
ex) pm_history_init pm_history_save pm_history_print Change-Id: Ib322155e0091d6f972a833d140beb3c1bd4c890b Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
2020-08-24Add internal CAPIs to auto testsubmit/tizen/20200825.014022submit/tizen/20200824.103034accepted/tizen/unified/20200825.142852lokilee7310-73/+484
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>
2020-08-20Fix display not to go into AOD when poweroffYoungjae Cho1-3/+1
Change-Id: Ie57cc79a23eb20b948e8bdf54ce6acadcd1474b6 Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2020-08-18Change display_conf to staticsubmit/tizen/20200818.110444accepted/tizen/unified/20200819.100448Yunmi Ha19-65/+172
Change-Id: I64cc875bd0fb554f297bf95ba6994ffe429c52ef Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
2020-08-18Change states global variable to staticYunmi Ha10-36/+57
Change-Id: I86483d65ad63f6ceca0c12111f994ffaf95669eb Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
2020-08-18Change battery global variable to staticYunmi Ha10-60/+93
Change-Id: I2d2b3e024e0518bf9f442ec4820c12546085160f Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
2020-08-18Fix build warningsHyotaek Shim2-0/+2
Change-Id: Ibcc05e48990655e0d62e08dc43fa7fe448c1cb9c Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
2020-08-14Add initialize constructor for backlight init.submit/tizen/20200814.095001accepted/tizen/unified/20200817.134623Yunmi Ha2-9/+6
Change-Id: I592367573b0550d6841b1440ba7e2ea47849471f Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
2020-08-14Change backlight_ops staticYoungjae Cho25-360/+494
Change-Id: I8d958fc084a74e6272f470bf81a7f1a342c10492 Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2020-08-13Add initialize constructor for variable init.Yunmi Ha34-245/+251
Change-Id: I0c469e3609f4c99a36531d1a2a9adbcea48aab50 Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
2020-08-12Move variable initialization code to probe functionYunmi Ha11-48/+95
Change-Id: Ieafb6b73e6a64da572d79b401937cc495bb8fa16 Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
2020-08-12Fix battery_plgn memory corruptionYunmi Ha1-1/+1
Change-Id: Ib20a86452e669873cd7b0f1a0ae3ef21f077ac0a Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
2020-08-12Fix initializtion for extcon_usbhostHyotaek Shim1-1/+13
Change-Id: I98e67b10b0f3790b70ee77bbd3d41cb6ee99dc39 Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
2020-08-11Guarantee to restore brightness to default on LCDONYoungjae Cho2-30/+41
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>
2020-08-11Change power related global variables and functions to staticlokilee7316-913/+366
Change-Id: I7a1f14ac7d7ebab5a2cefab8b070b246e62dd866 Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
2020-08-10Change display_plgn, battery_plgn staticYoungjae Cho39-265/+550
Change-Id: I3933a70a3f197cf6955b378429aa99c6e1f69150 Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2020-08-10Add doze_pmqos_request for cpu throttlingsubmit/tizen/20200810.073747accepted/tizen/unified/20200810.123002lokilee732-1/+22
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>
2020-08-05Remove unnecessary dependenciesYunmi Ha11-11/+0
- remove 'libdevice-node' package dependencies. Change-Id: I7e85a9bc54e077923b8d44793e3df7d9e91a7e32 Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
2020-08-04Wait for 4 sec. before poweroff_prepare() and set LCD_OFF in disable_display()Hyotaek Shim8-79/+34
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>
2020-08-04Revert "Change abnormal health popup lcddim lock to 60s"Hyotaek Shim1-1/+1
This reverts commit ec0c8ae86c88d2e5f42b133ff408416e75ebeef3. Change-Id: I8ad4a44d91601d049f0707e65256c83d49347432
2020-07-28Add DPMS checklist for dependable DPMS controlYoungjae Cho3-0/+65
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)
2020-07-24Apply new power management feature, Doze modesubmit/tizen/20200724.060056Youngjae Cho7-9/+237
Change-Id: Ia515c2130c1b68eab6dc5bc2b5a3d2beb62c1114 Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2020-07-23Change abnormal health popup lcddim lock to 60sYoungjae Cho1-1/+1
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)
2020-07-21Do not control sw bezel on changing display statesubmit/tizen/20200721.112435accepted/tizen/unified/20200723.161309Youngjae Cho1-8/+5
sw bezel is only controlled by vconf. Change-Id: I44a75eed17ccd3cd5115bce810cd15a017bfdf9f Signed-off-by: Youngjae Cho <y0.cho@samsung.com> (cherry picked from commit b8151da7cb2cc94a21b99aaebfe1ba9ac31e603b)
2020-07-15Devide pm_status_flag into set and clear functionslokilee7320-138/+146
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>
2020-07-15Add missing NULL check of calling HALYoungjae Cho3-3/+3
Change-Id: I85454fd6ce2bebd041025240e0b7c1606b9e6ec4 Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2020-07-15Add null checking code before calling a bezel HALYoungjae Cho1-1/+18
Change-Id: Idb80accdaefb7820a0776ca55415d2ffd115d83f Signed-off-by: Youngjae Cho <y0.cho@samsung.com> (cherry picked from commit 3809eaa73c98dbc14fae730352fc877e19622f7c)
2020-07-13Move pm_old_state to display.c to remove global variablelokilee739-91/+93
Change-Id: Id366233f17a0ab7cee367775ce5758a8df21854d Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
2020-07-09Move pm_cur_state to display.c to remove global variablelokilee7323-452/+468
Change-Id: If9eb70c2b8fdeff1f4248983fa5d8b07bd6de86b Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
2020-07-08Change global variable to static onelokilee7317-37/+29
Change-Id: I371c2bb10dd31fd0080c6c87a62b27be9891a5fa Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
2020-07-08Fix coverity issueYoungjae Cho1-3/+5
Change-Id: Ia09f20d916d8128c07aea903dca24a5afa5a562e Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2020-07-07Fix coverity issueYoungjae Cho2-3/+5
Change-Id: Ia9a1a6aa32514a482ce64345088ad99be59e9634 Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2020-07-07Add vibration intensity control logic for bezelYoungjae Cho1-0/+39
Change-Id: I1025c52aa25e549bd56b35d54a570fd5078813d7 Signed-off-by: Youngjae Cho <y0.cho@samsung.com> (cherry picked from commit fd2915816cc1dd60ec856fea0afaa3649b5154bb)
2020-07-06Add brightness interactionsubmit/tizen/20200706.095902accepted/tizen/unified/20200707.140919Youngjae Cho11-264/+448
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>
2020-07-06Add auto-test for brightnessYoungjae Cho7-1/+402
Usage: deviced-auto-test wearable brightness [tcname] Change-Id: Ied1e76aa411e0d78e912ad7050de4e0077933728 Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2020-07-06Fix not to defer processing lowbat on realoffYoungjae Cho1-2/+12
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)
2020-06-30Change order of checking HW/SW bezelYoungjae Cho1-4/+4
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)
2020-06-29Add signal to broadcast key input values on iot profilesubmit/tizen/20200629.052809accepted/tizen/unified/20200701.032258lokilee731-0/+6
Change-Id: I2c40a4f5d09533ad4551578edd65ffca7d3d16db Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
2020-06-26Fix internal lock/unlock not to broadcast signalYoungjae Cho4-153/+168
Change-Id: If45717a51fc6bca342e69dafb9c3d13aa6dc5400 Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2020-06-26Add varialbe for checking battery initializationYoungjae Cho3-1/+14
Change-Id: Ib3e325abdb0da182a86d07c56796db2366f2722e Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2020-06-26Rescale temperature value when there is no HALsubmit/tizen/20200626.071257accepted/tizen/unified/20200626.133353lokilee731-1/+10
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>
2020-06-24packaging: Fix removal of systemd-shutdown alternativeKarol Lewandowski1-1/+1
Change-Id: Id10034c710c3ae2b950dd173868572f7ae895a52
2020-06-24Change systemd-shutdown installation directoryINSUN PYO1-1/+1
On 64bit machine, "%{_libdir}" is /usr/lib64. systemd uses fixed /usr/lib/systemd/systemd-shutdown Change-Id: I2d196f61b47c9db992152d45bf7a14becc427f06
2020-06-22Fix to use usual dlog for initializing bezelYoungjae Cho1-3/+3
Replace critical_log to _I, _E Change-Id: I55602d6c91489e2f57e771220ad175ef70b31edd Signed-off-by: Youngjae Cho <y0.cho@samsung.com> (cherry picked from commit a93e912d1f58d0830dca60b6da21df60ce3e731c)
2020-06-22Fix how to determine HW/SW bezelYoungjae Cho1-2/+10
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)
2020-06-19Change battery units in auto testlokilee733-170/+581
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>
2020-06-18Fix indentationINSUN PYO1-7/+7
Change-Id: I747371c7fca1f3ad0d0df37160180af68f9fd3ff