From: "Marty E. Plummer" <hanetzer@startmail.com>
To: linux-rtc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, a.zummo@towertech.it
Date: Sun, 12 Jun 2022 04:42:53 -0500 [thread overview]
Message-ID: <20220612094253.4rgbp3mcc44nffl6@proprietary-killer> (raw)
alexandre.belloni@bootlin.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
reply other threads:[~2022-06-12 9:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220612094253.4rgbp3mcc44nffl6@proprietary-killer \
--to=hanetzer@startmail.com \
--cc=a.zummo@towertech.it \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®