platform/core/api/device.git
6 weeks agotouchscreen: Enhance API description 68/318568/2 accepted/tizen_9.0_unified accepted/tizen_unified accepted/tizen_unified_toolchain accepted/tizen_unified_x accepted/tizen_unified_x_asan tizen_9.0 accepted/tizen/9.0/unified/20241030.231607 accepted/tizen/unified/20241006.053304 accepted/tizen/unified/toolchain/20241022.122317 accepted/tizen/unified/toolchain/20241022.122808 accepted/tizen/unified/x/20241007.013539 accepted/tizen/unified/x/asan/20241013.235615 tizen_9.0_m2_release
Yunhee Seo [Wed, 2 Oct 2024 07:03:11 +0000 (16:03 +0900)]
touchscreen: Enhance API description

To improve readability and facilitate comprehension,
more detailed API descriptions are added.

Change-Id: Iffbc72a31817dff1d0964c33fea027294b9bc594
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
6 weeks agotemperature: Enhance API description 67/318567/2
Yunhee Seo [Wed, 2 Oct 2024 00:59:40 +0000 (09:59 +0900)]
temperature: Enhance API description

To improve readability and facilitate comprehension,
more detailed API descriptions are added.

Change-Id: I17ba0ccc3c7fd996c07341c1e5d1d7cd18ecd3bf
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
6 weeks agopower: Enhance API description 87/318487/2
Yunhee Seo [Mon, 30 Sep 2024 10:50:35 +0000 (19:50 +0900)]
power: Enhance API description

To improve readability and facilitate comprehension,
more detailed API descriptions are added.

Change-Id: Icd023fb6fff590a9c9efec16c2e61e7c15d28fe6
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
7 weeks agopmqos: Enhance API description 86/318486/1
Yunhee Seo [Sat, 28 Sep 2024 04:12:48 +0000 (13:12 +0900)]
pmqos: Enhance API description

To improve readability and facilitate comprehension,
more detailed API descriptions are added.

Change-Id: I398adf7bddd72818402ab6eb01f2d37fc8bcbb5b
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
7 weeks agoled: Enhance API description 15/318415/4
Yunhee Seo [Fri, 27 Sep 2024 12:15:24 +0000 (21:15 +0900)]
led: Enhance API description

To improve readability and facilitate comprehension,
more detailed API descriptions are added.

Change-Id: Ic33e085bf810418208eec37d40bc59d6c58eadf0
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
7 weeks agoir: Enhance API description 14/318414/4
Yunhee Seo [Fri, 27 Sep 2024 10:57:54 +0000 (19:57 +0900)]
ir: Enhance API description

To improve readability and facilitate comprehension,
more detailed API descriptions are added.

Change-Id: Id8f4a2e14c72b51d582e209ea32772ead8e1b3b8
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
7 weeks agoinput: Enhance API description 13/318413/4
Yunhee Seo [Fri, 27 Sep 2024 10:15:43 +0000 (19:15 +0900)]
input: Enhance API description

To improve readability and facilitate comprehension,
more detailed API descriptions are added.

Change-Id: I59745efa269c63b223690b91fe4053174d57feff
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
7 weeks agohaptic: Enhance API description 12/318412/2
Yunhee Seo [Fri, 27 Sep 2024 08:04:03 +0000 (17:04 +0900)]
haptic: Enhance API description

To improve readability and facilitate comprehension,
more detailed API descriptions are added.

Change-Id: I255f140a71adecc0cf13ba4bcd59e9a5bc2598c7
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
7 weeks agodisplay: Enhance API description 59/318359/1
Yunhee Seo [Fri, 27 Sep 2024 07:22:55 +0000 (16:22 +0900)]
display: Enhance API description

To improve readability and facilitate comprehension,
more detailed API descriptions are added.

Change-Id: I2084a9645f930e5af9fedcef7c24e32af7869186
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
7 weeks agodevice: Enhance API description 00/318300/1
Yunhee Seo [Thu, 26 Sep 2024 01:17:01 +0000 (10:17 +0900)]
device: Enhance API description

To improve readability and facilitate comprehension,
more detailed API descriptions are added.

Change-Id: Id9604ca5d6a00296cfad87fbe034d5323d931702
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
7 weeks agocallback: Enhance API description 99/318299/1
Yunhee Seo [Wed, 25 Sep 2024 08:12:42 +0000 (17:12 +0900)]
callback: Enhance API description

To improve readability and facilitate comprehension,
more detailed API descriptions are added.

Change-Id: Idf217b7ec85cf2145de96ce32ab6bfeccbc8a8dc
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
7 weeks agoboard: Enhance API description 54/318154/2
Yunhee Seo [Wed, 25 Sep 2024 06:40:40 +0000 (15:40 +0900)]
board: Enhance API description

To improve readability and facilitate comprehension,
more detailed API descriptions are added.

Change-Id: I7a6cecd277c884a75953821ae48aed7fd3786ba0
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
7 weeks agobattery: Enhance API description 53/318153/2
Yunhee Seo [Wed, 25 Sep 2024 04:29:12 +0000 (13:29 +0900)]
battery: Enhance API description

To improve readability and facilitate comprehension,
more detailed API descriptions are added.

Change-Id: I3a8acde35dc9b8f98aa99750310baef6976642de
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
3 months agoFix wrong style description to Native API header style 36/315836/1 accepted/tizen_unified_dev accepted/tizen/unified/20240809.055151 accepted/tizen/unified/dev/20240812.222903 accepted/tizen/unified/toolchain/20240813.045104 accepted/tizen/unified/x/20240812.041838 accepted/tizen/unified/x/asan/20240813.225906
Yunhee Seo [Thu, 8 Aug 2024 06:10:57 +0000 (15:10 +0900)]
Fix wrong style description to Native API header style

Remove the wrong style descriptions and change descriptions
to keep Native API style.

Change-Id: Id7b12cd457483e4149123032a133fb71f1ba7c34
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
4 months agobattery: Modify the length of strncmp parameter 68/314568/1 accepted/tizen/unified/20240716.112416 accepted/tizen/unified/20240716.140259 accepted/tizen/unified/dev/20240717.110309 accepted/tizen/unified/toolchain/20240812.131632 accepted/tizen/unified/x/20240717.012438
Yunhee Seo [Mon, 15 Jul 2024 11:34:58 +0000 (20:34 +0900)]
battery: Modify the length of strncmp parameter

When comparing two strings, it is not clear what values are contained in the case where they are obtained from an array.
Thus, using sizeof literal is more clear in terms of readability and maintenance.
This is meaningful especially when the array does not contain proper values or is empty.

Change-Id: Id1f24665910e4f754e7c77d89ecd036839309add
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
4 months agohaptic: Modify return value check properly 89/314189/1 accepted/tizen/unified/20240711.011500 accepted/tizen/unified/dev/20240711.085733 accepted/tizen/unified/x/20240711.084602
Yunhee Seo [Mon, 8 Jul 2024 08:00:11 +0000 (17:00 +0900)]
haptic: Modify return value check properly

