platform/hal/api/power.git
22 months agoAdd hal-api-power-unittest sandbox/chanwoochoi/hal-api-power-unittest
Chanwoo Choi [Tue, 14 Jun 2022 04:28:41 +0000 (13:28 +0900)]
Add hal-api-power-unittest

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2 years agohalapi: power: Add new PASS_RESOURCE_PROCESS_ID for indicating the process 01/270001/1 accepted/tizen/unified/20220125.121749 submit/tizen/20220124.062208
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>
2 years agohalapi: power: fix a typo 68/265068/1
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>
2 years agohal-api: power: Use usage_count to support multiple call accepted/tizen/6.5/unified/20211028.115016 accepted/tizen/unified/20210929.022354 submit/tizen/20210928.093203 submit/tizen_6.5/20211028.163201 tizen_6.5.m2_release
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>
2 years agohalapi: power: Add new battery HAL API to control charging status 49/262549/3 accepted/tizen/unified/20210816.122904 submit/tizen/20210813.100724
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>
2 years agohalapi: power: Add support of thermal operation for PASS_RESOURCE_NONSTANDARD_ID 54/262154/3 accepted/tizen/unified/20210809.061405 submit/tizen/20210809.032652 submit/tizen/20210813.013856
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>
2 years agohalapi: power: Add new PASS_RESOURCE_BATTER_ID for battery h/w 53/262153/1
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>
2 years agohalapi: power: Add new thermal HAL API for cooling device of thermal 52/262152/1
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>
3 years agohalapi: Replace fPIE gcc option with fPIC 81/257281/2 accepted/tizen/unified/20210427.085802 submit/tizen/20210426.101321
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>
3 years agohalapi: power: add hal-api-common dependency to pc 06/255906/1 accepted/tizen/unified/20210328.230643 submit/tizen/20210325.052307
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>
3 years agohalapi: power: Check g_power_funcs is initialized always 63/252563/1 accepted/tizen/unified/20210204.134457 submit/tizen/20210201.020414 submit/tizen/20210204.032624
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>
3 years agopackaging: Remove redundant separator and remove duplicate defintion 63/251863/1
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>
3 years agohalapi: power: Add hal-api-power package for Power HAL API 45/251345/4 accepted/tizen/unified/20210115.004615 submit/tizen/20210114.085609
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>
3 years agoInitial empty repository master
Tizen Infrastructure [Fri, 18 Dec 2020 00:44:27 +0000 (00:44 +0000)]
Initial empty repository