How I can adjust RTC offset to NXP Pcf85063tp?
I have custom imx6ull board and it is built from buildroot.
Hwclock read and write functions works correct and NTP '11 minute mode' is written clock correctly.
Hwclock(8) man says that it can adjust with hwclock --adjustment function. But I cant find it at all. I can't find /etc/adjtime file also.
# hwclock --help
BusyBox v1.31.1 (2020-10-22 09:46:51 EEST) multi-call binary.
Usage: hwclock [-r|--show] [-s|--hctosys] [-w|--systohc] [--systz] [--localtime] [-u|--utc] [-f|--rtc FILE]
Query and set hardware clock (RTC)
-r Show hardware clock time
-s Set system time from hardware clock
-w Set hardware clock from system time
--systz Set in-kernel timezone, correct system time
if hardware clock is in local time
-u Assume hardware clock is kept in UTC
--localtime Assume hardware clock is kept in local time
-f FILE Use specified device (e.g. /dev/rtc2)
I added printk debug to driver code
https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/rtc/rtc-pcf85063.c?h=imx_5.4.3_2.0...
and I can see cf85063_read_offset debug, but I have no idea how to set offset.
# cat /sys/class/rtc/rtc0/offset
[ 940.317834] DEBUG: pcf85063_read_offset
0
Is there something which block to adjustment manually, or do I need add more packages to buildroot, kernel or busybox?
-Janne