If there is no vibration backend(device), hal-api-device returns -ENODEV through feedbackd.
However, that value goes to dbus getter variable not the return value of dbus call.
Thus, the return check code has been modified as intended.

Change-Id: If47d60bce6eadb0c9a09e2cbfc84d22f0a727ab6
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
5 months agopower-internal: Add missing DEVICE_POWER_TRANSITION_REASON_DISPLAY_OFF_TIMEOUT wakeup... 09/313009/1 accepted/tizen/unified/20240620.050714 accepted/tizen/unified/dev/20240701.072752 accepted/tizen/unified/toolchain/20240624.121258 accepted/tizen/unified/x/20240620.061615 accepted/tizen/unified/x/asan/20240625.091917
Chanwoo Choi [Tue, 18 Jun 2024 07:58:22 +0000 (16:58 +0900)]
power-internal: Add missing DEVICE_POWER_TRANSITION_REASON_DISPLAY_OFF_TIMEOUT wakeup reason

The power wakeup reason should be mapped with enum
hal_device_power_transition_reason in hal-api-device.

So that add missing DEVICE_POWER_TRANSITION_REASON_DISPLAY_OFF_TIMEOUT wakeup reason
in order to map the wakeup reason between capi-system-device and hal-api-device.

Change-Id: I9ae3b39e38c282cd4b888b099b185a0737fc8166
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
5 months agopower-internal: Add getter and signal subscriber for lock count 40/311640/1 accepted/tizen/unified/20240614.084913 accepted/tizen/unified/dev/20240620.003744 accepted/tizen/unified/x/20240614.160327
Youngjae Cho [Thu, 28 Dec 2023 05:30:52 +0000 (14:30 +0900)]
power-internal: Add getter and signal subscriber for lock count

int device_power_get_lock_count()
 : Get the current lock count that hasn't yet been unlocked.

int device_power_add_lock_count_change_callback()
 : Register callback function that is invoked on lock count changed.
   The lock count is increased by 1 on device_power_request_lock(),
   decreased by 1 on device_power_release_lock() or timeout.

int device_power_remove_lock_count_change_callback()
 : Unregister the callback registered by the above.

Change-Id: Ib77260c867a27013572ee42ab1264ad3c3e5794e
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
5 months agohaptic: Add API explanation for memory handling 89/311489/1
Yunhee Seo [Wed, 22 May 2024 01:48:08 +0000 (10:48 +0900)]
haptic: Add API explanation for memory handling

The explanation was insufficient in the haptic APIs.
Thus, how to handle the memory of the parameter explanation is added.
Also, unncessary duplicated variable explanation is removed.

Change-Id: I85929865d505517862f411cfe7c2eb01e0d76549
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
6 months agobattery: Replace macro power source definitions to hal_device_battery_power_source_type_e 99/310099/5
Yunhee Seo [Mon, 22 Apr 2024 11:21:16 +0000 (20:21 +0900)]
battery: Replace macro power source definitions to hal_device_battery_power_source_type_e

As Power source type macro are replaced by hal_device_battery_power_source_type_e,
definition usage logic is also changed.
To get hal_device_battery_power_source_type_e string,
hal_device_battery_power_get_power_source_name is used.

Change-Id: Id7833b6e58d6913b41d27c6ad2053854f293ef66
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
6 months agoApply hal-api-device-thermal module HAL ABI versioning 94/309994/1
Yunhee Seo [Fri, 19 Apr 2024 04:17:22 +0000 (13:17 +0900)]
Apply hal-api-device-thermal module HAL ABI versioning

As HAL ABI versioning is applied to hal-api-device-thermal module,
inclusion path and data definition is changed.

Change-Id: Ic55db29efd541e6729db2ec7b1798559933ef660
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
7 months agoApply hal-api-device-battery module HAL ABI versioning 47/309947/1
Yunhee Seo [Thu, 18 Apr 2024 07:58:41 +0000 (16:58 +0900)]
Apply hal-api-device-battery module HAL ABI versioning

As HAL ABI versioning is applied to hal-api-device-battery module,
inclusion path and data definition is changed.

Change-Id: I8ec8ba530c927f9530b7289e54e685f2f10d9745
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
7 months agoApply hal-api-device-board module HAL ABI versioning 15/309415/1
Yunhee Seo [Tue, 9 Apr 2024 12:51:22 +0000 (21:51 +0900)]
Apply hal-api-device-board module HAL ABI versioning

As HAL ABI versioning is applied to hal-api-device-board module,
inclusion path is changed.

Change-Id: I0de8b4d615da0b8092d76b239ead1fe8882900f3
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
7 months agoChange hal-api-device module header file inclusion path 14/309414/1
Yunhee Seo [Tue, 9 Apr 2024 12:50:41 +0000 (21:50 +0900)]
Change hal-api-device module header file inclusion path

As the header files installation path below hal-api-device module is changed,
the inclusion path is also changed.

Change-Id: I317f779d67264288ed49272398e7979a45c222f9
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
10 months agodisplay: Change device_display_change_state() from async to sync 32/304232/1 accepted/tizen/unified/20240122.175407 accepted/tizen/unified/toolchain/20240311.065107 accepted/tizen/unified/x/20240205.063719
Yunhee Seo [Thu, 21 Dec 2023 07:13:39 +0000 (16:13 +0900)]
display: Change device_display_change_state() from async to sync

device_display_change_state() made the state change request asynchronous,
so it was not possible to know whether the request execution succeeded or not.
Due to the difficulty in checking whether requests were fulfilled properly,
the request method is changed as synchronous way.

Change-Id: Id4f957989248fb2c627459367fa575aa306a8d58
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
10 months agocommon: Add DEVICE_ERROR_INVALID_PARAMETER handling 31/304231/1
Yunhee Seo [Wed, 10 Jan 2024 10:59:43 +0000 (19:59 +0900)]
common: Add DEVICE_ERROR_INVALID_PARAMETER handling

To distinguish DEVICE_ERROR_INVALID_PARAMETER type,
this switch handling code is added to errno_to_device_error().

Change-Id: If78653a863d1ce4daac8aaf1e3923e7c7eae21b3
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
10 months agodevice: Change profile version from header files 47/303247/1 accepted/tizen_unified_riscv accepted/tizen/unified/20231228.165729 accepted/tizen/unified/riscv/20240103.054549
Yunhee Seo [Fri, 22 Dec 2023 05:07:22 +0000 (14:07 +0900)]
device: Change profile version from header files

As profiles are integrated, there is no need to mark versions separately.
Thus, the version has been changed based on mobile.

Change-Id: I22bdc4c1910f9d890a4c28fbea82b2e2a4f2faf4
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
12 months agopower: Add callback parameter check 23/300923/1 accepted/tizen/unified/20231107.172855
Yunhee Seo [Mon, 6 Nov 2023 01:46:15 +0000 (10:46 +0900)]
power: Add callback parameter check

