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>
This commit is contained in:
Abderrahmane JARMOUNI 2025-05-09 18:57:13 +02:00 committed by Anas Nashif
parent 5572e49bc9
commit abdb1ef3bc

View File

@ -52,7 +52,8 @@ static lv_display_t *lvgl_input_get_display(const struct device *dev)
lv_display_t *lv_disp = NULL;
if (disp_dev == NULL) {
return NULL;
LOG_DBG("No display phandle is passed in DT, defaulting to LV Default Display");
return lv_display_get_default();
}
for (int i = 0; i < DT_ZEPHYR_DISPLAYS_COUNT; i++) {