From: Giulio Benetti <giulio.benetti@micronovasrl.com>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
"open list:REAL TIME CLOCK (RTC) SUBSYSTEM"
<linux-rtc@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v7 3/4] rtc: ds1307: add offset sysfs for mt41txx chips.
Date: Wed, 18 Jul 2018 11:13:52 +0200 [thread overview]
Message-ID: <09456f94-8f4d-875d-c87f-4dedfeeebadc@micronovasrl.com> (raw)
In-Reply-To: <20180718084916.79837-2-giulio.benetti@micronovasrl.com>
Hi Alexandre,
Il 18/07/2018 10:49, Giulio Benetti ha scritto:
> m41txx chips can hold a calibration value to get correct clock bias.
>
> Add offset handling (ranging between -63ppm and 126ppm) via sysfs.
>
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> ---
> V6 => V7:
> * changed PPM to PPB as rtc sysfs offset handles PPB
> drivers/rtc/rtc-ds1307.c | 77 ++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 77 insertions(+)
>
> diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
> index 0162a600ff1b..b2ef9defc349 100644
> --- a/drivers/rtc/rtc-ds1307.c
> +++ b/drivers/rtc/rtc-ds1307.c
> @@ -114,6 +114,20 @@ enum ds_type {
> # define RX8025_BIT_VDET 0x40
> # define RX8025_BIT_XST 0x20
>
> +#define M41TXX_REG_CONTROL 0x07
> +# define M41TXX_BIT_OUT 0x80
> +# define M41TXX_BIT_FT 0x40
> +# define M41TXX_BIT_CALIB_SIGN 0x20
> +# define M41TXX_M_CALIBRATION 0x1f
Sorry, I've forgot to use BIT().
I would also use GENMASK() for M41TXX_M_CALIBRATION.
I correct and resend asap.
Giulio
next prev parent reply other threads:[~2018-07-18 9:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-18 8:49 [PATCH v7 2/4] rtc: ds1307: support m41t11 variant Giulio Benetti
2018-07-18 8:49 ` [PATCH v7 3/4] rtc: ds1307: add offset sysfs for mt41txx chips Giulio Benetti
2018-07-18 9:13 ` Giulio Benetti [this message]
2018-07-18 8:49 ` [PATCH v7 4/4] rtc: ds1307: add frequency_test_enable sysfs attribute to check tick on m41txx Giulio Benetti
2018-07-18 8:49 ` [PATCH v7 1/4] rtc: ds1307: fix data pointer to m41t0 Giulio Benetti
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=09456f94-8f4d-875d-c87f-4dedfeeebadc@micronovasrl.com \
--to=giulio.benetti@micronovasrl.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--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®