When the callback parameter is null, it causes abnormal operation.
To avoid this, callback parameter check is necessary.

Change-Id: I5bfdf967ed5abea9563cbe070d8157b47d5ec7b0
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
12 months agopower: Add type casting to support architecture-independent API porting. 22/300922/1
Yunhee Seo [Fri, 3 Nov 2023 08:36:13 +0000 (17:36 +0900)]
power: Add type casting to support architecture-independent API porting.

At first, in the 32bit architecture, power state enum value is treated as 4 byte.
Thus, when dealing with enum value, the type should be converted to unsigned int or int.
Especially, this is necessary for C# API porting in the 32bit architecture to avoid abnormal operation.
However, when the device_power_change_state uses dbus call, it treats enum value as uint64_t in the g_variant type.
To make correct type conversion in g_variant, uint64_t type conversion is needed also.

Change-Id: I2e9ef7a715ca5beb13f358e183f5b054cff86ce1
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
14 months agodevice: Add lcov exception code 78/298278/3 accepted/tizen/8.0/unified/20231005.092646 accepted/tizen/unified/20230906.121321 tizen_8.0_m2_release
Yunhee Seo [Fri, 1 Sep 2023 06:54:43 +0000 (15:54 +0900)]
device: Add lcov exception code

Add line coverage exception to below cases.
1. Internal API and functions used only in internal functions.
2. Profile specific functions that are not common profile.(ex - mobile, wearable...)
3. Error handling code section.
4. Not supported feature functions in the line coverage test environment.(ex - battery, haptic, ir, led...)
    - Above features are false by default in the line coverage test environment.

Change-Id: I4e3a1c939aa26305a1b4c376bae6e905e2325e58
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
16 months agopower-internal: Exclude only device_power_get_wakeup_reason() on a specific profile 61/295561/2 accepted/tizen/unified/20230713.014421
Youngjae Cho [Tue, 11 Jul 2023 01:36:43 +0000 (10:36 +0900)]
power-internal: Exclude only device_power_get_wakeup_reason() on a specific profile

The previous patch(733acf) excludes the whole power-internal.c/.h when
they are built on a specific build envrionment. In such case, however,
there were other pakages dependent on the power-internal.c/.h, making
build error. Thus, instead of excluding the whole power-internal.c/.h,
exclude only the function device_power_get_wakeup_reason() from building.

Change-Id: Ib7474394246cf2d4e48b9ca312546f1970348ce9
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
16 months agoExclude internal source/header from specific build environment 47/295347/4 accepted/tizen/unified/20230710.153954
Youngjae Cho [Tue, 4 Jul 2023 04:51:00 +0000 (13:51 +0900)]
Exclude internal source/header from specific build environment

The device_power_get_wakeup_reason() of the public internal function
is duplicate on some profile environment. Therefore exclude it from build
within a specific environment.

Change-Id: I4b585d2632f22cc8b948e397fb0bb2db8eac5fdc
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
17 months agopower: Remove unused holdkeyblock code 84/294084/1
Youngjae Cho [Tue, 13 Jun 2023 01:32:27 +0000 (10:32 +0900)]
power: Remove unused holdkeyblock code

Change-Id: I641a7aad31906efdd966c74686288f7ebb8ba980
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
20 months agodisplay: Add close comment to keep doxygen group format 11/289311/1 accepted/tizen/unified/20230307.163818
Yunhee Seo [Mon, 6 Mar 2023 08:00:14 +0000 (17:00 +0900)]
display: Add close comment to keep doxygen group format

Add close comment to keep doxygen group format.

Change-Id: I78bf5d26321c8068ba0f30d4ca844e8619d933fd
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
21 months agoinput: add DEVICE_INPUT_TYPE_TOUCHSCREEN enum type 84/287884/1 accepted/tizen/unified/20230209.111255
Yunhee Seo [Tue, 7 Feb 2023 09:25:56 +0000 (18:25 +0900)]
input: add DEVICE_INPUT_TYPE_TOUCHSCREEN enum type

Add DEVICE_INPUT_TYPE_TOUCHSCREEN type to support touchscreen input device.

Change-Id: Ic1afd8a9da915ccca88ede857b59520a7b2f61d7
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
21 months agopower: add callback for tracking power lock state 47/287547/9
Yunhee Seo [Tue, 31 Jan 2023 07:38:27 +0000 (16:38 +0900)]
power: add callback for tracking power lock state

Add functions to tracking power lock state.
In this context, power lock state is meaning of "locked or unlocked"
about specific power lock type.
When the registered(specific) power lock is changed,
callback function will be called.

To inform power lock status, this enum type will be used.
typedef enum {
DEVICE_POWER_LOCK_STATE_UNLOCK, /**< Power lock is unlocked */
DEVICE_POWER_LOCK_STATE_LOCK, /**< Power lock is locked */
} device_power_lock_state_e;

These are function prototype to be added.
typedef void (*device_power_lock_state_change_callback) (power_lock_e power_lock_type,
device_power_lock_state_e power_lock_state, void *user_data);
-> This callback will be called when the registered power_lock_type lock is changed.

int device_power_get_lock_state(power_lock_e power_lock_type,
device_power_lock_state_e *power_lock_state);
-> This function gets the status(locked or unlocked) of power_lock_type

int device_power_add_lock_state_change_callback(power_lock_e power_lock_type,
device_power_lock_state_change_callback power_lock_state_change_callback,
void *user_data);
-> This function register callback with parameter power_lock_type.

int device_power_remove_lock_state_change_callback(power_lock_e power_lock_type);
-> This function remove registered callback with parameter power_lock_type.

Change-Id: I1e2449dfdf4a27caa03d0c8a6000606ef90b31f8
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
21 months agopower: add API for cancelling transition 94/287794/1
Youngjae Cho [Mon, 6 Feb 2023 08:21:06 +0000 (17:21 +0900)]
power: add API for cancelling transition

The cancelling API would trigger the opposite transition of the ongoing
transition, for example, if the ongoing transition is from
DEVICE_POWER_STATE_NORMAL to DEVICE_POWER_STATE_SLEEP, then transition
from DEVICE_POWER_STATE_SLEEP to DEVICE_POWER_STATE_NORMAL will follow
after calling cancelling API.

Change-Id: Ife624cd61f28ee7a5ab46b0e5dc0c0089b0aa72a
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
21 months agodisplay: change not use sensor in rotation API 52/287052/2 accepted/tizen/unified/20230208.112452 accepted/tizen/unified/20230208.183053 accepted/tizen/unified/20230208.232643
TaeminYeom [Thu, 19 Jan 2023 06:18:08 +0000 (15:18 +0900)]
display: change not use sensor in rotation API

Initial design is using sensor when there is no
display rotation module in device.
But the spec was changed because of newly added parameter
initial display state.

