platform/hal/api/device.git
3 months agohal-backend-service-plugin: device-display: Add plugin library code sandbox/yunhee/hal-ipc-display
Yunhee Seo [Thu, 20 Feb 2025 10:13:03 +0000 (19:13 +0900)]
hal-backend-service-plugin: device-display: Add plugin library code

With this, hal-api-common can open hal-backend-service from the
device-display plugin library.
Also, to communicate with proxy side(hal-api-device-display module),
stub callback should be added and initialized.

Thus, below logics are added.
 - Create hal-backend-service-plugin device-display library.
 - Handling stub callback by tidl, it uses passthrough internally.
 - Initialization for IPC communication.

Change-Id: I290bcba35aaf0c1638ef0a69ff01019d9a3b2b4f
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
3 months agodevice-display: Support hal-api passthrough and IPC selectively by configuration
Yunhee Seo [Thu, 13 Feb 2025 06:08:11 +0000 (15:08 +0900)]
device-display: Support hal-api passthrough and IPC selectively by configuration

To support two-way communication method from HAL,
hal_transport definition and implementation is added.
Please refer changed communication method.

Before
- Passthrough
  - hal-api(display) --(dlopen)--> hal-backend

After
- Passthrough and IPC
  - hal-api(display) --(dlopen)--> hal-backend
           |
           |(proxy)
           |
           |-----------(IPC)-----> hal-backend-serivce(stub) --> hal-backend

With hal_transport configuration, transport method can be selected.
It defines IPC or passthrough communication way.
Therefore, the existing hal-api code should call either IPC or passthrough.

Change-Id: I01f26ecfd79406d5d782f167f5ac1cef549a9c80
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
3 months agodevice-display: Add hal-api IPC module using generated IPC module by TIDL
Yunhee Seo [Thu, 13 Feb 2025 05:22:35 +0000 (14:22 +0900)]
device-display: Add hal-api IPC module using generated IPC module by TIDL

To support IPC communication with hal-backend-service,
hal-api IPC module is newly added.
With generated codes from TIDL, below descriptions are added.
- proxy initialization for IPC communication
- handling IPC communication
- using generated proxy function call

Change-Id: I2971862c94d001911274f07aad7a700ce8b10a93
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
3 months agodevice-display: Add IPC module generated by TIDL
Yunhee Seo [Thu, 13 Feb 2025 05:12:23 +0000 (14:12 +0900)]
device-display: Add IPC module generated by TIDL

To support hal-api IPC communication, generated communication codes should be added.
proxy and stub generated IPC codes are located below src/generated/ path.
With this, hal-api can implement IPC communication method with hal-backend-service.

These are newly added files,
- include/hal_device_display_ipc_1.tidl
  - tidl file is converted from hal-device-display-interface-1.h.

- src/generated/hal_device_display_proxy_1.h
- src/generated/hal_device_display_proxy_1.c
  - These are generated from hal_device_display_ipc_1.tidl.
    With the proxy implementation, hal-api display module can request to hal-backend-service.

- src/generated/hal_device_display_stub_1.h
- src/generated/hal_device_display_stub_1.c
  - There are generated from hal_device_display_ipc_1.tidl.
    To implement hal-backend-service, stub codes should be added.
    In stub side, it will handle the hal-api display requests from proxy side.

To avoid generated code analysis issue, exclude.txt is added.

Change-Id: I371086e610f85dbe1784f91265edaff0b8a27e90
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
3 months agodevice-display: Add hal-api passthrough module
Yunhee Seo [Thu, 13 Feb 2025 04:32:43 +0000 (13:32 +0900)]
device-display: Add hal-api passthrough module

As hal-api module supporting ipc communcation,
hal-backend dlopen loading method should be devided.
The newly added code is same as the existing hal-api codes.

Change-Id: If0577aaeff69a900431920de38e6b80e3eb663de
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
4 months agoAdd to catch std::length_error in haltest main 65/319565/3 accepted/tizen/unified/20250220.093335 accepted/tizen/unified/20250220.153611 accepted/tizen/unified/x/20250221.100938
Yunhee Seo [Thu, 13 Feb 2025 02:54:23 +0000 (11:54 +0900)]
Add to catch std::length_error in haltest main

RUN_ALL_TESTS() in haltest main,
it can cause std::length_error and handling code was omitted.
To fix this issue, catch statement is added.

Change-Id: I5187aef8cbe1962742abf4cd654d9e4b2a1a2c00
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
5 months agopower: Add HAL_DEVICE_POWER_TRANSITION_REASON_POWER_LOCK 81/317181/1 accepted/tizen_unified_x_asan accepted/tizen/unified/20250115.124134 accepted/tizen/unified/x/20250115.142714 accepted/tizen/unified/x/asan/20250211.003529
Youngjae Cho [Thu, 26 Dec 2024 10:28:52 +0000 (19:28 +0900)]
power: Add HAL_DEVICE_POWER_TRANSITION_REASON_POWER_LOCK

The reason is used when a power transition is triggered by power lock.

Change-Id: I4c7a5cb85ddb8ca7c2d9731dfef51f14956a881b
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
6 months agoAdd detailed description for hal-api-device APIs 45/315945/2 accepted/tizen/unified/20241210.105101 accepted/tizen/unified/x/20241218.032752 accepted/tizen/unified/x/asan/20241224.004517
Yunhee Seo [Fri, 29 Nov 2024 06:33:07 +0000 (15:33 +0900)]
Add detailed description for hal-api-device APIs

Before requests HAL ACR process, there were omitted standard description.
To keep ACR format, APIs and data structure descriptions are adeed.
This includes all submodule description of the hal-api-device.

Change-Id: I1c65561f2e025a2a8b2426989ea1e9a3420f8d57
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
6 months agodoc: Add new documentation for reference generating 44/315944/2
Yunhee Seo [Tue, 5 Nov 2024 05:49:07 +0000 (14:49 +0900)]
doc: Add new documentation for reference generating

To support HAL API reference creating, the 'hal_device_doc.h' is added under
the 'doc' directory, which is also newly created.
Also, sub-module docs are added.
 - hal_device_battery_doc.h
 - hal_device_bezel_doc.h
 - hal_device_board_doc.h
 - hal_device_display_doc.h
 - hal_device_external_connection_doc.h
 - hal_device_haptic_doc.h
 - hal_device_input_doc.h
 - hal_device_ir_doc.h
 - hal_device_led_doc.h
 - hal_device_memory_doc.h
 - hal_device_power_doc.h
 - hal_device_thermal_doc.h
 - hal_device_touchscreen_doc.h

Change-Id: I0fa9e208e3c130916ceb9d5563d45367004edabc
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
6 months agodevice-led: Remove unused hal_device_led_get_state() 43/315943/1
Yunhee Seo [Thu, 5 Dec 2024 05:03:56 +0000 (14:03 +0900)]
device-led: Remove unused hal_device_led_get_state()

Since it is added, it was not used in any related module.
Also, there is no implemented hal-backend.
Before apply HAL ACR process, this function is removed
because it had been unmanaged.

Change-Id: I763eda151a490c7221b72fa7f4f32488c478da3e
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
6 months agoboard: Fix different type comparison issue 26/321026/1
Yunhee Seo [Mon, 25 Nov 2024 06:23:06 +0000 (15:23 +0900)]
board: Fix different type comparison issue

There was size_t and int type value comparison in for loop code.
Actually, the comparison size_t and int type is same as the
unsigned long and int comparison.
This comparsion can cause integer overflow and infinite for loop,
thus this is necessary.

Change-Id: I3f3479b0535779c104a3eb49a9485ad573e99132
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
11 months agoAdd upgrade type feature 48/313648/2 accepted/tizen_unified_dev accepted/tizen_unified_toolchain accepted/tizen/9.0/unified/20241030.233136 accepted/tizen/unified/20240708.173203 accepted/tizen/unified/dev/20240709.043437 accepted/tizen/unified/toolchain/20240812.133305 accepted/tizen/unified/x/20240708.014822 accepted/tizen/unified/x/asan/20240813.231743 tizen_9.0_m2_release
Mateusz Moscicki [Fri, 28 Jun 2024 09:48:20 +0000 (11:48 +0200)]
Add upgrade type feature

To allow to change the upgrade type to "offline" or "online", the api
functions are added.

Change-Id: I0123712e319b996a9e57b3b3d2ea060914dd7bf6

