From: Joshua Clayton <stillcompiling@gmail.com>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org
Subject: [rtc-linux] Re: [PATCH 1/9] rtc-pcf2123: Document all registers and useful bits
Date: Tue, 1 Dec 2015 10:13:26 -0800 [thread overview]
Message-ID: <20151201101326.34c11d79@jclayton-pc> (raw)
In-Reply-To: <20151124215136.GD3950@piout.net>
On Tue, 24 Nov 2015 22:51:36 +0100
Alexandre Belloni <alexandre.belloni@free-electrons.com> wrote:
> Hi,
>
> On 04/11/2015 at 07:36:32 -0800, Joshua Clayton wrote :
> > Document all 16 registers in the pcf2123, as well as
> > useful bit masks from the Control1 and seconds registers
> >
> > Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
> > ---
> > drivers/rtc/rtc-pcf2123.c | 23 ++++++++++++++++++++++-
> > 1 file changed, 22 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/rtc/rtc-pcf2123.c b/drivers/rtc/rtc-pcf2123.c
> > index d1953bb..7756210 100644
> > --- a/drivers/rtc/rtc-pcf2123.c
> > +++ b/drivers/rtc/rtc-pcf2123.c
> > @@ -47,6 +47,7 @@
> >
> > #define DRV_VERSION "0.6"
> >
> > +/* REGISTERS */
> > #define PCF2123_REG_CTRL1 (0x00) /* Control Register
> > 1 */ #define PCF2123_REG_CTRL2 (0x01) /* Control
> > Register 2 */ #define PCF2123_REG_SC
> > (0x02) /* datetime */ @@ -56,7 +57,27 @@
> > #define PCF2123_REG_DW (0x06)
> > #define PCF2123_REG_MO (0x07)
> > #define PCF2123_REG_YR (0x08)
> > -
> > +#define PCF2123_REG_ALRM_MN (0x09) /* Alarm
> > Registers */ +#define PCF2123_REG_ALRM_HR (0x0a)
> > +#define PCF2123_REG_ALRM_DM (0x0b)
> > +#define PCF2123_REG_ALRM_DW (0x0c)
> > +#define PCF2123_REG_OFFSET (0x0d) /* Clock Rate
> > Offset Register */ +#define PCF2123_REG_TMR_CLKOUT
> > (0x0e) /* Timer Registers */ +#define
> > PCF2123_REG_CTDWN_TMR (0x0f) +#define
> > PCF2123_REG_MAX (PCF2123_REG_CTDWN_TMR) +
> > +/* PCF2123_REG_CTRL1 BITS */
> > +#define CTRL1_CLEAR (0x00) /* Clear */
> > +#define CTRL1_CORRECTION_INT (0x02) /* Correction
> > Interrupt */ +#define CTRL1_12_HOUR (0x04) /*
> > 12 hour time */ +#define CTRL1_STOP (0x20) /*
> > Stop the clock */ +#define CTRL1_SW_RESET
> > (0x58) /* Software reset */ +#define
> > CTRL1_EXT_TEST (0x80) /* External Clock Test
> > mode */ + +/* PCF2123_REG_SC BITS */
> > +#define OSC_HAS_STOPPED (0x80) /* Clock has
> > been stopped */ +
>
> Can you use the BIT() macro?
>
>
Sure. I Will change that in v2
--
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
next prev parent reply other threads:[~2015-12-01 18:13 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-04 15:36 [rtc-linux] [PATCH 0/9] rtc-2123: access the clock offset feature Joshua Clayton
2015-11-04 15:36 ` [rtc-linux] [PATCH 1/9] rtc-pcf2123: Document all registers and useful bits Joshua Clayton
2015-11-24 21:51 ` [rtc-linux] " Alexandre Belloni
2015-12-01 18:13 ` Joshua Clayton [this message]
2015-11-04 15:36 ` [rtc-linux] [PATCH 2/9] rtc-pcf2123: clean up reads from the chip Joshua Clayton
2015-11-04 15:36 ` [rtc-linux] [PATCH 3/9] rtc-pcf2123: clean up writes to the rtc chip Joshua Clayton
2015-11-24 22:16 ` [rtc-linux] " Alexandre Belloni
2015-12-01 18:19 ` Joshua Clayton
2015-11-04 15:36 ` [rtc-linux] [PATCH 4/9] rtc-pcf2123: replace magic numbers with defines Joshua Clayton
2015-11-04 15:36 ` [rtc-linux] [PATCH 5/9] rtc-pcf2123: put the chip reset into a function Joshua Clayton
2015-11-24 23:17 ` [rtc-linux] " Alexandre Belloni
2015-12-01 18:22 ` Joshua Clayton
2015-11-04 15:36 ` [rtc-linux] [PATCH 6/9] rtc-pcf2123: avoid resetting the clock if possible Joshua Clayton
2015-11-24 23:25 ` [rtc-linux] " Alexandre Belloni
2015-12-01 20:23 ` Joshua Clayton
2015-12-01 21:04 ` Alexandre Belloni
2015-11-04 15:36 ` [rtc-linux] [PATCH 7/9] rtc-pcf2123: allow sysfs to accept hexidecimal Joshua Clayton
2015-11-04 15:36 ` [rtc-linux] [PATCH 8/9] rtc-pcf2123: use sysfs groups Joshua Clayton
2015-11-18 23:52 ` [rtc-linux] " Joshua Clayton
2015-11-24 23:31 ` Alexandre Belloni
2015-12-01 20:28 ` Joshua Clayton
2015-12-01 20:47 ` Alexandre Belloni
2015-11-04 15:36 ` [rtc-linux] [PATCH 9/9] rtc-pcf2123: adjust the clock rate via sysfs Joshua Clayton
2015-11-18 23:51 ` [rtc-linux] " Joshua Clayton
2015-11-17 15:30 ` [rtc-linux] Re: [PATCH 0/9] rtc-2123: access the clock offset feature Joshua Clayton
2015-11-17 16:25 ` Alexandre Belloni
2015-11-19 0:25 ` Joshua Clayton
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=20151201101326.34c11d79@jclayton-pc \
--to=stillcompiling@gmail.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@free-electrons.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rtc-linux@googlegroups.com \
/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