Change-Id: Ibf34b0b31a691324bf486d3511b797a833279ec7
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
21 months agodisplay: fix error handling in rotation API 51/287051/1
TaeminYeom [Thu, 19 Jan 2023 06:13:25 +0000 (15:13 +0900)]
display: fix error handling in rotation API

Previous else if statement was unreachable
because negative "ret" value situation is already handled above code.
The else if statement should handle the situation that deviced operation failed,
so it should check "reply", not "ret".

Change-Id: I65d842e7cd46afcd244b8fbdb5a1af7d03444f2d
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
22 months agoinput: add enum type DEVICE_INPUT_TYPE_ALL handling 42/286942/2
Yunhee Seo [Tue, 17 Jan 2023 06:50:17 +0000 (15:50 +0900)]
input: add enum type DEVICE_INPUT_TYPE_ALL handling

To avoid get DEVICE_INPUT_TYPE_ALL from device_input_get_default_device api
because this type cannot have default input device
also, add checking DEVICE_INPUT_TYPE_ALL to input_is_supported_input_type
which was omitted

Change-Id: I6b20a76fcde9b67097a3cb5606f71fa747483550
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
22 months agoinput: add input device information functions 38/286538/13 accepted/tizen/unified/20230118.172018
Yunhee Seo [Mon, 9 Jan 2023 10:16:52 +0000 (19:16 +0900)]
input: add input device information functions

Add input functions to get device information.
Input event on/off option can be handled by device id number.
Input device id numbers can be get by below functions.
Also, input device name can be obtained by device id number.

These are function prototype to be added.
int device_input_get_devices(device_input_type_e input_type, int** input_ids, int* num_input_ids)
-> With device_input_type_e, input device id list can be obtained by this function.
input_ids will be filled with input device ids.
num_input_ids will be set with number of input device ids.

int device_input_put_devices(int** input_ids)
-> If input id list(input_ids) is no longer in use, it can be free by this function.

int device_input_get_default_device(device_input_type_e input_type, int *input_dev_id)
-> With device_input_type_e, input default device id number can be get from config file.

int device_input_get_device_name(int input_device_id, char **input_device_name)
-> With input device id number, input device name can be get by this function.

Change-Id: I0afd1340ecc6d7f0a8dd1c4083da169c77b88e3a
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
22 months agodisplay: Add init direction in rotation angle API 10/286310/5 accepted/tizen/unified/20230110.164121
TaeminYeom [Tue, 3 Jan 2023 07:51:59 +0000 (16:51 +0900)]
display: Add init direction in rotation angle API

init direction means the display direction of degree 0.
It is needed to know physical display state by app.

Enumeration
-device_display_init_direction_e
DEVICE_DISPLAY_INIT_DIRECTION_HORIZONTAL : Display initial direction is horizontal
DEVICE_DISPLAY_INIT_DIRECTION_VERTICAL : Display initial direction is vertical

Change-Id: Ic9092286e17d05cdd11e4c0190b301eaa8dfc263
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
22 months agodisplay: remove ROTATION_ANGLE_DEGREE_360 77/286477/2
TaeminYeom [Mon, 9 Jan 2023 01:51:17 +0000 (10:51 +0900)]
display: remove ROTATION_ANGLE_DEGREE_360

display rotation degree 360 is same angle with degree 0.
So, it is not needed.

Change-Id: I5eb0873282734deb0ab957d798fceed4edf82986
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
22 months agodisplay: add documentation in set rotation angle 76/286476/2
TaeminYeom [Mon, 9 Jan 2023 01:45:44 +0000 (10:45 +0900)]
display: add documentation in set rotation angle

Prevent to confuse the meaning of function

Change-Id: Ic40d7e830739eac643691994057d7ef240dd207b
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
22 months agodisplay: change to use libsensor from capi-system-sensor 64/285964/2 accepted/tizen/unified/20221226.165751
TaeminYeom [Fri, 23 Dec 2022 07:04:47 +0000 (16:04 +0900)]
display: change to use libsensor from capi-system-sensor

To prevent circular dependency in building,
change to use libsensor in display rotation API

circular dependency :
alarm-manager->capi-system-device->capi-system-sensor->
context-sensor-recorder->context-common->alarm-manager

Change-Id: Ie0827413e0f28c325eb9a56e322657a18aacef03
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
22 months agodisplay: Add rotation angle API 20/282720/13
TaeminYeom [Tue, 11 Oct 2022 01:14:47 +0000 (10:14 +0900)]
display: Add rotation angle API

rotation angle means "physical display" angle.
Clients can rotate display or check current display angle.

API function
-device_display_get_rotation_angle : get current display rotation angle
-device_display_set_rotation_angle : rotate physical display to set angle

Enumeration
-device_display_rotation_angle_e
DEVICE_DISPLAY_ROTATION_ANGLE_UNKNOWN : It can be seen in laid device
DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_0 : Initial display rotation angle
DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_90 : 90° rotation angle
DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_180 : 180° rotation angle
DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_270 : 270° rotation angle
DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_360 : 360° rotation angle

-device_display_rotation_direction_e
DEVICE_DISPLAY_ROTATION_DIRECTION_CLOCKWISE : Rotate clockwise direction
DEVICE_DISPLAY_ROTATION_DIRECTION_COUNTER_CLOCKWISE : Rotate counter clockwise direction

Change-Id: Iae840b217977e2540883fec31f5e2631aa93b967
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
[cw00.choi: Add DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_360 enum]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
23 months agoinput: add getter/setter for controlling input device event 42/285442/9 accepted/tizen/unified/20221220.180313
Yunhee Seo [Tue, 13 Dec 2022 02:40:24 +0000 (11:40 +0900)]
input: add getter/setter for controlling input device event

Add a getter and setter function of input device event status

These are function prototype to be added.
int device_input_set_event_state(int input_device_id, bool on);
int device_input_get_event_state(int input_device_id, bool *on);
With input_device_id parameter, it is possible to enable/disable event of input device.

This enum is a structure for managing input devices
by distinguishing input device types.
To get input_device_id number, these input types will be used.
typedef enum
{
DEVICE_INPUT_TYPE_UNKNOWN = 0, /**< Input device type which is not defined. */
DEVICE_INPUT_TYPE_ALL, /**< Input device type which is all kinds of input devices */
DEVICE_INPUT_TYPE_MOUSE, /**< Input device type which is mouse-type */
DEVICE_INPUT_TYPE_KEYBOARD, /**< Input device type which is keyboard-type */
DEVICE_INPUT_TYPE_CUSTOM_KNOB, /**< Input device type which is customed knob-type */
} device_input_type_e;

Change-Id: Idd6eec3bf0226bd8f0a156e0ac1c7be13f03aa15
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
23 months agopower: add getter wakeup reason
TaeminYeom [Thu, 1 Dec 2022 08:29:55 +0000 (17:29 +0900)]
power: add getter wakeup reason

