risc-v/qemu-rv: Initialize the userleds without late initialization

If CONFIG_BOARD_LATE_INITIALIZE is not selected, the userleds will
not be initialized. The userled initialization is not required to
be done within board_late_initialize(), thus this commit enables
initializing it in board_app_initialize() too.
This commit is contained in:
Tiago Medicci Serrano 2025-01-03 11:45:42 -03:00 committed by Xiang Xiao
parent 2c5d849e01
commit 7c24ef438e

View file

@ -146,6 +146,16 @@ int board_app_initialize(uintptr_t arg)
qemu_rptun_init();
#endif
#ifdef CONFIG_USERLED
/* Register the LED driver */
int ret = userled_lower_initialize("/dev/userleds");
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret);
}
#endif
return OK;
#endif
}