From: Biwen Li <biwen.li@nxp.com>
To: Nandor Han <nandor.han@vaisala.com>,
"a.zummo@towertech.it" <a.zummo@towertech.it>,
"alexandre.belloni@bootlin.com" <alexandre.belloni@bootlin.com>,
Leo Li <leoyang.li@nxp.com>,
"broonie@kernel.org" <broonie@kernel.org>
Cc: "linux-rtc@vger.kernel.org" <linux-rtc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [EXT] Re: [v4] rtc: pcf85363/pcf85263: fix error that failed to run hwclock -w
Date: Tue, 27 Aug 2019 08:12:12 +0000 [thread overview]
Message-ID: <DB7PR04MB4490EEEEF3E813A1EC34D1C68FA00@DB7PR04MB4490.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <2b49e282-fc03-ee59-2719-5a3c1ce573ce@vaisala.com>
>
> On 8/27/19 7:37 AM, Biwen Li wrote:
> > - In drivers/rtc/rtc-pcf85363.c, CTRL_STOP_EN is 0x2e, but DT_100THS
> > is 0, max_regiter is 0x2f, then reg will be equal to 0x30,
> > '0x30 < 0x2f' is false,so regmap_writeable will return false.
> >
> > - The pcf85363/pcf85263 has the capability of address wrapping
> > which means if you access a continuous address range across a
> > certain boundary(max_register of struct regmap_config) the
> > hardware actually wraps the access to a lower address. But the
> > address violation check of regmap rejects such access.
>
> nitpick: This 2 paragraphs could be combined to clear up the issue:
>
> `
> The pcf85363/pcf85263 has the capability of address wrapping which means if
> you access an address outside the allowed range
> (0x00-0x2f) the hardware actually wraps the access to a lower address.
> The rtc-pf85363 driver will use this feature to configure the time and execute 2
> actions in the same i2c write operation (stopping the clock and configure the
> time). However the driver has also configured the `regmap maxregister`
> protection mechanism that will block accessing addresses outside valid range
> (0x00-0x2f).
> `
>
> nitpick: I would also use separate buffers for this actions. Up to you :)
>
> Otherwise LGTM +1
Thanks, it's a beautiful explanation.
>
> Nandor
prev parent reply other threads:[~2019-08-27 8:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-27 4:37 [v4] rtc: pcf85363/pcf85263: fix error that failed to run hwclock -w Biwen Li
2019-08-27 8:07 ` Nandor Han
2019-08-27 8:12 ` Biwen Li [this message]
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=DB7PR04MB4490EEEEF3E813A1EC34D1C68FA00@DB7PR04MB4490.eurprd04.prod.outlook.com \
--to=biwen.li@nxp.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=broonie@kernel.org \
--cc=leoyang.li@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=nandor.han@vaisala.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;
as well as URLs for NNTP newsgroup(s).