Add function to call dbus method in deviced and get wakeup reason.
"wakeup reason" is the power transition state reason of sleep to normal.
There are several reasons why the device wakeup and sometimes it is
needed to get the reason.

Add enum to support many typical wakeup reason in device_power_transition_reason_e.

function
int device_power_get_wakeup_reason(device_power_transition_reason_e *reason)

added enum
device_power_transition_reason_e:
DEVICE_POWER_TRANSITION_REASON_VOLUME_UP_KEY         : Volume up key pressed
DEVICE_POWER_TRANSITION_REASON_VOLUME_DOWN_KEY       : Volume down key pressed
DEVICE_POWER_TRANSITION_REASON_TOUCH_SCREEN          : Touch screen pressed
DEVICE_POWER_TRANSITION_REASON_USB                   : USB attached or detached
DEVICE_POWER_TRANSITION_REASON_CHARGER               : Charger attached or detached
DEVICE_POWER_TRANSITION_REASON_HDMI                  : HDMI cable attached or detached
DEVICE_POWER_TRANSITION_REASON_DISPLAY_PORT          : Display port cable attached or detached
DEVICE_POWER_TRANSITION_REASON_EMBEDDED_DISPLAY_PORT : Embedded display port cable attached or detached
DEVICE_POWER_TRANSITION_REASON_WIFI                  : WIFI event
DEVICE_POWER_TRANSITION_REASON_BLUETOOTH             : Bluetooth event
DEVICE_POWER_TRANSITION_REASON_NFC                   : NFC event
DEVICE_POWER_TRANSITION_REASON_TELEPHONY             : Telephony event
DEVICE_POWER_TRANSITION_REASON_ZIGBEE                : Zigbee event
DEVICE_POWER_TRANSITION_REASON_ETHERNET              : Ethernet event
DEVICE_POWER_TRANSITION_REASON_AUDIO                 : Audio event
DEVICE_POWER_TRANSITION_REASON_ALARM                 : Alarm event
DEVICE_POWER_TRANSITION_REASON_SENSOR                : Sensor event
DEVICE_POWER_TRANSITION_REASON_RTC                   : RTC event
DEVICE_POWER_TRANSITION_REASON_HEADSET               : Headset attatched or detached or button pressed
DEVICE_POWER_TRANSITION_REASON_EXTERNAL_MEMORY       : External memory inserted or deleted

Change-Id: Ia22bc8df426c15ae28965e70ae8ded0caddd5b4e
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
23 months agopower: change function/parameter name and callback type
Youngjae Cho [Thu, 15 Dec 2022 06:45:11 +0000 (15:45 +0900)]
power: change function/parameter name and callback type

The device_power_state_wait_callback has changed to provide an
additional parameter, prev_state, which denotes where a transition
has started.

Change-Id: Iab68154064dfeb64000a43e3961925a3d35524af
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
23 months agopower: refactor power change state wait API
Youngjae Cho [Thu, 8 Dec 2022 08:16:35 +0000 (17:16 +0900)]
power: refactor power change state wait API

Hide state index enumeration into source code
 - It has been changed to be defined by enumeration
   DEVICE_POWER_STATE_*.

Introduce enumeration for transition reason
 - power_transition_reason_e

Rearrange value of enumeration device_power_state_e
 and device_power_transient_state_e
 - Previously, those enumerations share bit not to overlap each other.
   This somehow implies those enumerations are related each other. To
   clarify that they have nothing to do with each other, rearranged bit.
 - From the above change, the APIs have changed to support exclusive
   register/unregister/callback subroutine by enumeration type.
    â€¢ device_power_add_state_wait_callback()
    â€¢ device_power_add_transient_state_wait_callback()
    â€¢ device_power_remove_state_wait_callback()
    â€¢ device_power_remove_transient_wait_callback()
 - Each callback has parameter of corresponding state enumeration type.
 - Callback now receives each information directly from parameter
   instead of struct device_change_state_info. The struct
   device_change_state_info has been removed.
 - Only the device_power_wait_done() has left unchanged in that it
   can be utilized by callback of both enumeration type.

Change-Id: I991994a3bb5e648db4aefde252c5bde1feeca86d
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
23 months agopower: Add "DEVICE" or "device" prefix to enum and API
TaeminYeom [Mon, 12 Dec 2022 08:53:11 +0000 (17:53 +0900)]
power: Add "DEVICE" or "device" prefix to enum and API

To prevent collision, it is a principle to attach a prefix of project name.
However, previous codes does not meet it.

changed enum:

power_state_e -> device_power_state_e
POWER_STATE_* -> DEVICE_POWER_STATE_*

power_transient_state_e -> device_power_transient_state_e
POWER_STATE_TRANSIENT_* -> DEVICE_POWER_STATE_TRANSIENT_*
POWER_STATE_TRANSIENT_*_EARLY -> DEVICE_POWER_STATE_TRANSIENT_*_EARLY
POWER_STATE_TRANSIENT_*_LATE -> DEVICE_POWER_STATE_TRANSIENT_*_LATE

POWER_STATE_*_INDEX -> DEVICE_POWER_STATE_*_INDEX
POWER_STATE_TRANSIENT_*_INDEX -> DEVICE_POWER_STATE_TRANSIENT_*_INDEX

changed callback:

power_change_state_wait_callback -> device_power_change_state_wait_callback

Change-Id: I386e48101e094427870ee83a5cbc2c035b331ad5
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
23 months agopower: subdivide power state 05/284005/8
Youngjae Cho [Tue, 8 Nov 2022 09:09:48 +0000 (18:09 +0900)]
power: subdivide power state

 Introduce transient state, SUSPENDING/RESUMING and they have 3 variants
each, EARLY, NORMAL and LATE. As the deviced always follows these transient
states in order, those transient state help other processes synchronize
each other by registering callbacks on each transient state.
 As the type of state has been subdivided, static ans transient, the
functions responsible for those types have also been subdivided.

For those static states, such as POWER_STATE_NORMAL,
 - device_power_add_change_state_wait_callback
 - device_power_remove_change_state_wait_callback
 - device_power_change_state_wait_done
 - device_power_change_state

For those transient states, such as POWER_STATE_TRANSIENT_RESUMING,
 - device_power_add_transient_state_wait_callback
 - device_power_remove_transient_state_wait_callback
 - device_power_change_state_wait_done

 In addition, the dbus signal name used by both capi-system-device and
the deviced has been moved to libsyscommon.
 - DEVICED_SIGNAL_POWER_CHANGE_STATE_TO_START
 - DEVICED_SIGNAL_POWER_CHANGE_STATE_TO_NORMAL
 - ...

Change-Id: I7b6d19ace2f2b73388cacc9d9344b717c0fde087
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
23 months agodisplay: display_white_balance_e enum struct definition relocation 05/284705/1 accepted/tizen/unified/20221128.165559
Yunhee Seo [Thu, 24 Nov 2022 04:47:59 +0000 (13:47 +0900)]
display: display_white_balance_e enum struct definition relocation

