linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Biju Das <biju.das@bp.renesas.com>,
	Alessandro Zummo <a.zummo@towertech.it>,
	linux-rtc@vger.kernel.org, Simon Horman <horms@verge.net.au>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Chris Paterson <Chris.Paterson2@renesas.com>,
	Fabrizio Castro <fabrizio.castro@bp.renesas.com>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH 2/4] rtc: pcf85363: Add support for NXP pcf85263 rtc
Date: Wed, 21 Nov 2018 11:35:17 +0100	[thread overview]
Message-ID: <20181121103517.GJ8367@piout.net> (raw)
In-Reply-To: <CAMuHMdVpaB0mJq9LmBoHgBY9MNAXYAKN=h8hCX+iph+D_5pY=Q@mail.gmail.com>

On 21/11/2018 11:23:08+0100, Geert Uytterhoeven wrote:
> Hi Biju,
> 
> On Mon, Nov 19, 2018 at 12:23 PM Biju Das <biju.das@bp.renesas.com> wrote:
> > Add support for NXP pcf85263 real-time clock. pcf85263 rtc is compatible
> > with pcf85363,except that pcf85363 has additional 64 bytes of RAM.
> >
> > 1 byte of nvmem is supported and exposed in sysfs (# is the instance
> > number,starting with 0): /sys/bus/nvmem/devices/pcf85263-#/nvmem
> >
> > Signed-off-by: Biju Das <biju.das@bp.renesas.com>
> 
> Thanks for your patch!
> 
> > --- a/drivers/rtc/rtc-pcf85363.c
> > +++ b/drivers/rtc/rtc-pcf85363.c
> > @@ -311,7 +311,30 @@ static int pcf85363_nvram_write(void *priv, unsigned int offset, void *val,
> >                                  val, bytes);
> >  }
> >
> > -static const struct regmap_config regmap_config = {
> > +static int pcf85263_nvram_read(void *priv, unsigned int offset, void *val,
> > +                              size_t bytes)
> > +{
> > +       struct pcf85363 *pcf85363 = priv;
> > +
> > +       return regmap_read(pcf85363->regmap, CTRL_RAMBYTE, val);
> > +}
> 
> AFAIU without reading the datasheet, the pcf85363 also has this RAMBYTE
> register. Would it make sense to expose the contents on both parts?
> 

Yes it has. This series allows calling rtc_nvmem_register() multiple
times from the same driver:

http://patchwork.ozlabs.org/project/rtc-linux/list/?series=75212


-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2018-11-21 10:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-19 11:15 [PATCH 0/4] Add NXP pcf85263 real-time clock support Biju Das
2018-11-19 11:15 ` [PATCH 1/4] dt-bindings: rtc: pcf85363: Document pcf85263 real-time clock Biju Das
2018-11-21 10:04   ` Simon Horman
2018-11-21 10:09     ` Simon Horman
2018-11-22  9:31       ` Biju Das
2018-11-19 11:15 ` [PATCH 2/4] rtc: pcf85363: Add support for NXP pcf85263 rtc Biju Das
2018-11-21 10:23   ` Geert Uytterhoeven
2018-11-21 10:35     ` Alexandre Belloni [this message]
2018-11-22  9:40       ` Biju Das

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=20181121103517.GJ8367@piout.net \
    --to=alexandre.belloni@bootlin.com \
    --cc=Chris.Paterson2@renesas.com \
    --cc=a.zummo@towertech.it \
    --cc=biju.das@bp.renesas.com \
    --cc=fabrizio.castro@bp.renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=horms@verge.net.au \
    --cc=linux-renesas-soc@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;
as well as URLs for NNTP newsgroup(s).