11 months agopackagaing: Reset the result of hal-compatibility-checker 37/311737/4 accepted/tizen/unified/20240621.010412 accepted/tizen/unified/dev/20240701.073009 accepted/tizen/unified/toolchain/20240624.121536 accepted/tizen/unified/x/20240624.032003 accepted/tizen/unified/x/asan/20240625.092627
Youngjae Cho [Mon, 27 May 2024 02:28:52 +0000 (11:28 +0900)]
packagaing: Reset the result of hal-compatibility-checker

HALCC (HAL Compatibility Checker) checks and stores the compatibility
result of hal-backend package under /opt/etc/hal/ directory.

When installing/un-installing hal-api packages,
compatibility result between HAL manifest and hal-backend package should
be reset. So that reset the result of hal-compatibility-checker by
'usr/bin/hal-compatibility-checker --reset' command.

Change-Id: I531805ba0f985c842b3fd96ce03b9619d67ce6a1
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
11 months agopackaging: Rename to hal-api-device-manifest.xml and change the install dir 73/313073/3
Chanwoo Choi [Wed, 19 Jun 2024 02:55:38 +0000 (11:55 +0900)]
packaging: Rename to hal-api-device-manifest.xml and change the install dir

In order to keep the consistent directory path of hal,
change the install directory path and then rename to
hal-api-device-manifest.xml which indicates HAL manifest file.

[Changed install path and file name]
- /etc/hal-manifest/hal-api-device.xml -> /etc/hal/hal-api-device-manifest.xml

Change-Id: Id1dedff1fa37f3c67f5eeddbee52f5e98a8044c0
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
12 months agoModify upgrade state transition 98/312698/1 accepted/tizen/unified/20240614.084933 accepted/tizen/unified/dev/20240620.010448 accepted/tizen/unified/x/20240614.160451
SangYoun Kwak [Thu, 13 Jun 2024 07:00:05 +0000 (16:00 +0900)]
Modify upgrade state transition

The simplified upgrade state model is used, the transition rule should
be modified.

Change-Id: I63cfa6e41eadbf40a7e3cc139838a3dcfeed2c95
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
12 months agoAdd upgrade state feature 68/312268/1
SangYoun Kwak [Tue, 4 Jun 2024 10:57:11 +0000 (19:57 +0900)]
Add upgrade state feature

To clarify the state of upgrade process, "upgrade state" feature is
added.
To use hal backend functions for "upgrade state", corresponding function
structure and api functions are added.

Change-Id: I5251f888bef6c051a83376863f374340f8a5eeb3
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
12 months agoinclude: Reduce duplicate header including of hal-device-[module]-types.h 74/311674/1
Chanwoo Choi [Thu, 23 May 2024 09:32:53 +0000 (18:32 +0900)]
include: Reduce duplicate header including of hal-device-[module]-types.h

In order to reduce duplicate header including of hal-device-[module]-types.h,
change the header hierarchy as following:

hal-devce-[module]-interface.h
|-- hal-devce-[module]-interface-1.h
|---- hal-devce-[module]-types.h.

Change-Id: I04b1ba320d65abbf627a69e976b213a43a3e0d93
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
12 months agohal-manifest: Add hal-manifest 41/311441/3
Youngjae Cho [Tue, 21 May 2024 06:50:25 +0000 (15:50 +0900)]
hal-manifest: Add hal-manifest

Change-Id: Ia86a28c0fd9dae2e976130cd0e2d196016251d9d
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
13 months agoRemove NULL check for callback parameter 28/310228/1
Yunhee Seo [Wed, 24 Apr 2024 07:14:03 +0000 (16:14 +0900)]
Remove NULL check for callback parameter

The void *data used as callback parameter,
it can be NULL depending on the callback function logic.
Thus, the checking of data parameter is unnecessary and should be removed
for proper operation.
To avoid confusion with the name of the callback parameter called "data",
it was changed from "data" to "user_data".

Change-Id: I92bf8bb7dda251df52c23d1b12a101d3ecb7137d
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
13 months agodevice-external_connection: Change data struct variable name properly 27/310227/1
Yunhee Seo [Wed, 24 Apr 2024 06:52:02 +0000 (15:52 +0900)]
device-external_connection: Change data struct variable name properly

In hal_device_external_connection_info_s structure,
the name used to distinguish specific device type with string name.
Since there is an enumeration that can distinguish device types,
change the name to an appropriate one.
"name" is changed to "device_type".

Change-Id: Id45547bb04c226d992c287797797f896b87285f1
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
13 months agodevice-external_connection: Add hal_device_external_connection_device_type_e to repla... 56/310156/2
Yunhee Seo [Tue, 23 Apr 2024 07:42:47 +0000 (16:42 +0900)]
device-external_connection: Add hal_device_external_connection_device_type_e to replace external connection type macros

External connection device type macros have a strong correlation.
And they can be grouped and there is no reason to exist
as an individual macro definition in terms of code maintenance.
Thus, hal_device_external_connection_device_type_e enum type is added.

To utilize above enum type properly,
converting functions are necessary.
With converting functions, enum can replace the use of existing macro string.
This functions is added.
- int hal_device_external_connection_get_device_name(hal_device_external_connection_device_type_e deivce_type, const char **device_name);
    -> If hal_device_external_connection_device_type is not proper value, then this returns -EINVAL,
       and device_name is filled with NULL.
       If not, it will be return 0 and device_name is filled with proper device type name.

Also, converting const char* <-> hal_device_battery_power_source_type_e type
test case is added.

Change-Id: I3ababb0915c5340a3b6ca3c4751716077200282e
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
13 months agodevice-battery: Add power source type and power source name getter 38/310138/5
Yunhee Seo [Tue, 23 Apr 2024 05:11:16 +0000 (14:11 +0900)]
device-battery: Add power source type and power source name getter

To utilize hal_device_battery_power_source_type_e enum type properly,
converting functions are necessary.
With converting getter, enum can replace the use of existing macro string.
These functions are added.
 - void hal_device_battery_get_power_source_name(hal_device_battery_power_source_type_e power_source_type,
const char **power_source);
    -> If power_souce or power_source_type argument is not proper, power_source is just filled with NULL,
       and it will returns -EINVAL.
       If not, power_source will be filled with proper power_source_type name with 0 return value.
 - int hal_device_battery_get_power_source_type(char *power_source,
hal_device_battery_power_source_type_e *power_source_type);
    -> If argument is not proper value, it will returns -EINVAL.
       If not, it will returns 0 and power_source_type will be filled with proper type.

Also, converting const char* <-> hal_device_battery_power_source_type_e type
test case is added.

Change-Id: I47446d4857676c6fa23bee7c8d6fd6bf4e73ac6f
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
13 months agodevice-battery: Replace macro power source definitions to hal_device_battery_power_so... 98/310098/1
Yunhee Seo [Mon, 22 Apr 2024 11:26:57 +0000 (20:26 +0900)]
device-battery: Replace macro power source definitions to hal_device_battery_power_source_type_e

Power source type macros have a strong correlation.
And they can be grouped and there is no reason to exist
as an individual macro definition from a code maintenance point of view.
Thus macros are replaced by hal_device_battery_power_source_type_e enum type.

Change-Id: I59909b32986c2f2b087e56e7ee93a7d26c5bbf75
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
13 months agodevice-battery: Remove NULL check for callback parameter 82/310082/2
Yunhee Seo [Mon, 22 Apr 2024 07:17:25 +0000 (16:17 +0900)]
device-battery: Remove NULL check for callback parameter

The void *data used as callback parameter,
it can be NULL depending on the callback function logic.
Thus, the checking of data parameter is unnecessary and should be removed
for proper operation.

Change-Id: Id1074f059ddda843291ae1349956580a354b73fa
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
13 months agodevice-memory: Apply HAL ABI versioning rule 60/310060/1
Yunhee Seo [Fri, 19 Apr 2024 01:57:20 +0000 (10:57 +0900)]
device-memory: Apply HAL ABI versioning rule

Change-Id: Ic1153389229de02ba00908e91f52802a93d6f7c4
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
13 months agodevice-memory: Remove unnecessary hal_initialized flag 59/310059/1
Yunhee Seo [Fri, 19 Apr 2024 01:26:37 +0000 (10:26 +0900)]
device-memory: Remove unnecessary hal_initialized flag

Before using hal api function, loading hal backend is essential.
Thus, before calling hal backend function, hal backend loading is always checked.
However hal_initialized flag is being used uncessarily in duplicate.
To avoid duplcated operation, hal_initialized flag is removed.