display_white_balance_e is enumeration for setting and getting white_balance RGB gain/offset value.
This enum struct moved from display-enum.h to display-internal.h
This is because this structure definition is for the white balancing function by Tizen_DA, not public.

Change-Id: I1f9ef05e8023f15521f3585fe36f4bc1fea578ca
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
2 years agodisplay: add getter/setter for white balance 79/283579/5 accepted/tizen/unified/20221116.120908 accepted/tizen/unified/20221116.164424
Yunhee Seo [Mon, 31 Oct 2022 02:15:55 +0000 (11:15 +0900)]
display: add getter/setter for white balance

Add a getter and setter function of display white balance which controls RGB gain and offset.

White balancing is adjusting standard point of white color, this because the light source is different for each device.
gain value is a value to be multiplied for RGB calculation.
offset value is a value to be added for RGB calculation.

These are function prototype to be added.
int device_display_set_white_balance(int display_index, display_white_balance_e white_balance_type, int value);
int device_display_get_white_balance(int display_index, display_white_balance_e white_balance_type, int *value);

With this enum type, we can get and set RGB gain and offset value for white balancing.
It is used as a parameter of getter and setter.
typedef enum
{
DISPLAY_WHITE_BALANCE_R_GAIN = 0, /** White balance R Gain */
DISPLAY_WHITE_BALANCE_G_GAIN, /** White balance G Gain */
DISPLAY_WHITE_BALANCE_B_GAIN, /** White balance B Gain */
DISPLAY_WHITE_BALANCE_R_OFFSET, /** White balance R Offset */
DISPLAY_WHITE_BALANCE_G_OFFSET, /** White balance G Offset */
DISPLAY_WHITE_BALANCE_B_OFFSET, /** White balance B Offset */
} display_white_balance_e;

Change-Id: Ie0adc74e76bcc8e8324767448aa03e3cce585af4
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
2 years agocallback: remove feature checking 01/282901/2 accepted/tizen/unified/20221102.020537
Youngjae Cho [Thu, 13 Oct 2022 06:20:47 +0000 (15:20 +0900)]
callback: remove feature checking

Checking feature http://tizen.org/feature/display.state had been
added without ACR and it broke ABI compatibility.
  - callback: check feature before add/remove callback (f860d7)

To recover ABI compatability, do not check the feature.

Change-Id: I3721268455ac62b52054f873808c224a8efdf832
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoRevert "power: add getter for the deviced power state" 44/282544/1 accepted/tizen_7.0_unified_hotfix tizen_7.0_hotfix accepted/tizen/7.0/unified/hotfix/20221116.104633 accepted/tizen/unified/20221006.065326 accepted/tizen/unified/20221006.065402 tizen_7.0_m2_release
Youngjae Cho [Wed, 5 Oct 2022 08:36:13 +0000 (17:36 +0900)]
Revert "power: add getter for the deviced power state"

This reverts commit db2fd6133ebba7c3c2c59fabc2ed099579263355.

The getter intercepts linking to an already existing function with
the same name, which reside in the VD profile. Therefore temporarily
revert this patch.

Change-Id: Ib1c4283d4ae53e5914363c7a1062d319a991ca1b
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agocallback: handle change display state to VCONFKEY_PM_STATE_SLEEP 16/280916/2 accepted/tizen/unified/20220927.132359
Youngjae Cho [Tue, 6 Sep 2022 23:45:29 +0000 (08:45 +0900)]
callback: handle change display state to VCONFKEY_PM_STATE_SLEEP

The device_display_get_state() returns DISPLAY_STATE_POWER_OFF for the
VCONFKEY_PM_STATE_SLEEP. But the display_change_cb() hasn't. To make
them be consistent, display_changed_cb() now return DISPLAY_STATE_POWER_OFF
for the VCONFKEY_PM_STATE_SLEEP. And this patch also changes intergers to
vconfkey macros.

Change-Id: I357734be07d2a418769c9017123ecb24b20ae9a7
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agopower: rename callback function 06/280006/1
Youngjae Cho [Mon, 22 Aug 2022 07:52:33 +0000 (16:52 +0900)]
power: rename callback function

Change-Id: I72707a9c62b9fbddeb3f03de986b34279c0a8dc9
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agopower: elaborate description 22/278122/3
Youngjae Cho [Mon, 18 Jul 2022 05:43:31 +0000 (14:43 +0900)]
power: elaborate description

Change-Id: I485b6da54b51ba9e8e1bb79d8e56a88dfb324d02
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agopower: add getter for the deviced power state 59/277659/5
Youngjae Cho [Tue, 12 Jul 2022 01:23:56 +0000 (10:23 +0900)]
power: add getter for the deviced power state

Change-Id: I6fd3aff0d211df954d0ec1c7505e979eef5cfd07
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoAdd new API to use hal-board API 81/277381/6 accepted/tizen/unified/20220713.144434 submit/tizen/20220712.045951
SangYoun Kwak [Wed, 6 Jul 2022 04:26:55 +0000 (13:26 +0900)]
Add new API to use hal-board API

Change-Id: Ia71b461ebb1b31f51ef058776e71d85581a19793
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
2 years agopower: fix memory leak 86/276586/1 accepted/tizen/unified/20220626.224822 submit/tizen/20220624.005127
Youngjae Cho [Tue, 21 Jun 2022 09:17:02 +0000 (18:17 +0900)]
power: fix memory leak

Change-Id: Iafed41769cc4a1fa4d63ead83145f032820516c4
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agopower: move #include into a source code 97/276397/1
Youngjae Cho [Thu, 16 Jun 2022 03:59:54 +0000 (12:59 +0900)]
power: move #include into a source code

A header can be used by other packages and their environment variable
for locating header files cannot locate hal/device/hal-board.h, which
makes No such file or directory error. To address this, hide the
include into source code and only exposes declaration through header.

Change-Id: I3f5c310dcf8f5fa1306fe2551d15d86caf68ba4d
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agopower: change order of signal subscription 53/276353/2
Youngjae Cho [Wed, 15 Jun 2022 05:16:57 +0000 (14:16 +0900)]
power: change order of signal subscription

Subscribe signal after calling AddChangeStateWait dbus method. It
prevents signal subscription when the dbus methods fail.

Change-Id: Ie194db05dbad5e784a6e4c3c211b8b45acc178b0
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agocallback: allow additional internal types 85/276285/4
Youngjae Cho [Tue, 14 Jun 2022 04:58:11 +0000 (13:58 +0900)]
callback: allow additional internal types

Change-Id: I48d987304887fc36cf071c5aaed4fcb72ea9b3f4
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agopower: prevent poweroff if partition cloning is in progress 90/276290/2
Youngjae Cho [Tue, 14 Jun 2022 05:34:18 +0000 (14:34 +0900)]
power: prevent poweroff if partition cloning is in progress

