lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20220612094253.4rgbp3mcc44nffl6@proprietary-killer>
Date:   Sun, 12 Jun 2022 04:42:53 -0500
From:   "Marty E. Plummer" <hanetzer@...rtmail.com>
To:     linux-rtc@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, a.zummo@...ertech.it

alexandre.belloni@...tlin.com
Bcc:
Subject: RTC: utility function: days to year/month/days?
Reply-To:

Hello.

I'm currently working on a rtc driver for my soc (HiSilicon Hi3521a, and
at least one other, potentially more), and it stores time in the
following registers:
RTC_10MS_COUNT: 7 bits, 10ms increments
RTC_S_COUNT, 6 bits, 1s increments
RTC_M_COUNT, 6 bits, 1m increments
RTC_H_COUNT, 5 bits, 1h increments
RTC_D_COUNT_L, 8 bits, 1d increments, low bits
RTC_D_COUNT_H, 8 bits, 1d increments, high bits

No months or years. Is there any utility function one could use to
convert 0-65535 days into year/month/days already in the kernel, or is
that something I'll have to roll myself?

Mail receipients taken from ./scripts/get_maintainers.pl -f
drivers/rtc/rtc-core.h, so if I'm pinging someone I shouldn't, my
apologies.

Regards,

Marty Plummer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