display: Relocate lcd_on/off_procedure() 07/294107/2
authorYunhee Seo <yuni.seo@samsung.com>
Tue, 13 Jun 2023 02:00:03 +0000 (11:00 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Tue, 13 Jun 2023 07:55:25 +0000 (16:55 +0900)
commitdf74a37e72e8caa1ec5a4cf5fb5a453770c80210
treefe00a604faafee4b10e9f3d4dcdf94ed1f4a7d84
parenteb986c8d42dd107f15cfb14b4ac7220d79fcc455
display: Relocate lcd_on/off_procedure()

lcd_on/off_procedure() rules are same in all plugins except wearable.
Thus, duplicated codes are removed and relocated to display-panel.

These functions are added below display-panel.
- void display_panel_lcd_on_procedure(int state, enum device_flags flag);
    -> This replaces lcd_on_procedure(), it works to turn on lcd.
- void display_panel_lcd_off_procedure(enum device_flags flag);
    -> This replaces lcd_off_procedure(), it works to turn off lcd.
- bool display_panel_is_lcd_on_state_broadcasted(void);
    -> With this, It is possible to know if the lcd_on/off_procedure() done.
       This is used as flag of lcd on/off process.

This function is added below display-plugin.
- int display_plugin_lcd_off_procedure(enum device_flags flag);
    -> This is for wearable plugin, there is lcd_off_procedure() use case in the key-filter.c

Change-Id: I1a7f8268df4d45d0585fe7c8a93981cc7be4268c
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
13 files changed:
plugins/iot-headed/display/core.c
plugins/iot-headed/display/key-filter.c
plugins/mobile/display/core.c
plugins/mobile/display/key-filter.c
plugins/tv/display/core.c
plugins/tv/display/key-filter.c
plugins/wearable/display/core.c
plugins/wearable/display/key-filter.c
src/display/core.h
src/display/display-panel.c
src/display/display-panel.h
src/display/display-plugin.c
src/display/display-plugin.h