Change-Id: I3497904ff9cfb176b98db074237b064729dcdad6
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
13 months agodevice-touchscreen: Apply HAL ABI versioning rule 19/310019/1
Yunhee Seo [Fri, 19 Apr 2024 07:32:49 +0000 (16:32 +0900)]
device-touchscreen: Apply HAL ABI versioning rule

In HAL-API-[module], source file name should follow hal-api-[module].c format
for applying HAL ABI versioning.

hal-api-device-touchscreen.c
 -> HAL-INTERFACE Wrapper call according to major version and implemenation of
    functions declared in hal-device-touchscreen.h

To apply HAL ABI versioning, the backend function structure memory allocation part
was moved to hal-api-device-touchscreen.

Furthermore, existing interface file is devided.
Below is a description of the purpose of header files.

hal-device-touchscreen-types.h
 -> Common data types like structures or enums used between the device-touchscreen
    HAL-API and HAL-BACKEND
hal-device-touchscreen-interface-1.h
 -> Declaration of functions to be implemented in the device-touchscreen HAL-BACKEND(Major version 1),
    as well as definitions of data structures used between the HAL-API and HAL-BACKEND(Major version 1)
hal-device-touchscreen-interface.h
 -> Includes the hal-device-touchscreen-interface-[major].h files for each supported
    major version.
hal-device-touchscreen.h
 -> Declaration of the device-touchscreen HAL-API functions

As applying HAL ABI versioning, definitions are also chaged in Native API style.
The module names that are not being used well have been modified to proper names.
"touchscreen" -> "device-touchscreen"

Change-Id: I4e48487b40524430e3a89726c6b6f54239b8b1f0
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
13 months agodevice-power: Apply HAL ABI versioning rule 16/310016/1
Yunhee Seo [Fri, 19 Apr 2024 06:28:00 +0000 (15:28 +0900)]
device-power: Apply HAL ABI versioning rule

In HAL-API-[module], source file name should follow hal-api-[module].c format
for applying HAL ABI versioning.

hal-api-device-power.c
 -> HAL-INTERFACE Wrapper call according to major version and implemenation of
    functions declared in hal-device-power.h

To apply HAL ABI versioning, the backend function structure memory allocation part
was moved to hal-api-device-power.

Furthermore, existing interface file is devided.
Below is a description of the purpose of header files.

hal-device-power-types.h
 -> Common data types like structures or enums used between the device-power
    HAL-API and HAL-BACKEND
hal-device-power-interface-1.h
 -> Declaration of functions to be implemented in the device-power HAL-BACKEND(Major version 1),
    as well as definitions of data structures used between the HAL-API and HAL-BACKEND(Major version 1)
hal-device-power-interface.h
 -> Includes the hal-device-power-interface-[major].h files for each supported
    major version.
hal-device-power.h
 -> Declaration of the device-power HAL-API functions

As applying HAL ABI versioning, definitions are also chaged in Native API style.

Change-Id: Id65f850e9714e7174f7e2f74bc725d7c1f0ea7f0
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
13 months agodevice-led: Apply HAL ABI versioning rule 08/310008/2
Yunhee Seo [Thu, 18 Apr 2024 11:39:22 +0000 (20:39 +0900)]
device-led: Apply HAL ABI versioning rule

In HAL-API-[module], source file name should follow hal-api-[module].c format
for applying HAL ABI versioning.

hal-api-device-led.c
 -> HAL-INTERFACE Wrapper call according to major version and implemenation of
    functions declared in hal-device-led.h

To apply HAL ABI versioning, the backend function structure memory allocation part
was moved to hal-api-device-led.

Furthermore, existing interface file is devided.
Below is a description of the purpose of header files.

hal-device-led-types.h
 -> Common data types like structures or enums used between the device-led
    HAL-API and HAL-BACKEND
hal-device-led-interface-1.h
 -> Declaration of functions to be implemented in the device-led HAL-BACKEND(Major version 1),
    as well as definitions of data structures used between the HAL-API and HAL-BACKEND(Major version 1)
hal-device-led-interface.h
 -> Includes the hal-device-led-interface-[major].h files for each supported
    major version.
hal-device-led.h
 -> Declaration of the device-led HAL-API functions

As applying HAL ABI versioning, definitions are also chaged in Native API style.
The module names that are not being used well have been modified to proper names.
"led" -> "device-led"

Change-Id: I6d5ffde13dbbaa72852765124716d15bcaf23094
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
13 months agodevice-thermal: Apply HAL ABI versioning rule 95/309995/1
Yunhee Seo [Fri, 19 Apr 2024 04:00:27 +0000 (13:00 +0900)]
device-thermal: Apply HAL ABI versioning rule

In HAL-API-[module], source file name should follow hal-api-[module].c format
for applying HAL ABI versioning.

hal-api-device-thermal.c
 -> HAL-INTERFACE Wrapper call according to major version and implemenation of
    functions declared in hal-device-thermal.h

To apply HAL ABI versioning, the backend function structure memory allocation part
was moved to hal-api-device-thermal.

Furthermore, existing interface file is devided.
Below is a description of the purpose of header files.

hal-device-thermal-types.h
 -> Common data types like structures or enums used between the device-thermal
    HAL-API and HAL-BACKEND
hal-device-thermal-interface-1.h
 -> Declaration of functions to be implemented in the device-thermal HAL-BACKEND(Major version 1),
    as well as definitions of data structures used between the HAL-API and HAL-BACKEND(Major version 1)
hal-device-thermal-interface.h
 -> Includes the hal-device-thermal-interface-[major].h files for each supported
    major version.
hal-device-thermal.h
 -> Declaration of the device-thermal HAL-API functions

As applying HAL ABI versioning, definitions are also chaged in Native API style.
The module names that are not being used well have been modified to proper names.
"thermal" -> "device-thermal"

Change-Id: I1c8b25258edbfa32a539f681f50a9bd0b4d4f294
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
13 months agodevice-ir: Apply HAL ABI versioning rule 66/309966/3
Yunhee Seo [Thu, 18 Apr 2024 10:40:54 +0000 (19:40 +0900)]
device-ir: Apply HAL ABI versioning rule

In HAL-API-[module], source file name should follow hal-api-[module].c format
for applying HAL ABI versioning.

hal-api-device-ir.c
 -> HAL-INTERFACE Wrapper call according to major version and implemenation of
    functions declared in hal-device-ir.h

To apply HAL ABI versioning, the backend function structure memory allocation part
was moved to hal-api-device-ir.

Furthermore, existing interface file is devided.
Below is a description of the purpose of header files.

hal-device-ir-types.h
 -> Common data types like structures or enums used between the device-ir
    HAL-API and HAL-BACKEND
hal-device-ir-interface-1.h
 -> Declaration of functions to be implemented in the device-ir HAL-BACKEND(Major version 1),
    as well as definitions of data structures used between the HAL-API and HAL-BACKEND(Major version 1)
hal-device-ir-interface.h
 -> Includes the hal-device-ir-interface-[major].h files for each supported
    major version.
hal-device-ir.h
 -> Declaration of the device-ir HAL-API functions

As applying HAL ABI versioning, definitions are also chaged in Native API style.
The module names that are not being used well have been modified to proper names.
"ir" -> "device-ir"

Change-Id: I52ed91213210d314ede3cea4e997e112aa163515
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
13 months agodevice-input: Apply HAL ABI versioning rule 65/309965/2
Yunhee Seo [Thu, 18 Apr 2024 10:20:23 +0000 (19:20 +0900)]
device-input: Apply HAL ABI versioning rule

In HAL-API-[module], source file name should follow hal-api-[module].c format
for applying HAL ABI versioning.

hal-api-device-input.c
 -> HAL-INTERFACE Wrapper call according to major version and implemenation of
    functions declared in hal-device-external_connection.h

To apply HAL ABI versioning, the backend function structure memory allocation part
was moved to hal-api-device-input.

Furthermore, existing interface file is devided.
Below is a description of the purpose of header files.

hal-device-input-types.h
 -> Common data types like structures or enums used between the device-input
    HAL-API and HAL-BACKEND
hal-device-input-interface-1.h
 -> Declaration of functions to be implemented in the device-input HAL-BACKEND(Major version 1),
    as well as definitions of data structures used between the HAL-API and HAL-BACKEND(Major version 1)
hal-device-input-interface.h
 -> Includes the hal-device-input-interface-[major].h files for each supported
    major version.
