display: backlight: Relocate display_backlight_set/get/change_brightness() to reduce... 02/289202/9
authorYunhee Seo <yuni.seo@samsung.com>
Thu, 2 Mar 2023 10:53:27 +0000 (19:53 +0900)
committeryunhee <yuni.seo@samsung.com>
Mon, 20 Mar 2023 08:07:20 +0000 (17:07 +0900)
commit4fdd6a33a6c806c6449c812120c5e4edd00e40f3
tree883ef3ef5215f2edf0d9ca1a95bf8c196ce93917
parentc2b118b73f29161309e2edd7005238c375b10962
display: backlight: Relocate display_backlight_set/get/change_brightness() to reduce plugin duplication

Remove and redefine functions in the backlight_ops.
- set_brightness, get_brightness, transit_brt, get_brightness_raw
Wearable profile can have two status of get_brightness lbm_get_brightness/(default)get_brightness
That's why get_brightness_raw was put in backlight_ops to always call (default)get_brightness.
get_brightness_raw can be replaced by display_backlight_get_brightness.

These functions are added to below diplay-backlight.
int display_backlight_set_brightness(int brightness)
int display_backlight_get_brightness(int *brightness)
void display_backlight_change_brightness(int start, int end, int step)
-> With these functions, it is possible to get and set brightness through HAL.
int display_backlight_get_brightness_by_plugin_profile(int *brightness)
-> This function is temporary, it is for handling wearable profile dependency.
    To keep original code intent, this is necessary for functions that are dependent on wearable profile.

Change-Id: I0c9cb7675c39094576dd7e42d66d46a29da4144b
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
16 files changed:
plugins/iot-headed/display/core.c
plugins/iot-headed/display/device-interface.c
plugins/mobile/display/core.c
plugins/mobile/display/device-interface.c
plugins/tv/display/core.c
plugins/tv/display/device-interface.c
plugins/wearable/display/auto-brightness-sensorhub.c
plugins/wearable/display/core.c
plugins/wearable/display/device-interface.c
plugins/wearable/display/lbm.c
src/display/auto-brightness.c
src/display/device-interface.h
src/display/display-backlight.c
src/display/display-backlight.h
src/display/display-dbus.c
src/display/display-panel.c