pcf2131: call inittodr() after late clock registration

The driver attaches via config_intrhook, which runs after the kernel's
inittodr() has already failed with ENXIO. Re-invoke inittodr() after
clock_register_flags() so the system time is set from the RTC.
This commit is contained in:
Tomaz Zaman 2026-03-26 18:15:12 +01:00
parent 0d00190958
commit 16e02dd356

View file

@ -297,6 +297,14 @@ pcf2131_start(void *arg)
clockflags = CLOCKF_GETTIME_NO_ADJ | CLOCKF_SETTIME_NO_TS;
clock_register_flags(dev, 1000000 / 2, clockflags);
clock_schedule(dev, 495000000);
/*
* This driver attaches via config_intrhook, which runs after
* inittodr() has already failed with ENXIO (no clock registered).
* Re-invoke inittodr() now that the clock is registered so the
* system time gets set from the RTC.
*/
inittodr(0);
}
static int