hal-device-input.h
 -> Declaration of the device-input HAL-API functions

As applying HAL ABI versioning, definitions are also chaged in Native API style.

Change-Id: I0255a683c22eeb89988c2c56fbeb122140043e1f
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
13 months agodevice-external_connection: Apply HAL ABI versioning rule 50/309950/1
Yunhee Seo [Thu, 18 Apr 2024 08:49:18 +0000 (17:49 +0900)]
device-external_connection: Apply HAL ABI versioning rule

In HAL-API-[module], source file name should follow hal-api-[module].c format
for applying HAL ABI versioning.

hal-api-device-external_connection.c
 -> HAL-INTERFACE Wrapper call according to major version and implemenation of
    functions declared in hal-device-external_connection.h

To apply HAL ABI versioning, the backend function structure memory allocation part
was moved to hal-api-device-external_connection.

Furthermore, existing interface file is devided.
Below is a description of the purpose of header files.

hal-device-external_connection-types.h
 -> Common data types like structures or enums used between the device-external_connection
    HAL-API and HAL-BACKEND
hal-device-external_connection-interface-1.h
 -> Declaration of functions to be implemented in the device-external_connection HAL-BACKEND(Major version
    as well as definitions of data structures used between the HAL-API and HAL-BACKEND(M
hal-device-external_connection-interface.h
 -> Includes the hal-device-external_connection-interface-[major].h files for each supported
    major version.
hal-device-external_connection.h
 -> Declaration of the device-external_connection HAL-API functions

As applying HAL ABI versioning, definitions are also chaged in Native API style.
The module names that are not being used well have been modified to proper names.
"external_connection" -> "device-external_connection"

Change-Id: I1be7041566576a1f86dc406c8431d8a9db3844ab
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
13 months agodevice-bezel: Apply HAL ABI versioning rule 49/309949/1
Yunhee Seo [Thu, 18 Apr 2024 05:45:44 +0000 (14:45 +0900)]
device-bezel: Apply HAL ABI versioning rule

In HAL-API-[module], source file name should follow hal-api-[module].c format
for applying HAL ABI versioning.

hal-api-device-bezel.c
 -> HAL-INTERFACE Wrapper call according to major version and implemenation of
functions declared in hal-device-bezel.h

To apply HAL ABI versioning, the backend function structure memory allocation part
was moved to hal-api-device-bezel.

Furthermore, existing interface file is devided.
Below is a description of the purpose of header files.

hal-device-bezel-types.h
 -> Common data types like structures or enums used between the device-bezel
 HAL-API and HAL-BACKEND
hal-device-bezel-interface-1.h
 -> Declaration of functions to be implemented in the device-bezel HAL-BACKEND(Major version 1),
as well as definitions of data structures used between the HAL-API and HAL-BACKEND(Major version 1)
hal-device-bezel-interface.h
 -> Includes the hal-device-bezel-interface-[major].h files for each supported
major version.
hal-device-bezel.h
 -> Declaration of the device-bezel HAL-API functions

As applying HAL ABI versioning, definitions are also chaged in Native API style.

Change-Id: Ibdb21a0e16ed6f7533ac4bcee28ac11cebc2f115
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
13 months agodevice-bezel: Fix incorrect module naming 48/309948/1
Yunhee Seo [Thu, 18 Apr 2024 02:58:42 +0000 (11:58 +0900)]
device-bezel: Fix incorrect module naming

Fix incorrect module name from "bezel" to "device-bezel".

struct
 - hal_backend_bezel_funcs -> struct hal_backend_device_bezel_funcs

file
 - hal-bezel.h -> hal-device-bezel.h
 - hal-bezel-interface.h -> hal-device-bezel-interface.h

According to HAL API Prototype rule,
hal module funcs structure naming is same as below
 - hal_backend_[module]_funcs.
Also, hal module header files naming is same as below.
 - hal-[module].h
 - hal-[module]-interface.h

However, the hal module name was being used incorrectly.
Actual hal module name is not "bezel" but "device-bezel".

Change-Id: I3da12abc7e9618ef12ddddc4567b3fcad38faf86
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
13 months agodevice-battery: Remove unused macro HAL_DEVICE_BATTERY_HARDWARE_DEVICE_ID 68/309768/2
Yunhee Seo [Tue, 16 Apr 2024 10:48:24 +0000 (19:48 +0900)]
device-battery: Remove unused macro HAL_DEVICE_BATTERY_HARDWARE_DEVICE_ID

HAL_DEVICE_BATTERY_HARDWARE_DEVICE_ID is not used anymore in platform side.
It is removed from platform/core/system/deviced at patch 02c021113393b4db2c501133eedb2e2140e77576.
Currently, it is only used at hal-backend device-emulator.
There is no need to be exist hal-api-device-battery and it is removed.

Change-Id: I43fe95e00c395fc2d56842acc6c6ceb499f0231d
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
13 months agodevice-battery: Apply HAL ABI versioning rule 46/309746/4
Yunhee Seo [Tue, 16 Apr 2024 06:30:57 +0000 (15:30 +0900)]
device-battery: Apply HAL ABI versioning rule

In HAL-API-[module], source file name should follow hal-api-[module].c format
for applying HAL ABI versioning.

hal-api-device-battery.c
 -> HAL-INTERFACE Wrapper call according to major version and implemenation of
functions declared in hal-device-battery.h

To apply HAL ABI versioning, the backend function structure memory allocation part
was moved to hal-api-device-battery.

Change-Id: Ic1bdb9cacddb468bdd80b9c7af10024ba13d3077
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
13 months agodevice-battery: Apply native API style 28/309328/7
Yunhee Seo [Mon, 8 Apr 2024 08:10:26 +0000 (17:10 +0900)]
device-battery: Apply native API style

In hal-device-battery module,
definition and declarations are should be follow native API principles.
To follow native style, comment and data structure/function naming is changed like below descriptions.

1. Naming structure with suffix '_s'
2. Naming structure with prefix sub module
3. Naming callback function types with suffix '_cb'
4. Naming macro with prefix which clearly represents a module

Change-Id: I7c7c079ef1fd4689f131b76eaaecc43b44640e5e
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
14 months agodevice-battery: Separate device-battery header files 27/309327/5
Yunhee Seo [Mon, 8 Apr 2024 06:31:18 +0000 (15:31 +0900)]
device-battery: Separate device-battery header files

To apply HAL ABI Versioning, existing interface file is devided.
Below is a description of the purpose of header files.

hal-device-battery-types.h
 -> Common data types like structures or enums used between the device-battery
 HAL-API and HAL-BACKEND
hal-device-battery-interface-1.h
 -> Declaration of functions to be implemented in the device-battery HAL-BACKEND(Major version 1),
as well as definitions of data structures used between the HAL-API and HAL-BACKEND(Major version 1)
hal-device-battery-interface.h
 -> Includes the hal-device-battery-interface-[major].h files for each supported
major version.
hal-device-battery.h
 -> Declaration of the device-battery HAL-API functions

Change-Id: Ic2a07101cf70384b803e68f3088f9ea1db22a95b
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
14 months agodevice-battery: Fix incorrect module naming 26/309326/5
Yunhee Seo [Mon, 8 Apr 2024 06:02:41 +0000 (15:02 +0900)]
device-battery: Fix incorrect module naming

Fix incorrect module name from "battery" to "device-battery".

struct
 - hal_backend_battery_funcs -> struct hal_backend_device_battery_funcs

file
 - hal-battery.h -> hal-device-battery.h
 - hal-battery-interface.h -> hal-device-battery-interface.h

According to HAL API Prototype rule,
hal module funcs structure naming is same as below
 - hal_backend_[module]_funcs.
Also, hal module header files naming is same as below.
 - hal-[module].h
 - hal-[module]-interface.h

However, the hal module name was being used incorrectly.
Actual hal module name is not "battery" but "device-battery".

Change-Id: I8e4b648b497b8aded8de390c45736434912aadf3
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
14 months agohal-api-device: Remove unnecessary hal_initialized flag 73/309673/1
Yunhee Seo [Mon, 15 Apr 2024 07:59:05 +0000 (16:59 +0900)]
hal-api-device: Remove unnecessary hal_initialized flag

Before using hal api function, loading hal backend is essential.
Thus, before calling hal backend function, hal backend loading is always checked.
However hal_initialized flag is being used uncessarily in duplicate.
To avoid duplcated operation, hal_initialized flag is removed.

Change-Id: I64ff8e3f7405d12c8fe82038f96c96f21748cf8f
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
14 months agodevice-haptic: Apply HAL ABI versioning rule 60/309360/3
Yunhee Seo [Tue, 9 Apr 2024 02:22:46 +0000 (11:22 +0900)]
device-haptic: Apply HAL ABI versioning rule

In HAL-API-[module], source file name should follow hal-api-[module].c format
for applying HAL ABI versioning.

hal-api-device-haptic.c
 -> HAL-INTERFACE Wrapper call according to major version and implemenation of
functions declared in hal-device-haptic.h

To apply HAL ABI versioning, the backend function structure memory allocation part
was moved to hal-api-device-haptic.

Change-Id: I2386416788e4b1458bf8d95132a9ba630888ac41
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
14 months agodevice-haptic: Apply native API style 59/309359/3
Yunhee Seo [Tue, 9 Apr 2024 02:14:19 +0000 (11:14 +0900)]
device-haptic: Apply native API style

In hal-device-haptic module,
definition and declarations are should be follow native API principles.
To follow native style, comment and data structure/function naming is changed like below descriptions.

1. Naming enumeration with suffix '_e'
2. Naming enum type with prefix sub module

Change-Id: I3a10da467008f30e7cd55ac1f6803a8a11f646fa
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
14 months agodevice-haptic: Separate device-haptic header files 58/309358/3
Yunhee Seo [Tue, 9 Apr 2024 02:10:01 +0000 (11:10 +0900)]
device-haptic: Separate device-haptic header files

To apply HAL ABI Versioning, existing interface file is devided.
Below is a description of the purpose of header files.

hal-device-haptic-types.h
 -> Common data types like structures or enums used between the device-haptic
    HAL-API and HAL-BACKEND
hal-device-haptic-interface-1.h
 -> Declaration of functions to be implemented in the device-haptic HAL-BACKEND(Major version 1),
    as well as definitions of data structures used between the HAL-API and HAL-BACKEND(Major version 1)
hal-device-haptic-interface.h
 -> Includes the hal-device-haptic-interface-[major].h files for each supported
    major version.
hal-device-haptic.h
 -> Declaration of the device-haptic HAL-API functions

Change-Id: I63ca1071441233f009fe4b482a3e6932244e6255
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
14 months agodevice-haptic: Fix incorrect module naming 57/309357/3
Yunhee Seo [Tue, 9 Apr 2024 02:00:13 +0000 (11:00 +0900)]
device-haptic: Fix incorrect module naming

Fix incorrect module name from "board" to "device-haptic".

struct
 - hal_backend_haptic_funcs -> struct hal_backend_device_haptic_funcs

file
 - hal-haptic.h -> hal-device-haptic.h
 - hal-haptic-interface.h -> hal-device-haptic-interface.h

According to HAL API Prototype rule,
hal module funcs structure naming is same as below
 - hal_backend_[module]_funcs.
Also, hal module header files naming is same as below.
 - hal-[module].h
 - hal-[module]-interface.h

However, the hal module name was being used incorrectly.
Actual hal module name is not "haptic" but "device-haptic"

Change-Id: I976337bfdd34f05462cdaa9197d2c6314d9d3624
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
14 months agodevice-board: Apply HAL ABI versioning rule 32/309332/4
Yunhee Seo [Mon, 8 Apr 2024 12:20:49 +0000 (21:20 +0900)]
device-board: Apply HAL ABI versioning rule

In HAL-API-[module], source file name should follow hal-api-[module].c format
for applying HAL ABI versioning.

hal-api-device-board.c
 -> HAL-INTERFACE Wrapper call according to major version and implemenation of
functions declared in hal-device-board.h

To apply HAL ABI versioning, the backend function structure memory allocation part
was moved to hal-api-device-board.

Change-Id: Idc344c9efca1e2270dcf8c12e621ffdc18d4c696
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
14 months agodevice-board: Separate device-board header files 30/309330/4
Yunhee Seo [Mon, 8 Apr 2024 09:44:25 +0000 (18:44 +0900)]
device-board: Separate device-board header files

To apply HAL ABI Versioning, existing interface file is devided.
Below is a description of the purpose of header files.

hal-device-board-types.h
 -> Common data types like structures or enums used between the device-board
    HAL-API and HAL-BACKEND
hal-device-board-interface-1.h
 -> Declaration of functions to be implemented in the device-board HAL-BACKEND(Major version 1),
    as well as definitions of data structures used between the HAL-API and HAL-BACKEND(Major version 1)
hal-device-board-interface.h
 -> Includes the hal-device-board-interface-[major].h files for each supported
    major version.
hal-device-board.h
 -> Declaration of the device-board HAL-API functions

Change-Id: Ic225f2fbf6a13fbef24a1ef9ccc05e7ff816db97
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
14 months agodevice-board: Fix incorrect module naming 29/309329/4
Yunhee Seo [Mon, 8 Apr 2024 09:33:46 +0000 (18:33 +0900)]
device-board: Fix incorrect module naming

Fix incorrect module name from "board" to "device-board".

struct
 - hal_backend_board_funcs -> struct hal_backend_device_board_funcs

file
 - hal-board.h -> hal-device-board.h
 - hal-board-interface.h -> hal-device-board-interface.h

According to HAL API Prototype rule,
hal module funcs structure naming is same as below
 - hal_backend_[module]_funcs.
Also, hal module header files naming is same as below.
 - hal-[module].h
 - hal-[module]-interface.h

However, the hal module name was being used incorrectly.
Actual hal module name is not "board" but "device-board".

Change-Id: Ib0db0f55a906e857d41af622399299dc17da7ef9
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
14 months agodevice-display: Add inclusion stdlib.h fila to resolve build warning 25/309325/3
Yunhee Seo [Mon, 8 Apr 2024 10:24:50 +0000 (19:24 +0900)]
device-display: Add inclusion stdlib.h fila to resolve build warning

Change-Id: I1100c5d7012c7fffabc157289df41f2c9a1c3e05
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
14 months agodevice-display: Add get backend logic 24/309324/2
Yunhee Seo [Mon, 8 Apr 2024 10:10:17 +0000 (19:10 +0900)]
device-display: Add get backend logic

When the hal device display module api is called before loading hal-backend,
it should be handled with hal_device_display_get_backend().
This was removed as applying HAL ABI versioning,
however this logic is necessary.

Change-Id: I3ed1b67e3ea8fada9ae394d717e66f5c3f6d216f
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
14 months agoChange header file installation path 64/309264/3
Yunhee Seo [Mon, 8 Apr 2024 03:26:21 +0000 (12:26 +0900)]
Change header file installation path

Actually, the path of hal module interface and header files should be
under the "/usr/include/hal/" path, not "/usr/include/hal/device".
Thus, change the header file path from "/hal/device" to "/hal".

Change-Id: I70dc56ee692b40838b8aafacc78c9ddea81d6e51
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
14 months agodevice-display: Add hal_backend_device_display_funcs initialization 76/309076/1
Yunhee Seo [Thu, 4 Apr 2024 08:51:51 +0000 (17:51 +0900)]
device-display: Add hal_backend_device_display_funcs initialization

When the hal module fails open hal-backend,
after free hal_backend_[module]_funcs structure, it should be initialized by NULL.
Otherwise, there will be an error when approaching above function pointer structure.
To avoid accessing uninitialized value, this is necessary.

Change-Id: Icc0672941d681eafee471724a2cb2c0d49ac6919
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
14 months agodevice-display: Apply HAL ABI versioning rule 08/308908/3
Yunhee Seo [Tue, 2 Apr 2024 11:23:52 +0000 (20:23 +0900)]
device-display: Apply HAL ABI versioning rule

In HAL-API-[module], source file name should follow hal-api-[module].c format
for applying HAL ABI versioning.

hal-api-device-display.c
 -> HAL-INTERFACE Wrapper call according to major version and implemenation of
functions declared in hal-device-display.h

To apply HAL ABI versioning, the backend function structure memory allocation part
was moved to hal-api-device-display.

Change-Id: I6c203c078a512e474a8568b1303bcfbf20afe31e
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
14 months agodevice-display: Modify enum structure in native API style 07/308907/3
Yunhee Seo [Tue, 2 Apr 2024 10:39:46 +0000 (19:39 +0900)]
device-display: Modify enum structure in native API style

In hal-device-display-types.h,
data types should be follow native API principles.
To follow native style, comment and data structure naming is changed like below descriptions.

1. Naming enum structure with suffix _e
2. Naming enum type with prefix sub module to prevent symbols conflict.

Change-Id: I642fef372363f7e3dce980cc0628ec357fdecf53
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
14 months agodevice-display: Separate device-display header files 06/308906/4
Yunhee Seo [Mon, 18 Mar 2024 04:18:37 +0000 (13:18 +0900)]
device-display: Separate device-display header files

To apply HAL ABI Versioning, existing interface file is devided.
Below is a description of the purpose of header files.

hal-device-display-types.h
 -> Common data types like structures or enums used between the device-display
 HAL-API and HAL-BACKEND
hal-device-display-interface-1.h
 -> Declaration of functions to be implemented in the device-display HAL-BACKEND(Major version 1),
as well as definitions of data structures used between the HAL-API and HAL-BACKEND(Major version 1)
hal-device-display-interface.h
 -> Includes the hal-device-display-interface-[major].h files for each supported
major version.
hal-device-display.h
 -> Declaration of the device-display HAL-API functions

Change-Id: I1caecf577cea48d2bf9303e083b3fdf072469ecf
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
14 months agodisplay: Fix incorrect module naming 98/308098/3
Yunhee Seo [Fri, 15 Mar 2024 02:41:58 +0000 (11:41 +0900)]
display: Fix incorrect module naming

Fix incorrect module name from "display" to "device-display".

struct
 - hal_backend_display_funcs -> struct hal_backend_device_display_funcs

file
 - hal-display.h -> hal-device-display.h
 - hal-display-interface.h -> hal-device-display-interface.h

According to HAL API Prototype rule,
hal module funcs structure naming is same as below
 - hal_backend_[module]_funcs.
Also, hal module header files naming is same as below.
 - hal-[module].h
 - hal-[module]-interface.h

However, the hal module name was being used incorrectly.
Actual hal module name is not "display" but "device-display".

Change-Id: Icc209e6d73737209032603671542f13ad9f42c77
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
14 months agoinclude: Relocate interface header files from backend folder to include folder 22/307822/5
Yunhee Seo [Wed, 13 Mar 2024 08:19:09 +0000 (17:19 +0900)]
include: Relocate interface header files from backend folder to include folder

Remove backend folder below include folder and move interface header files

In order to apply HAL ABI Versioning, code refactoring is performed first.
Interface header files that was incorrectly located under the backend folder
are moved to include folder.
In the hal-api-device module, when the module is installed,
the header files is located below /usr/include/hal/device
Thus, backend folder is also removed to maintain hal-api-[module] code structure consistency.

Change-Id: I36e974f289fa72114662dc05dfa96cf30d60cd44
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
2 years agopower: add enum for transition by DISPLAY_OFF_TIMEOUT 13/288213/3 accepted/tizen/8.0/unified/20231005.094413 accepted/tizen/unified/20230215.100727 tizen_8.0_m2_release
Youngjae Cho [Tue, 14 Feb 2023 01:10:51 +0000 (10:10 +0900)]
power: add enum for transition by DISPLAY_OFF_TIMEOUT

- DEVICE_POWER_TRANSITION_REASON_DISPLAY_OFF (existing one)
   Reason for display off itself.
- DDEVICE_POWER_TRANSITION_REASON_DISPLAY_OFF_TIMEOUT (added one)
   Reason for expiration of timer triggered by display off. Commonly,
  it is used for system suspend reason.

Change-Id: Icf18aa0c0da83cdbf2f63cf1c2fdad375f2f5aab
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoinput: add HAL_DEVICE_INPUT_TYPE_TOUCHSCREEN 86/287886/1 accepted/tizen/unified/20230209.111257
Yunhee Seo [Tue, 7 Feb 2023 09:30:10 +0000 (18:30 +0900)]
input: add HAL_DEVICE_INPUT_TYPE_TOUCHSCREEN

Add HAL_DEVICE_INPUT_TYPE_TOUCHSCREEN type to support touchscreen input device.

Change-Id: I4b57e95b3a6351b46793af8915dc283d0254c0cb
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
2 years agohaltest: Initialize local variables 59/287059/3
TaeminYeom [Thu, 19 Jan 2023 07:23:20 +0000 (16:23 +0900)]
haltest: Initialize local variables

These local variables are used to get the values in the
hal backend function with pointer.
If there is an error in hal backend function,
it is possible to use uninitialized local variables.

Change-Id: I43eadbe13f19e8fb3bd9537b610db6bc773b7d6f
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
2 years agodisplay: remove ROTATION_ANGLE_DEGREE_360 37/286637/1
TaeminYeom [Wed, 11 Jan 2023 02:13:32 +0000 (11:13 +0900)]
display: remove ROTATION_ANGLE_DEGREE_360

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

Change-Id: I6faa8174298a64088fa7e63f96075b6b022fe97b
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
2 years agodisplay: Add rotation angle API 24/282724/7 accepted/tizen/unified/20221226.165756
TaeminYeom [Thu, 29 Sep 2022 04:52:00 +0000 (13:52 +0900)]
display: Add rotation angle API

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

API
-hal_device_display_get_rotation_angle
-hal_device_display_set_rotation_angle

enum
-hal_device_display_rotation_angle
HAL_DEVICE_DISPLAY_ROTATION_ANGLE_UNKNOWN : It can be seen in laid device
HAL_DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_0 : Initial display rotation angle
HAL_DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_90 : 90° rotation angle
HAL_DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_180 : 180° rotation angle
HAL_DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_270 : 270° rotation angle
HAL_DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_360 : 360° rotation angle

-hal_device_display_rotation_direction
HAL_DEVICE_DISPLAY_ROTATION_DIRECTION_CLOCKWISE : Rotate clockwise direction
HAL_DEVICE_DISPLAY_ROTATION_DIRECTION_COUNTER_CLOCKWISE : Rotate counter clockwise direction

Change-Id: I617f42466218a0a7f579c5d331a818e534cf173c
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2 years agopower: add hal interface and getter wakeup reason 38/284938/9 accepted/tizen/unified/20221220.180326
TaeminYeom [Thu, 1 Dec 2022 09:07:44 +0000 (18:07 +0900)]
power: add hal interface and getter wakeup reason

Add power hal interface including getter wakeup reason function.

"wakeup reason" is the power transition state reason of sleep to normal.
There are several reasons why the device wakeup such as power key, Wifi and touchscreen.
Sometimes it Is needed to get the reason.

hal-interface
- hal_backend_device_power_funcs
- hal_device_power_get_backend
- hal_device_power_put_backend

function
- hal_device_power_get_wakeup_reason

enum
hal_device_power_wakeup_reason
  It is same value with "device_power_transition_reason_e" in device API

  HAL_DEVICE_POWER_TRANSITION_REASON_UNKNOWN                : Unknown reason
  HAL_DEVICE_POWER_TRANSITION_REASON_POWER_KEY              : Power key pressed
  HAL_DEVICE_POWER_TRANSITION_REASON_BATTERY_NORMAL_LEVEL   : Battery capacity reaches normal level
  HAL_DEVICE_POWER_TRANSITION_REASON_BATTERY_WARNING_LEVEL  : Battery capacity reaches warning level
  HAL_DEVICE_POWER_TRANSITION_REASON_BATTERY_CRITICAL_LEVEL : Battery capacity reaches critical level
  HAL_DEVICE_POWER_TRANSITION_REASON_BATTERY_POWEROFF_LEVEL : Battery capacity reaches poweroff level
  HAL_DEVICE_POWER_TRANSITION_REASON_DISPLAY_OFF            : Display off
  HAL_DEVICE_POWER_TRANSITION_REASON_TOUCH_KEY              : Touch key pressed
  HAL_DEVICE_POWER_TRANSITION_REASON_TOUCH_SCREEN           : Touch screen pressed
  HAL_DEVICE_POWER_TRANSITION_REASON_USB                    : USB attached or detached
  HAL_DEVICE_POWER_TRANSITION_REASON_CHARGER                : Charger attached or detached
  HAL_DEVICE_POWER_TRANSITION_REASON_WIFI                   : WIFI event
  HAL_DEVICE_POWER_TRANSITION_REASON_BLUETOOTH              : Bluetooth event
  HAL_DEVICE_POWER_TRANSITION_REASON_AUDIO                  : Audio event
  HAL_DEVICE_POWER_TRANSITION_REASON_ALARM                  : Alarm event
  HAL_DEVICE_POWER_TRANSITION_REASON_SENSOR                 : Sensor event
  HAL_DEVICE_POWER_TRANSITION_REASON_RTC                    : RTC event
  HAL_DEVICE_POWER_TRANSITION_REASON_HEADSET                : Headset attatched or detached or button pressed
  HAL_DEVICE_POWER_TRANSITION_REASON_EXTERNAL_MEMORY        : External memory inserted or deleted
  HAL_DEVICE_POWER_TRANSITION_REASON_DOWNLOAD               : Download event

Change-Id: I4580b6b336f6f081d45315bc786d1e92c00d790b
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
2 years agoinput: add getter/setter for controlling input device event 50/285450/5
Yunhee Seo [Tue, 13 Dec 2022 04:54:55 +0000 (13:54 +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 hal_device_input_get_backend(void);
-> This function initialize hal module which name is HAL_MODULE_DEVICE_INPUT

int hal_device_input_put_backend(void);
-> This function put hal module which is initialized from the above function.

int hal_device_input_set_event_state(int input_device_id, int on);
-> This function set input device event state,
   With input_device_id, it is possible to distinguish input devices.

int hal_device_input_get_event_state(int input_device_id, int* on);
-> This function get event state value with the unique input_device_id value.

With input_device_id parameter, it is possible to enable/disable event of input device.
Because input_device_id work as a unique id of input devices.

To get input_device_id number, these input types will be used.
Also these enum types will be used for controlling and managing input devices.
typedef enum {
    HAL_DEVICE_INPUT_TYPE_UNKNOWN = 0, /**< Input device type which is not defined. */
    HAL_DEVICE_INPUT_TYPE_ALL, /**< Input device type which is all kinds of input devices */
    HAL_DEVICE_INPUT_TYPE_MOUSE, /**< Input device type which is mouse-type */
    HAL_DEVICE_INPUT_TYPE_KEYBOARD, /**< Input device type which is keyboard-type */
    HAL_DEVICE_INPUT_TYPE_CUSTOM_KNOB, /**< Input device type which is customed knob-type */
} hal_device_input_type;

Change-Id: I2c8e68768f53137903d8a074b9e319d68ae95958
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
2 years agodisplay: add getter/setter for white balance 35/284135/4 accepted/tizen/unified/20221116.120910 accepted/tizen/unified/20221116.164426
Yunhee Seo [Thu, 10 Nov 2022 08:19:39 +0000 (17:19 +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 value calculation.
offset vealue is a value to be added for RGB value calculation.

These are function prototype to be added.
int hal_device_display_set_white_balance(enum hal_display_white_balance, int value);
int hal_device_display_get_white_balance(enum hal_display_white_balance, int* value);

With this enum type, it is possible to get and set RGB gain and offset value for white balancing.
It is used as a parameter of HAL getter and setter function.
enum hal_display_white_balance {
HAL_DISPLAY_WHITE_BALANCE_R_GAIN,
HAL_DISPLAY_WHITE_BALANCE_G_GAIN,
HAL_DISPLAY_WHITE_BALANCE_B_GAIN,
HAL_DISPLAY_WHITE_BALANCE_R_OFFSET,
HAL_DISPLAY_WHITE_BALANCE_G_OFFSET,
HAL_DISPLAY_WHITE_BALANCE_B_OFFSET,
};

Change-Id: I3afe3953e15b61657a8dfd842a30fde553359586
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
3 years agobattery: remove unused struct variable 84/274584/2 accepted/tizen_7.0_unified_hotfix tizen_7.0_hotfix accepted/tizen/7.0/unified/20221110.061228 accepted/tizen/7.0/unified/hotfix/20221116.110328 accepted/tizen/unified/20220626.224828 submit/tizen/20220624.005127 tizen_7.0_m2_release
Youngjae Cho [Tue, 3 May 2022 04:50:49 +0000 (13:50 +0900)]
battery: remove unused struct variable

Change-Id: I86ba0c395fc7bd84e7b2177d3517e7e2985c0aa2
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agoAdd new API to set/get partition status 90/274590/6 accepted/tizen/unified/20220526.144326 submit/tizen/20220525.001052
SangYoun Kwak [Tue, 3 May 2022 05:30:53 +0000 (14:30 +0900)]
Add new API to set/get partition status

Change-Id: I1c21ce2dc6ec8f08b40316867682576f195ff23c
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
3 years agoAdd new API to get current partition 42/274542/1
SangYoun Kwak [Mon, 2 May 2022 05:33:07 +0000 (14:33 +0900)]
Add new API to get current partition

Change-Id: I29f146cd093294511642e029deed55f8703bed28
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
3 years agousb-gadget: move usb-gadget to deviced 66/273466/7
Youngjae Cho [Wed, 6 Apr 2022 05:35:11 +0000 (22:35 -0700)]
usb-gadget: move usb-gadget to deviced

Change-Id: Ic967ad1db398355627d33a206a9a1d2ec81ad49b
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agoAdd description for the declaration of the hal api functions 71/273371/6 submit/tizen/20220408.012128
SangYoun Kwak [Tue, 5 Apr 2022 04:59:48 +0000 (13:59 +0900)]
Add description for the declaration of the hal api functions

Change-Id: Ic8c97770f793c145302e9e943a14e66f65b7f4b2
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
3 years agoRemove unused code 83/273383/1
Youngjae Cho [Tue, 5 Apr 2022 07:05:31 +0000 (00:05 -0700)]
Remove unused code

Change-Id: I037c42e95859e415ed446e1e0d225527cdf6731f
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agoAdd new APIs to set/get the upgrade status 64/273064/4 accepted/tizen/unified/20220404.013023 submit/tizen/20220331.075432
SangYoun Kwak [Wed, 30 Mar 2022 07:16:04 +0000 (16:16 +0900)]
Add new APIs to set/get the upgrade status

Change-Id: Id610a3e0348ff12b4d44fbb08408596c18e6644f
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
3 years agoAdd new API to manipulate the "cloned" flag 54/272354/6 accepted/tizen/unified/20220331.010044 submit/tizen/20220328.084941
SangYoun Kwak [Tue, 15 Mar 2022 07:13:40 +0000 (16:13 +0900)]
Add new API to manipulate the "cloned" flag

Change-Id: I9f6fbbdc7526280a3c59c9febcc4bd82e3067f8c
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
3 years agousb-gadget: add remain_after_disable option to usb_function 04/272504/1
Youngjae Cho [Fri, 18 Mar 2022 03:16:38 +0000 (12:16 +0900)]
usb-gadget: add remain_after_disable option to usb_function

This is set to 1 only when a service shouldn't be stopped
when disabling usb function.

Change-Id: Ie7c7e8f0b95a2c931df3702dbe76f9fd0c7d0a83
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agoboard: fix parameters of boot operation 03/268303/1 accepted/tizen/unified/20220117.135026 submit/tizen/20220112.015321 submit/tizen/20220113.004629
Youngjae Cho [Mon, 20 Dec 2021 06:15:34 +0000 (15:15 +0900)]
board: fix parameters of boot operation

Change-Id: I67b92ad2291c78f73e118b7570b4260899596e96
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agoboard: add boot operation 96/268296/1
Youngjae Cho [Mon, 20 Dec 2021 05:18:03 +0000 (14:18 +0900)]
board: add boot operation

Added
 - hal_device_board_set_boot_success(void)
 - hal_device_board_clear_boot_mode(void)
 - hal_device_board_get_boot_mode(int *)
 - hal_device_board_get_boot_reason(int *)

Change-Id: I85fa078ed8f3f57e76561ade258352343a79e4f4
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agoRemove ColoredPrintf in higher verison 57/268057/4 accepted/tizen/unified/20211221.050645 submit/tizen/20211210.025024
taemin.yeom [Wed, 15 Dec 2021 09:13:51 +0000 (18:13 +0900)]
Remove ColoredPrintf in higher verison
It was changed to internal API in GTEST 1.11.0

Do not use ColoredPrintf in higher gtest verison
In GTEST 1.11.0, internal gtest APIs have been changed.

Change-Id: Idffc5cfecd2432be0924104e76acfc15c4ae8065
Signed-off-by: taemin.yeom <taemin.yeom@samsung.com>
3 years agoboard: support switch partition 52/264952/2 accepted/tizen/unified/20211105.130447 submit/tizen/20211103.072537 submit/tizen/20211104.031932 submit/tizen/20211104.080231
Youngjae Cho [Wed, 6 Oct 2021 04:35:00 +0000 (13:35 +0900)]
board: support switch partition

Change-Id: I0941b12c1f529587bc6e0593eae67fa99e447ea9
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agothermal: rename device_thermal_e to hal_device_thermal_e 43/262043/1 accepted/tizen/6.5/unified/20211028.114915 accepted/tizen/unified/20210804.085622 submit/tizen/20210802.064402 submit/tizen/20210805.103313 submit/tizen/20210817.044914 submit/tizen_6.5/20211028.163201 tizen_6.5.m2_release
Youngjae Cho [Mon, 2 Aug 2021 05:08:37 +0000 (14:08 +0900)]
thermal: rename device_thermal_e to hal_device_thermal_e

The enum device_thermal_e has also been declared in device-api header.
Therefore, in implementing direct hal api, this enumerator makes error
(redeclaration of enumerator). Rename device_thermal_e at hal to avoid
this error.

Change-Id: I109cc31c9f64422caa178e007bd5a8734ed36750
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agoChange device-haltests rpm to hal-api-device-haltests 46/261246/2 accepted/tizen/unified/20210714.134304 submit/tizen/20210714.022758
Hyotaek Shim [Wed, 14 Jul 2021 01:51:31 +0000 (10:51 +0900)]
Change device-haltests rpm to hal-api-device-haltests

Change-Id: I32cae2dbfc1ebaf188ba6c06b7136d2f33167917
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
3 years agohaltest: fix coverity defect 15/260415/1
Youngjae Cho [Thu, 24 Jun 2021 08:11:00 +0000 (17:11 +0900)]
haltest: fix coverity defect

Change-Id: Ibd8c6e0aec4f94f7f9d857635cb73161bb37b906
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agoboard: fix parameter of get_device_serial_number() 42/260042/1 accepted/tizen/unified/20210621.123208 submit/tizen/20210618.075427 submit/tizen/20210621.095917
Youngjae Cho [Fri, 18 Jun 2021 02:15:01 +0000 (11:15 +0900)]
board: fix parameter of get_device_serial_number()

Change-Id: Ib7f0f9635103def4a6cfa45328f380d480de2b2c
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agoboard: renaming get_device_serial_number 64/259764/2 accepted/tizen/unified/20210615.120346 submit/tizen/20210614.021455
Youngjae Cho [Mon, 14 Jun 2021 01:40:35 +0000 (10:40 +0900)]
board: renaming get_device_serial_number

Change-Id: I5e2afe3e918e7f272bca6669e19dc76e2397e9d9
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agoAdd conditional compile directive to avoid build error 41/258141/3 accepted/tizen/unified/20210526.010327 submit/tizen/20210510.064912 submit/tizen/20210523.234938
taemin.yeom [Tue, 11 May 2021 07:06:00 +0000 (16:06 +0900)]
Add conditional compile directive to avoid build error

Change-Id: I51d1082222a7fa0ed5bb755ee75856aae1c25d63
Signed-off-by: taemin.yeom <taemin.yeom@samsung.com>
4 years agohaltest: add test for haptic, memory 71/255671/7 accepted/tizen/unified/20210331.113729 submit/tizen/20210323.041901 submit/tizen/20210329.052432
Yunmi Ha [Mon, 22 Mar 2021 08:40:24 +0000 (17:40 +0900)]
haltest: add test for haptic, memory

Change-Id: I5be1835fc31b5c5cebc1f65d6d9c8864d634f35c
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
4 years agohaltest: add test for thermistor 13/255713/1
Youngjae Cho [Tue, 23 Mar 2021 00:38:50 +0000 (09:38 +0900)]
haltest: add test for thermistor

Change-Id: I860d15706d05e4fd792175a5bdd6890afe6ec563
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agohaltest: add test for touchscreen 59/255659/2
Youngjae Cho [Mon, 22 Mar 2021 05:10:57 +0000 (14:10 +0900)]
haltest: add test for touchscreen

Change-Id: I9527c43c2b07a75a3854e2d0413e09802e2a34a0
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agohaltest: add test for external connection 36/255636/2
Youngjae Cho [Mon, 22 Mar 2021 02:27:15 +0000 (11:27 +0900)]
haltest: add test for external connection

Change-Id: Iac27765780744d880459517e43e4b2f3e3445512
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agohaltest: fix adding build source 47/255647/3
Youngjae Cho [Mon, 22 Mar 2021 04:32:53 +0000 (13:32 +0900)]
haltest: fix adding build source

Change-Id: I66e95043fa94a2a8cb6eb0a0bec9397625bb710e
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agohaltest: add test for bezel 87/255587/3
Youngjae Cho [Mon, 15 Mar 2021 04:22:26 +0000 (13:22 +0900)]
haltest: add test for bezel

Change-Id: If8aff416fe0eb7d3f38e16364a7d13aa0b07c8fc
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agohaltest: display: restore original state modified by test 92/255192/9
Youngjae Cho [Mon, 15 Mar 2021 05:42:28 +0000 (14:42 +0900)]
haltest: display: restore original state modified by test

Change-Id: Idf25256aa46ec6d5d0d0750564a5bc6c7e1ddd99
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agohaltest: skip tests not supported by HAL 82/255482/1
Youngjae Cho [Fri, 19 Mar 2021 01:24:48 +0000 (10:24 +0900)]
haltest: skip tests not supported by HAL

Instead of generating an error, skip a test if HAL function for that
test is not supported.

Change-Id: Ic28cbc788921b6a3ee116977dabe55cfaacabbd0
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agohaltest: add test for board 87/254987/5
Youngjae Cho [Thu, 11 Mar 2021 06:11:07 +0000 (15:11 +0900)]
haltest: add test for board

Change-Id: I5397e82b32ed9f2c745aadfc11221523791d59cc
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agohaltest: battery: remove registering callback at UnregisterChangedEventP 09/255009/4
Youngjae Cho [Thu, 11 Mar 2021 07:52:46 +0000 (16:52 +0900)]
haltest: battery: remove registering callback at UnregisterChangedEventP

Battery api preserves event callback internally, and doesn't allow
registering an additional callback. Therefore registering callback
in UnregisterChangedEventP generates error as the callback had been
registered at the test right before, the RegisterChangedEventP.
To prevent this, UnregisterChangedEventP reuses callback registered
from RegisterChangedEventP. For the case failing RegisterChangedEventP,
skip the UnregisterChangedEventP.

Change-Id: I92836f2bb68658fd3fd05bfe5755491d2da6d15e
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agohaltest: add test for battery 83/254883/9
Youngjae Cho [Wed, 10 Mar 2021 08:16:21 +0000 (17:16 +0900)]
haltest: add test for battery

Change-Id: I4d2404bb448d03596ee7367c594d86c480851340
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agohaltest: remove test for put backend 77/254977/2
Youngjae Cho [Thu, 11 Mar 2021 06:00:08 +0000 (15:00 +0900)]
haltest: remove test for put backend

Change-Id: I9f50848c61fa6c17c73270ee9181b1fec23e3eb9
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agohaltest: fix display test 70/254970/1
Youngjae Cho [Thu, 11 Mar 2021 05:18:08 +0000 (14:18 +0900)]
haltest: fix display test

Added skip message for not supported feature.

Change-Id: I5a3419738e05234ca49865536b90c6d89dcaffaa
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agoImplement HAL test for display 88/253988/15
lokilee73 [Mon, 22 Feb 2021 04:10:12 +0000 (13:10 +0900)]
Implement HAL test for display

Change-Id: I67bcfa3713c41a054c898898ad538d92d767def7
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
4 years agomemory: add new halapi 11/251911/7 accepted/tizen/unified/20210219.134857 submit/tizen/20210217.044338 submit/tizen/20210217.071642 submit/tizen/20210218.041307
Youngjae Cho [Wed, 20 Jan 2021 03:47:39 +0000 (12:47 +0900)]
memory: add new halapi

Change-Id: I52f89b125ea4982461e5c66f85662187624b6cf5
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
4 years agousb_gadget: fix usage of battery hal api 92/252792/1 accepted/tizen/unified/20210204.134637 submit/tizen/20210203.015309
Yunmi Ha [Tue, 2 Feb 2021 08:47:57 +0000 (17:47 +0900)]
usb_gadget: fix usage of battery hal api

Change-Id: I28fa5f0901f19249d31cf067b50af3af00ae50cb
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>