Skip to content

Commit abdb1ef

Browse files
JarmouniAnashif
authored andcommitted
modules: lvgl: input: fix indev binding to display
When no 'display' property is present in LVGL input dev node in DT, we should default to LVGL Default Display to preserve the old behavior and not break LV Input on setups with only one display. Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
1 parent 5572e49 commit abdb1ef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/lvgl/input/lvgl_common_input.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ static lv_display_t *lvgl_input_get_display(const struct device *dev)
5252
lv_display_t *lv_disp = NULL;
5353

5454
if (disp_dev == NULL) {
55-
return NULL;
55+
LOG_DBG("No display phandle is passed in DT, defaulting to LV Default Display");
56+
return lv_display_get_default();
5657
}
5758

5859
for (int i = 0; i < DT_ZEPHYR_DISPLAYS_COUNT; i++) {

0 commit comments

Comments
 (0)