From: Nandor Han <nandor.han@vaisala.com>
To: Biwen Li <biwen.li@nxp.com>,
a.zummo@towertech.it, alexandre.belloni@bootlin.com,
leoyang.li@nxp.com, broonie@kernel.org
Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [v4] rtc: pcf85363/pcf85263: fix error that failed to run hwclock -w
Date: Tue, 27 Aug 2019 11:07:24 +0300 [thread overview]
Message-ID: <2b49e282-fc03-ee59-2719-5a3c1ce573ce@vaisala.com> (raw)
In-Reply-To: <20190827043735.31231-1-biwen.li@nxp.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
Nandor
next prev parent reply other threads:[~2019-08-27 8:07 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 [this message]
2019-08-27 8:12 ` [EXT] " Biwen Li
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=2b49e282-fc03-ee59-2719-5a3c1ce573ce@vaisala.com \
--to=nandor.han@vaisala.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=biwen.li@nxp.com \
--cc=broonie@kernel.org \
--cc=leoyang.li@nxp.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;
as well as URLs for NNTP newsgroup(s).