arch/risc-v: Fix Espressif timer registering ID

Fix Espressif timer registering ID. Espressif's general purpose
timers are grouped in different Timer Groups, which may contain
more than one general purpose timer. The current implementation is
related to the timer groups (timer0 refers to Timer Group 0, for
instance), but previous registering method was referring to the
timer inside each group, which caused it to fail when more than
one timer group was being selected because only the first timer
on each group is being actually registered.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
This commit is contained in:
Tiago Medicci Serrano 2026-05-08 13:52:05 -03:00 committed by Matteo Golin
parent 4047b9f42b
commit d649732877

View file

@ -601,7 +601,7 @@ int esp_timer_initialize(int group_id)
return -ENOMEM;
}
snprintf(devpath, PATH_MAX, "/dev/timer%" PRIu32, lower->hal.timer_id);
snprintf(devpath, PATH_MAX, "/dev/timer%d", group_id);
/* Initialize the elements of lower half state structure */