Change-Id: Ib280523ff8ffd248d6aea7b2ecb324dc0990ae5b
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoApply requirement for gcov automation 33/276033/2 accepted/tizen/unified/20220613.161534 submit/tizen/20220610.020359
Youngjae Cho [Thu, 9 Jun 2022 01:44:30 +0000 (10:44 +0900)]
Apply requirement for gcov automation

Change-Id: Ia600223a20ebc7adb2f3e9ef5f2248114be78328
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agopower: add device_power_change_state() 32/275732/5 accepted/tizen/unified/20220601.141615 submit/tizen/20220531.085748
Youngjae Cho [Tue, 31 May 2022 05:03:30 +0000 (14:03 +0900)]
power: add device_power_change_state()

The API, device_power_change_state(), send a request to deviced for
changing power state. It simply sends request and receives result of
the request. If the changed state is sleep/poweroff/reboot, then the
ongoing async callback might be ceased. To ensure the whole execution
of subroutine, use device_power_add_change_state_wait_callback().

Change-Id: Id7479a08d56505a0bc6bfba3e9971cb635e1276e
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agopower: rename typedef of callback 11/275711/2
Youngjae Cho [Tue, 31 May 2022 00:36:29 +0000 (09:36 +0900)]
power: rename typedef of callback

 - change_state_callback -> change_state_wait_callback

Change-Id: I7a21f4e716af474e6de4236bc92718c52d767527
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agopower-internal: add new state POWER_STATE_EXIT 41/275241/3
Youngjae Cho [Thu, 19 May 2022 02:22:02 +0000 (11:22 +0900)]
power-internal: add new state POWER_STATE_EXIT

Change-Id: Idbc9ea3c9608f27651fa39dc6f252c1091a8ad06
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoModify "int len" parameter to "const int max_len" 39/274639/1 accepted/tizen/unified/20220526.144216 submit/tizen/20220525.001052
SangYoun Kwak [Wed, 4 May 2022 05:32:33 +0000 (14:32 +0900)]
Modify "int len" parameter to "const int max_len"

Change-Id: Id55314a32b903bc93ebb67cd0b5f3751289a9123
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
2 years agoAdd new API to use hal-board API 08/274608/1
SangYoun Kwak [Tue, 3 May 2022 08:36:53 +0000 (17:36 +0900)]
Add new API to use hal-board API

Change-Id: Ib1d2ebe9d489791187fb468f26815176e9ddfa34
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
2 years agoAdd new API to use hal-board API 80/274580/2
SangYoun Kwak [Tue, 3 May 2022 02:25:49 +0000 (11:25 +0900)]
Add new API to use hal-board API

Change-Id: I219493924149aba42242b348888917c64a1b196b
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
2 years agousb-gadget: rename ane rearrange enum 17/273817/3 accepted/tizen/unified/20220505.134715 submit/tizen/20220502.091413 submit/tizen/20220503.013451
Youngjae Cho [Thu, 14 Apr 2022 05:08:39 +0000 (14:08 +0900)]
usb-gadget: rename ane rearrange enum

Removed unused usb-gadget functions, DM and CONN_GADGET.

Change-Id: Ibd8c5fdc18901dd52b489e05731ed03bc3e7d8ce
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agousb-gadget: relocate declarations of enum 96/273796/1
Youngjae Cho [Thu, 14 Apr 2022 02:13:46 +0000 (11:13 +0900)]
usb-gadget: relocate declarations of enum

Move USB_FUNCTION_IDX_* from hal-api-device to deviced.
Move USB_FUNCTION_* from hal-api-device to capi-system-device.

Change-Id: Ia595e8e5c9fb73a7b108f0c1c850e9268e73ae48
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoboard: replace get_reboot_mode() to get_boot_mode() 74/272274/4 accepted/tizen/unified/20220318.133008 submit/tizen/20220317.053005
Youngjae Cho [Mon, 14 Mar 2022 03:10:44 +0000 (12:10 +0900)]
board: replace get_reboot_mode() to get_boot_mode()

Change-Id: I600e6c036fbf2bedb79cdfaf2f46889ac835e4fe
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agodisplay: complement description for brightness API 27/271927/4 accepted/tizen/unified/20220310.120927 submit/tizen/20220308.032646
Youngjae Cho [Thu, 3 Mar 2022 07:57:13 +0000 (16:57 +0900)]
display: complement description for brightness API

Change-Id: Ibd53f488e3d6333b87e39cedca55e8dca4026496
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agodisplay: check replied return of dbus method call 34/270634/1 submit/tizen/20220208.052553 submit/tizen/20220208.075544 submit/tizen/20220222.024249
Youngjae Cho [Mon, 7 Feb 2022 06:34:07 +0000 (15:34 +0900)]
display: check replied return of dbus method call

Change-Id: I3a33463fa4187bb21854321849113f9b1b2edc2d
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoAdd errno to device-error mapping for ENOTSUP 10/270610/3
Youngjae Cho [Mon, 7 Feb 2022 04:17:02 +0000 (13:17 +0900)]
Add errno to device-error mapping for ENOTSUP

Change-Id: I43d470a61053b0ce1284ca45b4cb2251d51398ad
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoChange gcov object install path 35/270135/1 accepted/tizen/unified/20220128.144501 submit/tizen/20220127.011830
Youngjae Cho [Wed, 26 Jan 2022 05:31:22 +0000 (21:31 -0800)]
Change gcov object install path

Change-Id: Ibdaf312c27db473db4d646f0276c66d1a2ff9dba
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoAdd extern C macro for C++ 63/269663/1
Hyotaek Shim [Thu, 20 Jan 2022 02:22:06 +0000 (11:22 +0900)]
Add extern C macro for C++

Change-Id: Ic1909914498b99e30565e34f0efe44f2de578e14
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
2 years agoboard: add device_board_get_boot_reason() 93/269193/1 accepted/tizen/unified/20220117.135039 submit/tizen/20220112.015321 submit/tizen/20220113.004629
Youngjae Cho [Tue, 11 Jan 2022 08:03:31 +0000 (00:03 -0800)]
board: add device_board_get_boot_reason()

Change-Id: Ifb1cbf35a444fcafdea9a5ff19b5338f6de68e02
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agopower: initialize local GError 45/269145/1
Youngjae Cho [Mon, 10 Jan 2022 10:21:47 +0000 (19:21 +0900)]
power: initialize local GError

Change-Id: I6b6bbba478be5a923ed2dc44f063cfdce9a871a0
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agopower: add device_power_change_state_wait_done() 35/269135/1
Youngjae Cho [Mon, 10 Jan 2022 07:14:19 +0000 (16:14 +0900)]
power: add device_power_change_state_wait_done()

