summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Chanwoo Choi [Mon, 29 Aug 2022 07:19:51 +0000 (16:19 +0900)]
halapi: power: Remove duplicate code
Change-Id: I9fa73a2ae63cdd5d14dd6472b3a441a0b8f5530a
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Seung-Woo Kim [Tue, 23 Aug 2022 08:58:52 +0000 (17:58 +0900)]
halapi: power: Check dvfs->get_avail_governor() properly
Do null check properly for dvfs->get_avail_governor().
Change-Id: I70edddcf552ff677a25611c948ad9e8a2572025a
Fixes:
9f76c33751ba ("halapi: power: Add exec_func helper to simplify the function call")
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Chanwoo Choi [Fri, 22 Jul 2022 01:06:36 +0000 (10:06 +0900)]
halapi: power: Add new resources type for disk and network
Add missing resource type of display/system/process_group
and then add new resource type for block/network hardware resource.
Change-Id: Idebb762d28f8a4917a4357c7be48fbaf6d4c9eb4
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Wed, 15 Jun 2022 10:23:11 +0000 (19:23 +0900)]
halapi: power: Add exec_func helper to simplify the function call
hal-api-power functions checks the validation of function pointer
and then execute the initialized function pointer with proper argument.
Almost hal-api-power funcitons uses the same pattern style
to both check and execute the function pointer.
So that add exec_func_* helper functions to simplify
the same pattern and keep the consistent coding style.
Change-Id: I6c09fc027bdbc03977e4cecd9e6ae7f375560385
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Tue, 14 Jun 2022 10:19:41 +0000 (19:19 +0900)]
halapi: power: Check whether fault_around_bytes input is valid or not
The minimum of fault_around_bytes is 4096 bytes.
In orde to set the default faround_around_bytes,
must use the multiple value of 4096 bytes.
Change-Id: I8f0aa3fc0c7570e4e8fb9661c2dc5544df43eb72
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Wed, 15 Jun 2022 09:40:29 +0000 (18:40 +0900)]
halapi: power: Remove duplicate code by adding isValidParam() function
All hal-api-power funcitons should check the parameter validation.
Add new isValidParam() functions in order to remove the duplicate codes
and then in order to add easily new parameter validation rule.
Change-Id: I079fe095b1758a7aac0ecc8f52445d0d31c12b0f
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Wed, 15 Jun 2022 08:05:26 +0000 (17:05 +0900)]
test: unittest: Add hal-backend-power for hal-api-power
In order to test the exported functions of hal-api-power,
require the power hal backend package. So that
add basic hal-backend-power backend and reimplement
hal_common_get_backend/hal_common_put_backend for hooking.
Change-Id: I14e8dfc02babb9672ac1b209081431870ff86a28
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Tue, 14 Jun 2022 04:28:41 +0000 (13:28 +0900)]
test: unittest: hal-api-power-unittest when building package
Add new hal-api-power unittest code in order to
test the hal-api-power functions when building package.
Change-Id: Ide409a1a197971589fa364c1ed7ac0fe1673c2b0
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Mon, 24 Jan 2022 06:11:47 +0000 (15:11 +0900)]
halapi: power: Add new PASS_RESOURCE_PROCESS_ID for indicating the process
Change-Id: I42fbf6fb11b1e225638e87b83dfa014c462869fd
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Sung-hun Kim [Fri, 8 Oct 2021 05:49:37 +0000 (14:49 +0900)]
halapi: power: fix a typo
Change-Id: I7e48c3feeb998e6b7598f5895ea39f9b96372c9d
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
Chanwoo Choi [Tue, 28 Sep 2021 07:20:40 +0000 (16:20 +0900)]
hal-api: power: Use usage_count to support multiple call
The user of hal-api-power such as PASS daemon can execute
the hal_power_get_backend and hal_power_put_backend at multiple times.
Until now, hal-api-power doesn't support the multiple function call
of hal_power_get_backend/put_backend. It cause that return error value
when calling hal_power_put_backend from user of hal-api-power.
In order to fix this issue, use usage_count to put the hal backend
when usage_count is zero.
Change-Id: Idc1aef66e09e335cc158ace4c359673ff45792b8
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Fri, 13 Aug 2021 04:03:04 +0000 (13:03 +0900)]
halapi: power: Add new battery HAL API to control charging status
When over-temperature is meaused for h/w resource, must need to change
the state in order to down the temperature for preventing the dangerous
situation. So that add new battery HAL API for controlling the battery
status via power_supply subsystem in Linux kernel.
[Detailed new thermal HAL API]
/* Get and set the batterh charging state */
int hal_power_battery_set_charging_state(unsigned int device_type, char *res_name, int state);
int hal_power_battery_get_charging_state(unsigned int device_type, char *res_name);
/* Get and set the battery charging current (unit: uA) */
int hal_power_battery_set_charging_current(unsigned int device_type, char *res_name, int charing_current_uA);
int hal_power_battery_get_charging_current(unsigned int device_type, char *res_name);
Change-Id: Ie627e3619fea1876c5a52dce503e0f322dfad837
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Mon, 2 Aug 2021 05:15:57 +0000 (14:15 +0900)]
halapi: power: Add support of thermal operation for PASS_RESOURCE_NONSTANDARD_ID
The non-standard h/w resource doesn't depend on the any specific linux
kernel subsystem. But, any h/w resources are able to be affected from
temperature. So that add support of thermal operation
for PASS_RESOURCE_NONSTANDARD_ID to control the over-temperature
with the proper behaviors.
Change-Id: I1fb20b5ee10aa876a95fde899bdcfdd537c7633c
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Mon, 2 Aug 2021 04:12:58 +0000 (13:12 +0900)]
halapi: power: Add new PASS_RESOURCE_BATTER_ID for battery h/w
The battery h/w resource is very important in order to prevent
the dangerous situation such as fire, skin burn and so on.
So that it must need to monitor the temperature of battery
and then if over-temperature is detected, need to change
the battery status like discharging for decreasing the temperture
until safe tempeature.
Change-Id: I52ee3a2ea0fbe4ffdc51a2ce1afdb8dddb8506d4
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Mon, 2 Aug 2021 03:58:57 +0000 (12:58 +0900)]
halapi: power: Add new thermal HAL API for cooling device of thermal
When over-temperature is meaused for h/w resource, must need to change
the state in order to down the temperature for preventing the dangerous
situation. So that add new thermal HAL API for cooling device of thermal
to change the state of h/w resource such as discharging the battery,
decrease the maximum freuqency of CPU/GPU/BUS and so on.
[Detailed new thermal HAL API]
int hal_power_thermal_set_cooling_device_state(unsigned int device_type,
char *cooling_device_name, int state);
int hal_power_thermal_get_cooling_device_state(unsigned int device_type,
char *cooling_device_name);
int hal_power_thermal_get_cooling_device_max_state(unsigned int device_type,
char *cooling_device_name);
Change-Id: I7cde3f47e607f2f92c87e6874ddb291e3b7bb99e
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Thu, 22 Apr 2021 05:46:43 +0000 (14:46 +0900)]
halapi: Replace fPIE gcc option with fPIC
The fPIE option is for the executable binary.
It is not proper for shared library files.
So that correct the wrong use-case by using fPIC.
Change-Id: If5a12ac729fd280451cf90c8f8723ac9868c497b
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Seung-Woo Kim [Thu, 25 Mar 2021 04:09:51 +0000 (13:09 +0900)]
halapi: power: add hal-api-common dependency to pc
To refer hal-api-common specific libs from hal-api-power linked
binary, add hal-api-common dependency to pc explictly.
Change-Id: Ie30d115c0191a5406e38e95a0e7b9453ee14668a
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Fri, 29 Jan 2021 09:09:32 +0000 (18:09 +0900)]
halapi: power: Check g_power_funcs is initialized always
Check g_power_funcs initialized always.
Change-Id: I4141eeaa4181187516b7ab569db9ea0a46a70ccd
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Chanwoo Choi [Wed, 20 Jan 2021 04:49:51 +0000 (13:49 +0900)]
packaging: Remove redundant separator and remove duplicate defintion
The spec file has passed the redundant separator ('/') with %{_libdir}.
It is not needed. So that remove it. Also, remove the duplicate
definition in CMakeLists.txt.
Change-Id: I96730c061e1c859cd9a7892016c1ca1a18b3913a
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Tue, 5 Jan 2021 06:36:14 +0000 (15:36 +0900)]
halapi: power: Add hal-api-power package for Power HAL API
Power HAL API (hal-api-power) provides the HAL C API for Tizen internal user such as
library and daemon. Also, it provides HAL interface for Tizen device
developer in order to port Tizen to new h/w devices.
hal-api-power supports the control of CPU, Memory Bus, GPU and Memory
h/w resources for boosting the performance and for limiting the
power-consumption. hal-api-power makes the following two packages:
[Packages provided by hal-api-power git]
1. hal-api-power-*.rpm
- /usr/lib/hal/libhal-api-power.so if armv7l
- /usr/lib64/hal/libhal-api-power.so if aarch64
2. hal-api-power-devel-*.rpm
- /usr/include/hal/hal-power.h
- /usr/include/hal/hal-power-interface.h
Change-Id: I3989416368bc8aaf910696596daa6eaddeb22e92
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Tizen Infrastructure [Fri, 18 Dec 2020 00:44:27 +0000 (00:44 +0000)]
Initial empty repository