The api device_power_add_change_state_wait_callback() now shall reply
to the deviced that it is ready to sleep. The struct device_event_info
now contains an additional information, uint64_t id, which is used by
device_power_change_state_wait_done(). The callback should store the id
and call device_power_change_state_wait_done() with the id.

Change-Id: I9d399cda46a0d1029439b9b66fc586aa1318fbc9
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agopower: add state POWER_STATE_START 56/269056/2
Youngjae Cho [Fri, 7 Jan 2022 05:16:12 +0000 (14:16 +0900)]
power: add state POWER_STATE_START

POWER_STATE_START is the initial power state of deviced.

Change-Id: I841236237e1c765525ca3046de58d04c49d31ff8
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agopower: apply wait callback mechanism to all state transitions 84/267984/8
Youngjae Cho [Tue, 14 Dec 2021 06:38:45 +0000 (15:38 +0900)]
power: apply wait callback mechanism to all state transitions

Change-Id: I09f2d72e3b0d49f775ed9087641cfe71f0ba424d
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agocallback: add callback for key input signal 07/267807/8 accepted/tizen/unified/20211213.133455 submit/tizen/20211210.062426
Youngjae Cho [Fri, 10 Dec 2021 03:58:38 +0000 (12:58 +0900)]
callback: add callback for key input signal

Key callback is exclusive for a specific target. Therefore, manages
regarding key enums using device_callback_internal_e, which ranges from
1000 to 1100.

Change-Id: I1f7b60e48407d379c6cdf1af4d18e14b1b9f7155
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agopower: rename sleep-wait add/remove function 18/267818/1
Youngjae Cho [Fri, 10 Dec 2021 05:54:57 +0000 (14:54 +0900)]
power: rename sleep-wait add/remove function

Change the name to
 - device_power_add_sleep_wait_callback
 - device_power_remove_sleep_wait_callback

Change-Id: I596288e27fc3bd1b977a28a7df8dc2239ffac056
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agopower: fix sleep/wakeup dbus signal handler 17/267717/3
Youngjae Cho [Thu, 9 Dec 2021 06:42:46 +0000 (15:42 +0900)]
power: fix sleep/wakeup dbus signal handler

Now sleep/wakeup callback is invoked by dbus signal "ChangeState".
The signal param contains type(0:sleep, 1:wakeup) as well as reason.

Change-Id: I63dbb9c1f2ee3dfb6557d5ce1e5f1d322d976292
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agopower: change return value of cpulock/unlock 78/267578/1
Youngjae Cho [Tue, 7 Dec 2021 08:55:28 +0000 (17:55 +0900)]
power: change return value of cpulock/unlock

C# TCT expects DEVICE_ERROR_NONE for not supported feature.

Change-Id: I8e1d2f5f34e297e13a4fd05b1cf60c182d537771
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit 21e09d4797a02b17408b59cb2c1c59a95b35efd3)

2 years agopower: disable CPU lock/unlock on iot-headless 81/267481/1 accepted/tizen/unified/20211207.133137 submit/tizen/20211206.061425
Youngjae Cho [Mon, 6 Dec 2021 06:01:51 +0000 (15:01 +0900)]
power: disable CPU lock/unlock on iot-headless

Change-Id: Idd2cf460012f7bfab2ef8c9c649a54d1d1b50471
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agopower: add signal handler for wakeup signal 43/266843/1
Youngjae Cho [Fri, 19 Nov 2021 08:54:01 +0000 (17:54 +0900)]
power: add signal handler for wakeup signal

Change-Id: If8c314fe656edced7042c827b81455a41af2cbf3
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agopower: add internal function for deferring sleep 35/266735/5
Youngjae Cho [Thu, 18 Nov 2021 04:14:51 +0000 (13:14 +0900)]
power: add internal function for deferring sleep

Someone who wants to defer sleep can now request for deferring sleep to
system using device_power_add_sleep_callback(). The callback is invoked
when the system is going to sleep. Do your todo list for sleep in this
callback, and return DEVICE_SLEEP_READY, which notifies the system you
are ready to sleep.

Change-Id: I5dfbe60abbfaa30991124cfd5eea243f85a80d02
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agopower: support cpu lock/unlock for headless 70/264470/3 accepted/tizen/unified/20211105.130457 submit/tizen/20211103.072537 submit/tizen/20211104.031932 submit/tizen/20211104.080231
Youngjae Cho [Thu, 23 Sep 2021 00:49:44 +0000 (17:49 -0700)]
power: support cpu lock/unlock for headless

Change-Id: Ic1ecf15ee3a6f5b5de17f438b094a847ae4e875b
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agoFix description on device_battery_property_e 06/262106/2 accepted/tizen/6.5/unified/20211028.094232 accepted/tizen/unified/20210809.125009 submit/tizen/20210805.103313 submit/tizen/20210809.024445 submit/tizen_6.5/20211028.161701 tizen_6.5.m2_release
Hyotaek Shim [Tue, 3 Aug 2021 02:49:48 +0000 (11:49 +0900)]
Fix description on device_battery_property_e

Change-Id: Iae6f04133632967e7412b9cbc6fa12f6730d2b76
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
3 years agotemperature: adopt direct hal api 56/262056/1 accepted/tizen/unified/20210804.085711 submit/tizen/20210802.064402
Youngjae Cho [Mon, 2 Aug 2021 05:55:23 +0000 (14:55 +0900)]
temperature: adopt direct hal api

Change-Id: I8e6d654a57895a327930f9dd966c830c76e7de9e
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agoFix warning of converting pointer from integer 71/261871/1
Youngjae Cho [Wed, 28 Jul 2021 05:10:32 +0000 (14:10 +0900)]
Fix warning of converting pointer from integer

warning: cast to pointer from integer of different size
The above warning is only generated in 64bit compile environment.

Change-Id: Idffb00ec61ac9029f94ceca14c13882b7ac33fdf
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agoAdd description on device_battery_property_e 08/261608/3 accepted/tizen/unified/20210727.124532 submit/tizen/20210726.050348
Hyotaek Shim [Thu, 22 Jul 2021 05:22:34 +0000 (14:22 +0900)]
Add description on device_battery_property_e

Change-Id: I4769e5c5db34fa4aed81720db7e1262884880f12
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
3 years agocallback: check feature before add/remove callback 85/260685/2 submit/tizen/20210701.065306 submit/tizen/20210719.034923
Youngjae Cho [Thu, 1 Jul 2021 05:36:12 +0000 (14:36 +0900)]
callback: check feature before add/remove callback

Change-Id: Id9ab9c9d68a54bcba444606ba7c62f46cc2c6d4c
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agoAdd board-internal to get serial number 69/259769/4 accepted/tizen/unified/20210621.123245 submit/tizen/20210618.075427
Youngjae Cho [Mon, 14 Jun 2021 02:46:12 +0000 (11:46 +0900)]
Add board-internal to get serial number

Change-Id: I97e25f8fabc30fd5b4e26ec371b16430c57107d9
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>